NMEA Library for Arduino

NMEA 0183 (National Marine Electronics Association) is the communication standard for devices used in marine environments as an aid to navigation. The most common use outside of marine environments is for GPS devices, which use NMEA to broadcast their position.

I wrote this library for Loguino in order to provide global positioning metrics to the logger. For Loguino 2.0 I needed to simplify the build, which means moving non-core libraries into their own packages, a lot of people also use the libraries on their own without Loguino, so it’s about time this was the case.

The code is available on GitHub, under the GPL.


You can download the ZIP file to import into the IDE here, or you can fork your own.


bool addChar(const char c)

Add a character from the gps stream. Returns True when a valid NMEA sentence has been completed. Generally you want to loop through all the data in the serial buffer and call addChar with the output of serial.read() until it returns true. At which point you can interrogate the NMEA object to determine if the fix is valid and then grab the location information if required.

bool validFix()

Returns true when the GPS has a valid fix.

string gps.getCourse()

Returns the course in degrees.

string getSpeed()

Returns the speed in Knots.

string getLatitude()

Returns the latitude.

string getLongitude()

Returns the longitude

string gps.getDate()

Returns the date as a string.

string gps.getTime()

Returns the time as a string.


You can download an example project here.

Little Jobs

Its been a whilst since I posted, lots of non-car related things going have kept me from posting progress. The car is nearing completion now, my current todo list is:


  • Paint metalwork at front of car
  • Fix the oil leaks
  • Fit the additional return spring on the throttle
  • Check the exhaust fittings for leaks
  • Check the state of the exhaust wadding
  • Make a new boot
  • Make a floor for the boot of the car
  • Check if the fuel tank is actually leaking or if its just overspill from where i was careless.
  • Set the Timing
  • Adjust the tappets
  • Remove the foam from the underneath of the bonnet
  • Remove the old fuel filler, fill the hole and paint it
  • Rewire the tachometer to work with megasquirt
  • Paint the aerocatches black


  • Fit the trim to the windscreen
  • Fit the flat shifter kit
  • Fit the battery holder
  • Make a bracket and fit the speed sensor
  • Fit the indicator side repeaters
  • Fit and wire in the IR beacon for the data-logger
  • Fit the warning LED for the immobilizer
  • Sort out the heater ducting
  • Adjust the headlamps and fit the cowling
  • Connect up the earth for headlamps


  • Change the oil
  • Change the cambelt
  • Flush the cooling system