Constructor and Description |
---|
GyroscopeAdapter(SampleProvider source,
float sampleFrequency) |
GyroscopeAdapter(SampleProvider source,
float sampleFrequency,
int axisIndex) |
Modifier and Type | Method and Description |
---|---|
int |
getAngle() |
float |
getAngularVelocity()
Implementor must calculate and return the angular velocity in degrees per second.
|
void |
recalibrateOffset()
Racalibrates the gyroscope for offset error.
|
void |
reset() |
public GyroscopeAdapter(SampleProvider source, float sampleFrequency, int axisIndex)
source
- A SampleProvider representing a gyroscopesampleFrequency
- The frequency used to sample the gyroscopeaxisIndex
- The axis to use (usefull with multiaxis gyroscopespublic GyroscopeAdapter(SampleProvider source, float sampleFrequency)
source
- A SampleProvider representing a gyroscopesampleFrequency
- The frequency used to sample the gyroscopepublic float getAngularVelocity()
Gyroscope
getAngularVelocity
in interface Gyroscope
public void recalibrateOffset()
recalibrateOffset
in interface Gyroscope