mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Explicitly states the gyro direction contract for the Gyro interface (#1151)
This commit is contained in:
committed by
Peter Johnson
parent
b20158015c
commit
5af85dd1bb
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user