Repository navigation
Sensor GPS
There are two GPS units on the boat, one built into the autopilot, and a second with the sensors. The sensor GPS is a USB 'puck' that provides time synchronization as well as location data.
We are using the NMEA 0183 standard rather than the NMEA 2000. NMEA 2000 is a CAN bus architecture which has binary messages and is proprietary. This is the standard network bus used for cars, tractors and many other sensor networks, but requires a special 'bridge' between the CAN network and a Raspberry. The older NMEA 0183 standard has ASCII messages and runs on a serial bus - so it is a native fit for the Raspberry. USB pucks are all implemented with 0183.
Interestingly, while devices designed primarily to integrate with a network have moved to NMEA 2000 (ie sonar); the GPS industry, other than specialized networking units) is strongly sticking to NMEA 0183. Most people want stand-alone GPS units, or ones that easily interface to a computer via USB. You don't find a cheap NMEA 2000 GPS, while Amazon has NMEA 0183 USB GPS devices for less than $17, and almost any cell phone will output NMEA 0183 sentences.
We are capturing the 'RMS' sentences, which have both timestamp, latitude and longitude. The GPS sends a message about once a second.
The GPS is managed with the serial library. Since there is no need for multiplexing the signal, this is a simple and easy solution. The GPS is called from a loop (in Monitor.py) and arriving sentences are parsed and asynchronously passed back via a callback function. Timestamp, latitude and longitude are collected.
- NMEA (National Marine Electronic Association)
- Article on GPS issues
- Another rant