NMEA Java Library


The National Marine Electronics Association has published some protocol standards for electronic marine devices that communicate with each other. One of these standards (NMEA 0182) became very popular as many hand-held GPS tracking devices implemented it to provide positioning data to other external devices i.e. a PC. Although the protocol allows to send several data contents other than position information it is mainly used for this purpose.
Because of bandwidth limitations and a rising amounts of data on huge ship vessels the NMEA published another Standard (NMEA 2000) based upon a Controller Area Network (CAN). The data format is way different which is why the library on this page covers the NMEA 0182 standard only.

New and Noteworthy

2010-12-14Released new build and updated web pages with example
2010-12-13Enabled Hudson to build P2 site and target platform
2010-12-11Refactored NMEAReader and NMEAParser to work with or without OSGi present


  • Support for message checksum
  • Supported Sentences (s = tested with a sensor, t = tested with JUnit, u = untested)
    • MTW Water Temperature (u)
    • MWV Wind Measurement (u)
    • VHW Ship Movement (u)
    • GLL GPS Position (u)
    • VTG Velocity & Track Made Good (u)
    • VWR Relative Wind Speed and Angle (u)
    • GGA GPS Position (s)
    • RMC Minimum Recommended Sentence (s)
    • GSV Satellites in View (s)


The library has been designed with services in mind. As soon as an InputStreamProvider is present, a new thread is started that constructs a NMEA data reader which parses the stream into NMEA messages. These messages are sent to an NMEA message decoder that listens for NMEA messages and decodes the content into model objects. High level listeners that notify of a new GPS position or a new wind direction may be registered with the decoder.


The software is released under the terms of the BSD License which grants to use the library for commercial projects as well.


If you would like to receive an NMEA input stream from your device take a look at RXTX for serial communication or Bluecove for a free bluetooth stack. I have successfully used those libraries to retrieve data from my sensor. I'll check their license to see if I can put up a binding here.

Legal Info

Jens Kübler

Karlsruhe, Germany

Responsible for content according to ยง 6 MDStV (German law): Jens Kübler
No liability for contents of external links.

Creative Commons License
This web page and its graphics are licensed under a Creative Commons Attribution 3.0 Unported License

Legal Info