The Get Heading block can be used to determine the current angle of rotation for a gyro, relative to its start position.
The starting heading value of a gyro is 0. Rotating clockwise increases the value of the heading, while rotating counterclockwise decreases the value of the heading.
Using getIntegratedHeading, the integrated gyro Z value returns the current value obtained by integrating the Z axis rate value, adjusted by the Z axis offset continuously.
Using getHeading, the integrated gyro Z value is divided by 360, which limits the heading value between -359 and 359. The heading value restarts at 0 when the gyro continues past those angles.
|get||Select a gyro.||N/A|
Returns the current value obtained by integrating the Z axis rate value, adjusted by the Z axis offset continuously.
Return the integrated Z axis as a cartesian heading.
-∞ to ∞
-360 to 360
Tips and Tricks
You can use the Reset Heading block to reset the heading or calibrate the integrated heading value at any point.