The Gyro class measures the orientation of the robot.
More...
The Gyro class measures the orientation of the robot.
- Author
- John Gaby
Definition at line 35 of file Gyro.java.
◆ Gyro() [1/2]
| robotCore.Gyro.Gyro |
( |
int | d | ) |
|
◆ Gyro() [2/2]
◆ getRotation2d()
◆ getYaw()
| double robotCore.Gyro.getYaw |
( |
| ) |
|
Gets only the yaw.
- Returns
- Returns the yaw.
Definition at line 137 of file Gyro.java.
◆ invert()
| void robotCore.Gyro.invert |
( |
boolean | invert | ) |
|
Specifies that the sense of the yaw be inverted. I.E. controls whether the yaw value increases or decreases when the robot turns clockwise. In general, the Pure Pursuit path following assumes that the yaw will decrease when the robot turns clockwise.
- Parameters
-
| invert | - If true, inverts the direction of the yaw |
Definition at line 171 of file Gyro.java.
◆ normalize()
| double robotCore.Gyro.normalize |
( |
double | angle, |
|
|
double | range ) |
|
static |
Normalizes the value to be between -range/2 and +range/2.
- Returns
- Returns same value but guarenteed to be between -range/2 and +range/2
Definition at line 104 of file Gyro.java.
◆ normalizeAngle()
| double robotCore.Gyro.normalizeAngle |
( |
double | angle | ) |
|
|
static |
Normalizes an angle to between -180 and +180 degrees.
- Returns
- Returns same angle but guarenteed to be between -180 and +180 degrees.
Definition at line 122 of file Gyro.java.
◆ reset()
| void robotCore.Gyro.reset |
( |
double | yaw | ) |
|
Resets the yaw and position of the robot.
- Parameters
-
| yaw | - Specifies the new yaw value for the robot in degrees. This value will be adjusted so that it in the range -180 to 180. |
Definition at line 157 of file Gyro.java.
The documentation for this class was generated from the following file: