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

.NET 7 causes GPRMC messages to have incorrect FixTime values #116

Closed
justinswork opened this issue Sep 30, 2024 · 7 comments
Closed

.NET 7 causes GPRMC messages to have incorrect FixTime values #116

justinswork opened this issue Sep 30, 2024 · 7 comments

Comments

@justinswork
Copy link
Contributor

In .NET 7, the DateTimeOffset AddSeconds method was changed for enhanced precision.

The documentation has been updated to explain this new behavior (from https://learn.microsoft.com/en-us/dotnet/api/system.datetime.addseconds?view=net-6.0#remarks)

The issue is explained more in depth in dotnet/runtime#108362

The bug happens here

0, TimeSpan.Zero).AddSeconds(double.Parse(message[0].Substring(4), CultureInfo.InvariantCulture));

The end result as far as this package is concerned is that the FixTime of GPRMC messages is "more precise" but it's just wrong.

@dotMorten
Copy link
Owner

Note: I haven't had a chance to finish up my .NET 6+ branch just yet: #112

@dotMorten
Copy link
Owner

Do you have an example of a string that causes problems?

@justinswork
Copy link
Contributor Author

@dotMorten ok, cool. I wasn't aware that branch was in progress. Would be awesome if that could get in soon, so that then .NET 7/8 support could get added as well, this bug doesn't exist in .NET 6 :)

@justinswork
Copy link
Contributor Author

Do you have an example of a string that causes problems?

"$GPRMC,141825.2,A,4249.92297,N,08548.52186,W,000.01,227.1,040322,005.5,W*54"

@justinswork
Copy link
Contributor Author

Closing this issue as it is fixed with #117

@dotMorten
Copy link
Owner

Reopening since fix isn't merged

@dotMorten dotMorten reopened this Oct 1, 2024
@dotMorten
Copy link
Owner

Fixed

@dotMorten dotMorten mentioned this issue Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants