lejos.nxt.addon
Enum DIMUGyro.RateUnits

java.lang.Object
  extended by java.lang.Enum<DIMUGyro.RateUnits>
      extended by lejos.nxt.addon.DIMUGyro.RateUnits
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DIMUGyro.RateUnits>
Enclosing class:
DIMUGyro

public static enum DIMUGyro.RateUnits
extends java.lang.Enum<DIMUGyro.RateUnits>

Rotation units supported by the sensor


Enum Constant Summary
CPS
          Rate in cosine/s
DPS
          Rate in degrees/s
RPS
          Rate in radians/s
 
Method Summary
 void convertTo(float[] values, DIMUGyro.RateUnits unit)
          Converts an array of values in place to specified unit
 float convertTo(float value, DIMUGyro.RateUnits unit)
          Converts a value to specified unit
static DIMUGyro.RateUnits valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DIMUGyro.RateUnits[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DPS

public static final DIMUGyro.RateUnits DPS
Rate in degrees/s


RPS

public static final DIMUGyro.RateUnits RPS
Rate in radians/s


CPS

public static final DIMUGyro.RateUnits CPS
Rate in cosine/s

Method Detail

values

public static final DIMUGyro.RateUnits[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DIMUGyro.RateUnits c : DIMUGyro.RateUnits.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DIMUGyro.RateUnits valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

convertTo

public float convertTo(float value,
                       DIMUGyro.RateUnits unit)
Converts a value to specified unit

Parameters:
value - Value to convert.
unit - Unit to convert to.
Returns:
Converted value.

convertTo

public void convertTo(float[] values,
                      DIMUGyro.RateUnits unit)
Converts an array of values in place to specified unit

Parameters:
values - Array of values to convert.
unit - Unit to convert to.