Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPGGA: NMEA sentence is too long! #12

Closed
dvtomas opened this issue Nov 28, 2024 · 2 comments · Fixed by #15
Closed

GPGGA: NMEA sentence is too long! #12

dvtomas opened this issue Nov 28, 2024 · 2 comments · Fixed by #15
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dvtomas
Copy link

dvtomas commented Nov 28, 2024

I get the error e.g. for the following real world (I don't remember the actual GPS receiver) message: $GPGGA,172814.0,3723.46587704,N,12202.26957864,W,2,6,1.2,18.893,M,-25.669,M,2.0,0031*4F\r\n

@nsforth
Copy link
Owner

nsforth commented Dec 1, 2024

Your receiver violates NMEA0183 spec that clearly states max message len. Between $ and CRLF characters should be no more than 79 chars.
NMEA0183 spec
I have an idea to fix it with "strict" crate feature which should be "true" by default.
strict=false will change max sentence size to something suitable, for example 120 chars.

@nsforth nsforth self-assigned this Dec 1, 2024
@nsforth nsforth added the enhancement New feature or request label Dec 1, 2024
@nsforth nsforth added this to the v0.5.0 milestone Dec 1, 2024
@dvtomas
Copy link
Author

dvtomas commented Dec 1, 2024

Thank you for looking into this. That would solve this to me. I think raising the limit to 100 chars would be enough. I'm not sure about the feature naming, though. As this controls the length only (as of yet), a strict_length might be more appropriate?

Also, I'm not sure which should be the default. My guess is that very few devices are so memory constrained that extra 20 bytes would matter at all, but the potential for an unexpected error with a non-compliant GPS receiver can be frustrating. But it's your choice of course, I'll be happy with any solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants