1. Home
  2. Docs
  3. NMEA Parser
  4. Quickstart
  5. Parsing NMEA messages using the NMEA parser (the best way)

Parsing NMEA messages using the NMEA parser (the best way)

The first step is the same, we start by constructing an NMEA sentence parser. But then, we add a GGA Listener. The function connected to this event (Print String in the given example) will be called every time that the NMEA sentence parser will parse a GGA sentence. The main benefit here is that we know that the parameter passed to the event is of type GGA sentence, so we don’t have to downcast the object.
Eventually we can remove the listener after, to prevent further calls.
Also note that the listener must be added before a call to Parse.

 

Was this article helpful to you? Yes No

How can we help?