Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Acceleration and MOI Units #6495

Merged
merged 8 commits into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions wpiunits/src/main/java/edu/wpi/first/units/Units.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,27 @@ private Units() {
public static final Velocity<Velocity<Distance>> MetersPerSecondPerSecond =
MetersPerSecond.per(Second);

/**
* A unit of angular acceleration equivalent to accelerating at a rate of one {@link #Rotations
* Rotation} per {@link #Second} every second.
*/
public static final Velocity<Velocity<Angle>> RotationsPerSecondPerSecond =
RotationsPerSecond.per(Second);

/**
* The standard SI unit of angular acceleration, equivalent to accelerating at a rate of one
* {@link #Radians Radian} per {@link #Second} every second.
*/
public static final Velocity<Velocity<Angle>> RadiansPerSecondPerSecond =
RadiansPerSecond.per(Second);

/**
* A unit of angular acceleration equivalent to accelerating at a rate of one {@link #Degrees
* Degree} per {@link #Second} every second.
*/
public static final Velocity<Velocity<Angle>> DegreesPerSecondPerSecond =
DegreesPerSecond.per(Second);

/**
* A unit of acceleration equivalent to the pull of gravity on an object at sea level on Earth.
*/
Expand Down Expand Up @@ -223,6 +244,11 @@ private Units() {
/** 1/16 of a {@link #Pound}. */
public static final Mass Ounce = Ounces; // alias

// Moment of Inertia
/** The base SI unit for moment of inertia. */
public static final Mult<Mult<Mass, Distance>, Distance> KilogramSquareMeters =
Kilograms.mult(Meters).mult(Meters);

// Unitless
/** A dimensionless unit that performs no scaling whatsoever. */
public static final Dimensionless Value = BaseUnits.Value;
Expand Down
Loading