A project log for Small Autonomous Survey Vessel

An autonomous little boat that scans and maps lakes and rivers.

cees-meijerCees Meijer 06/03/2020 at 20:470 Comments
I decided to use the Raspberry Pi 3 A as my main controller for the boat, and the first task was to add a GPS. The NEO-6M GPS module is very standard unit, with lots of examples on how to connect it. It is powered by 5V from the RPi, and the communication is standard RS-232 at the 3.3V level so it can be connected directly to the RPi Tx and Rx.
Connecting to the RPi. Yes, it is as simple as that.
On the RPi itself, make sure the Serial port is enabled, and the kernel messages on this port are disabled. (Raspi-Config->Interfacing Options->Serial)
Now I installed PuTTY (sudo apt-get install putty), set it up for Serial port '/dev/ttyS0' and 9600 baud. This immediately shows the NMEA text messages as they are coming from the GPS receiver. Can't be easier than that.

After adding the GPS receiver it was time to read it. I first tried the GPSD project which tries to make reading GPS data in the background easy. But after struggling some time to get it working I decided it was not what I was looking for.  As always with these kind of projects there are many examples and HowTo's , but I assume a lot of them are outdated or just incorrect for the setup that I have so none of the examples worked as described. And since I basically only needed position heading and speed from this specific GPS receiver I opted to use the TinyGPS++ package. This is actually a library written for the Arduino, but only minor changes were needed to get it running on the Pi. My version is here: