Skip to content

Commit

Permalink
[wpiunits] Add Acceleration and MOI Units (wpilibsuite#6495)
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 authored and chauser committed May 30, 2024
1 parent 1e3a01d commit bfb61ca
Showing 1 changed file with 26 additions and 0 deletions.
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

0 comments on commit bfb61ca

Please sign in to comment.