Skip to content

Commit 3e6c0d0

Browse files
authored
[wpiunits] Add Acceleration and MOI Units (wpilibsuite#6495)
1 parent dc4c635 commit 3e6c0d0

File tree

1 file changed

+26
-0
lines changed
  • wpiunits/src/main/java/edu/wpi/first/units

1 file changed

+26
-0
lines changed

wpiunits/src/main/java/edu/wpi/first/units/Units.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,27 @@ private Units() {
182182
public static final Velocity<Velocity<Distance>> MetersPerSecondPerSecond =
183183
MetersPerSecond.per(Second);
184184

185+
/**
186+
* A unit of angular acceleration equivalent to accelerating at a rate of one {@link #Rotations
187+
* Rotation} per {@link #Second} every second.
188+
*/
189+
public static final Velocity<Velocity<Angle>> RotationsPerSecondPerSecond =
190+
RotationsPerSecond.per(Second);
191+
192+
/**
193+
* The standard SI unit of angular acceleration, equivalent to accelerating at a rate of one
194+
* {@link #Radians Radian} per {@link #Second} every second.
195+
*/
196+
public static final Velocity<Velocity<Angle>> RadiansPerSecondPerSecond =
197+
RadiansPerSecond.per(Second);
198+
199+
/**
200+
* A unit of angular acceleration equivalent to accelerating at a rate of one {@link #Degrees
201+
* Degree} per {@link #Second} every second.
202+
*/
203+
public static final Velocity<Velocity<Angle>> DegreesPerSecondPerSecond =
204+
DegreesPerSecond.per(Second);
205+
185206
/**
186207
* A unit of acceleration equivalent to the pull of gravity on an object at sea level on Earth.
187208
*/
@@ -223,6 +244,11 @@ private Units() {
223244
/** 1/16 of a {@link #Pound}. */
224245
public static final Mass Ounce = Ounces; // alias
225246

247+
// Moment of Inertia
248+
/** The base SI unit for moment of inertia. */
249+
public static final Mult<Mult<Mass, Distance>, Distance> KilogramSquareMeters =
250+
Kilograms.mult(Meters).mult(Meters);
251+
226252
// Unitless
227253
/** A dimensionless unit that performs no scaling whatsoever. */
228254
public static final Dimensionless Value = BaseUnits.Value;

0 commit comments

Comments
 (0)