adrianmo / go-nmea

A NMEA parser library in pure Go
MIT License
226 stars 77 forks source link

add support for Garmin sensor status information #117

Closed tnn2 closed 1 month ago

tnn2 commented 1 month ago

Hi, I have a Garmin GPS, model 24xd HVS, NMEA 0183. Every minute I get this error notice in the log of my program. 2024/08/09 11:27:00 Error parsing NMEA sentence: nmea: sentence prefix 'PGRMT' not supported

I implemented support for the PGRMT sentence in order to get rid of the log message.

aldas commented 1 month ago

You can ignore these errors like that

        sentence, err := nmea.Parse(raw)
        var errNotSupported *nmea.NotSupportedError
        if errors.Is(err, errNotSupported) {
            s.logger.Debug().Err(err).Str("raw", raw).Msg("unsupported NMEA0183 message")
            continue
        }

p.s. please fix linter problems. You can check those locally with make check

icholy commented 1 month ago

@tnn2 thank you for the contribution!