Quote:
Originally Posted by ekapalka
...
|
The gyro gives you the angle of the robot relative to the robot's position at power-up.
from Gyro.java in WPILib:
Code:
/**
* Use a rate gyro to return the robots heading relative to a starting position.
* The Gyro class tracks the robots heading based on the starting position. As the robot
* rotates the new heading is computed by integrating the rate of rotation returned
* by the sensor. When the class is instantiated, it does a short calibration routine
* where it samples the gyro while at rest to determine the default offset. This is
* subtracted from each sample to determine the heading.
*/