Graphics: Yaw—Pitch—Roll
The gYaw, gPitch and gRoll are classes with two functions:
Note that the graphic is updated only if the value passed is different form previous value. This allows smoother graphics and fast drawing. Typically, the refresh requires from 0 to 80 ms typically when value has changed. |
IMU with 6 Lines of Code
To display the three yaw-pitch-roll angles, only 6 lines of codes are required.
The IMU described at I²C Inertial Measurement Unit fits perfectly. |
Each graphic is initialised with define.
|
myYaw.define( &myLCD, 60, 60, 40, greenColour, blueColour); |
Then, each graphic is updated with display, with yawAngle, pitchAngle and rollAngle as angles provided by the IMU.
|
myYaw.draw(yawAngle); |