go-nmea v1.2.0 Release Notes

Release Date: 2020-05-11 // about 4 years ago
  • ๐Ÿ—„ 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 insteadif 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