IMU
The IMUdisp test program is very simple. In a 10Hz loop there are requests to the IMU for the parameters through a serial channel. These values are then displayed for debugging with the same rate.
From the GPS attached to the IMU it receives latitude, longitude, height, time, Horizontal Dilution of Precision, Estimated Horizontal Position Error, list and number of locked satellites. Speed and direction are reliable only when the rover travels above a reasonable value.
The commands exchanged with the usual protocol between IMU and HLS (here emulated by the test GUI) are the one needed to send and receive the aforementioned parameters.
Following a brief description, where 'w' means data written (HLS -> IMU) and 'r' data read (HLS <- IMU)
S : (w) Ref. speed and heading setting (mm/s and degrees)
T :
(r) Time request and receive (Year, Month, Day, Hour, Min, Sec)
G :
(r) GPS service params request and receive (Satellites, Quality)
b : (r) Speed, current and position request and receive (mm/s, mA, m)
K
: (r) GPS and IMU details request and receive (GPS and DCM)
The IMU acts as a bridge for dsNAV parameters too: speed and motor current for the 4 wheels (Front Left, Front Right, Rear Left, Rear Right) and position coordinates computed by dead-reckoning and IMU fusion. The wheel Slippage is computed by dsNav comparing rotation measured with odometry and rotation computed with the IMU.
The DESIRED speed (mm/s) and direction (deg.) are set through the joystick with the travel enabling command as well.
The IMU sends the whole Direction Cosine Matrix allowing the receiver to compute Pitch, Roll and Yaw. The GUI displays them both as numbers and as simulated flight instruments. Attitude and Heading indicators are inspired by Jimmy Sticks work.