Package trclib.sensor
Interface TrcGyro.GyroData
- All Known Implementing Classes:
FtcMRI2cGyro
- Enclosing class:
- TrcGyro
public static interface TrcGyro.GyroData
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns the heading of the x-axis.This method returns the rotation rate on the x-axis.This method returns the heading of the y-axis.This method returns the rotation rate on the y-axis.This method returns the heading of the z-axis.This method returns the rotation rate on the z-axis.void
This method resets the integrator on the x-axis.void
This method resets the integrator on the y-axis.void
This method resets the integrator on the z-axis.void
setXInverted
(boolean inverted) This method inverts the x-axis.void
setYInverted
(boolean inverted) This method inverts the y-axis.void
setZInverted
(boolean inverted) This method inverts the z-axis.
-
Method Details
-
setXInverted
void setXInverted(boolean inverted) This method inverts the x-axis. This is useful if the orientation of the gyro x-axis is such that the data goes the wrong direction.- Parameters:
inverted
- specifies true to invert x-axis, false otherwise.
-
setYInverted
void setYInverted(boolean inverted) This method inverts the y-axis. This is useful if the orientation of the gyro y-axis is such that the data goes the wrong direction.- Parameters:
inverted
- specifies true to invert y-axis, false otherwise.
-
setZInverted
void setZInverted(boolean inverted) This method inverts the z-axis. This is useful if the orientation of the gyro z-axis is such that the data goes the wrong direction.- Parameters:
inverted
- specifies true to invert z-axis, false otherwise.
-
getXRotationRate
TrcSensor.SensorData<Double> getXRotationRate()This method returns the rotation rate on the x-axis.- Returns:
- X rotation rate.
-
getYRotationRate
TrcSensor.SensorData<Double> getYRotationRate()This method returns the rotation rate on the y-axis.- Returns:
- Y rotation rate.
-
getZRotationRate
TrcSensor.SensorData<Double> getZRotationRate()This method returns the rotation rate on the z-axis.- Returns:
- Z rotation rate.
-
getXHeading
TrcSensor.SensorData<Double> getXHeading()This method returns the heading of the x-axis. If there is an integrator, we call the integrator to get the heading. Else if we have a CardinalConverter, we call the converter to get the heading else we call the platform dependent gyro to get the raw heading value.- Returns:
- X heading.
-
getYHeading
TrcSensor.SensorData<Double> getYHeading()This method returns the heading of the y-axis. If there is an integrator, we call the integrator to get the heading. Else if we have a CardinalConverter, we call the converter to get the heading else we call the platform dependent gyro to get the raw heading value.- Returns:
- Y heading.
-
getZHeading
TrcSensor.SensorData<Double> getZHeading()This method returns the heading of the z-axis. If there is an integrator, we call the integrator to get the heading. Else if we have a CardinalConverter, we call the converter to get the heading else we call the platform dependent gyro to get the raw heading value.- Returns:
- Z heading.
-
resetXIntegrator
void resetXIntegrator()This method resets the integrator on the x-axis. -
resetYIntegrator
void resetYIntegrator()This method resets the integrator on the y-axis. -
resetZIntegrator
void resetZIntegrator()This method resets the integrator on the z-axis.
-