Explicitly states the gyro direction contract for the Gyro interface (#1151)

This commit is contained in:
Thad House
2018-06-10 20:13:36 -07:00
committed by Peter Johnson
parent b20158015c
commit 5af85dd1bb
2 changed files with 16 additions and 0 deletions

View File

@@ -42,6 +42,10 @@ class Gyro {
* allows algorithms that wouldn't want to see a discontinuity in the gyro
* output as it sweeps past from 360 to 0 on the second time around.
*
* The angle is expected to increase as the gyro turns clockwise when looked
* at from the top. It needs to follow NED axis conventions in order to work
* properly with dependent control loops.
*
* @return the current heading of the robot in degrees. This heading is based
* on integration of the returned rate from the gyro.
*/
@@ -52,6 +56,10 @@ class Gyro {
*
* The rate is based on the most recent reading of the gyro analog value.
*
* The rate is expected to be positive as the gyro turns clockwise when looked
* at from the top. It needs to follow NED axis conventions in order to work
* properly with dependent control loops.
*
* @return the current rate in degrees per second
*/
virtual double GetRate() const = 0;