Package tagalong.units
Enum Class VelocityUnits
- All Implemented Interfaces:
- Serializable,- Comparable<VelocityUnits>,- Constable
Velocity units enum identifiers.
 Used for configuration and robot setup instead of the WPILib Java units to
 avoid reallocations and garbage collections in match.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionDegrees per Second aka DegPS aka deg/secondDegrees per Hour aka deg/hourDegrees per Millisecond aka deg/millisecondDegrees per Minute aka deg/minuteDegrees per Second aka DegPS aka deg/secondFeet per Hour aka feet/hourFeet per Millisecond aka feet/millisecondFeet per Minute aka feet/minuteFeet per Second aka FPS aka feet/secondInches per Hour aka inch/hourInches per Millisecond aka feet/millisecondInches per Minute aka inch/minuteInches per Second aka inch/secondMeter per Hour aka meter/hourMeter per Millisecond aka meter/millisecondMeter per Minute aka meter/minuteMeter per Second aka MPS aka meter/secondMeter per Second aka MPS aka meter/secondRadians per Hour aka radians/hourRadians per Millisecond aka radians/millisecondRadians per Minute aka radians/minuteRadians per Second aka radians/secondRadians per Second aka RadPS aka radians/secondRotations per Hour aka rotations/hourRotations per Millisecond aka rotations/MillisecondRotations per Minute aka RPM aka rotations/minuteRotations per Second aka RPS aka rotations/secondRotations per Second aka RPS aka rotations/secondRotations per Second aka RPS aka rotations/second
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal DistanceUnitsThe distance portion of the velocity unitfinal TimeUnitsThe time portion of the velocity unit
- 
Method SummaryModifier and TypeMethodDescriptiondoubleconvertX(double x, VelocityUnits targetUnit) Convert from base class' unit to the targetUnit typestatic VelocityUnitsReturns the enum constant of this class with the specified name.static VelocityUnits[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
MPSMeter per Second aka MPS aka meter/second
- 
ROTPSRotations per Second aka RPS aka rotations/second
- 
RPSRotations per Second aka RPS aka rotations/second
- 
RADPSRadians per Second aka RadPS aka radians/second
- 
DEGPSDegrees per Second aka DegPS aka deg/second
- 
METERS_PER_MILLISECONDMeter per Millisecond aka meter/millisecond
- 
METERS_PER_SECONDMeter per Second aka MPS aka meter/second
- 
METERS_PER_MINUTEMeter per Minute aka meter/minute
- 
METERS_PER_HOURMeter per Hour aka meter/hour
- 
FEET_PER_MILLISECONDFeet per Millisecond aka feet/millisecond
- 
FEET_PER_SECONDFeet per Second aka FPS aka feet/second
- 
FEET_PER_MINUTEFeet per Minute aka feet/minute
- 
FEET_PER_HOURFeet per Hour aka feet/hour
- 
INCHES_PER_MILLISECONDInches per Millisecond aka feet/millisecond
- 
INCHES_PER_SECONDInches per Second aka inch/second
- 
INCHES_PER_MINUTEInches per Minute aka inch/minute
- 
INCHES_PER_HOURInches per Hour aka inch/hour
- 
ROTATIONS_PER_MILLISECONDRotations per Millisecond aka rotations/Millisecond
- 
ROTATIONS_PER_SECONDRotations per Second aka RPS aka rotations/second
- 
ROTATIONS_PER_MINUTERotations per Minute aka RPM aka rotations/minute
- 
ROTATIONS_PER_HOURRotations per Hour aka rotations/hour
- 
RADIANS_PER_MILLISECONDRadians per Millisecond aka radians/millisecond
- 
RADIANS_PER_SECONDRadians per Second aka radians/second
- 
RADIANS_PER_MINUTERadians per Minute aka radians/minute
- 
RADIANS_PER_HOURRadians per Hour aka radians/hour
- 
DEGREES_PER_MILLISECONDDegrees per Millisecond aka deg/millisecond
- 
DEGREES_PER_SECONDDegrees per Second aka DegPS aka deg/second
- 
DEGREES_PER_MINUTEDegrees per Minute aka deg/minute
- 
DEGREES_PER_HOURDegrees per Hour aka deg/hour
 
- 
- 
Field Details- 
distanceUnitThe distance portion of the velocity unit
- 
timeUnitThe time portion of the velocity unit
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
convertXConvert from base class' unit to the targetUnit type- Parameters:
- x- double value to be converted
- targetUnit- target unit
- Returns:
- x converted to the target units
 
 
-