What with covid and all that, I have not done much on this
project for a while. Bit lately I have experimented with several devices that should be able to provide heading data but I have been disappointed by all of them for tricky calibration routines or poor tilt compensation.
Just recently I got a CMPS14 module. This module comes ready calibrated and it seems to be very good on tilt compensation. Mind you I have not tried it on an actual
boat yet.
I have made a prototype that uses GPS data from a ublox unit. An Arduino Nano takes in the GPS string using SoftwareSerial then spits it out over USB. Next the heading value is read from the CMPS14 via I2C and dressed up to resemble an
NMEA heading string and spat out over the USB right after the GPS string.. At the moment both strings go out at 1 Hz and look like this:-
$GPGGA,132732.00,5148.47862,N,00225.61164,W,1,07,1 .59,61.9,M,48.6,M,,*77
$HCHDM,240.4,M
$GPGGA,132733.00,5148.47905,N,00225.61167,W,1,07,1 .59,62.5,M,48.6,M,,*7A
$HCHDM,240.3,M
$GPGGA,132734.00,5148.47912,N,00225.61172,W,1,07,1 .59,62.6,M,48.6,M,,*7C
$HCHDM,240.6,M
$GPGGA,132735.00,5148.47926,N,00225.61178,W,1,07,1 .59,63.0,M,48.6,M,,*77
The problem is that Opencpn does not recognise the heading data. Now I know that it does not have the checksum at the moment but I have unticked the the box on Opencpn that decides whether its needed or not so I was hoping that this is not the problem. I have even tried sending totally fake data that does have the checksum and it still doesn't like it.
Interestingly, the extra line feed is not evident when looking at the same data on the Arduino serial
monitor. I wonder if this is a clue that any of you may recognise.
Next I am going to try to add the proper checksum but its trickier that I thought due to the format that the heading data comes in. I would include my code but I am not sure how to just now.
If anyone can shed some light on this problem I would be very grateful to hear it