Skip to content

Releases: adrianmo/go-nmea

Release v1.2.0

11 May 16:39
7a5ada5
Compare
Choose a tag to compare

Deprecation

Message parsing is now talker-agnostic, i.e., it is based on the sentence data type only. For a sentence like $XXYYY,220516,A,23,5133.82,W*42, where XX is the talker and YYY is the sentence data type, the parser will only account for the YYY data type, which is what defines the structure and format of the sentence.

In your code, given a sentence like the following:

sentence := "$GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70"

Instead of using the old, deprecated prefixes (e.g. nmea.PrefixGPRMC) that included the talked ID and the data type:

s, _ := nmea.Parse(sentence)

// Deprecated nmea.PrefixGPRMC, use nmea.TypeRMC instead
if s.Prefix() == nmea.PrefixGPRMC {
    m := s.(nmea.GPRMC)
    fmt.Printf("Validity: %s\n", m.Validity)
    ...
}

Use the DataType() sentence method to determine the parsed sentence data type and then cast it to the right type:

s, _ := nmea.Parse(sentence)

if s.DataType() == nmea.TypeRMC {
    m := s.(nmea.RMC)
    fmt.Printf("Validity: %s\n", m.Validity)
    ...
}

New features

  • Ability to register custom message parsers to allow parsing of sentence types that are currently not supported by the library [link].

New sentences

  • GNS - Combined GPS fix for GPS, Glonass, Galileo, and BeiDou
  • THS - Actual vessel heading in degrees True and status
  • VDM/VDO - Encapsulated binary payload
  • WPL - Waypoint location
  • RTE - Route
  • VHW - Water Speed and Heading
  • DPT - Depth of Water
  • DBS - Depth Below Surface
  • DBT - Depth below transducer

Thank you!

@icholy @bmurray @sthorshaug @BertoldVdb @kvartborg @krasi-georgiev @krawczyk87 @yavosh

Release v1.1.0

20 Jun 15:42
a32116e
Compare
Choose a tag to compare

New Sentences

  • GPHDT - Actual vessel heading in degrees True (#34)

Release v1.0.0

16 Apr 15:21
7ad7ee7
Compare
Choose a tag to compare

Supported sentences

  • GPRMC - Recommended Minimum Specific GPS/Transit data
  • GNRMC - Recommended Minimum Specific GNSS data
  • GPGGA - GPS Positioning System Fix Data
  • GNGGA - GNSS Positioning System Fix Data
  • GPGSA - GPS DOP and active satellites
  • GPGSV - GPS Satellites in view
  • GLGSV - GLONASS Satellites in view
  • GPGLL - Geographic Position, Latitude / Longitude and time
  • GPVTG - Track Made Good and Ground Speed
  • GPZDA - Date & time data
  • PGRME - Estimated Position Error (Garmin proprietary sentence)