Open justinswork opened 2 weeks ago
Note: I haven't had a chance to finish up my .NET 6+ branch just yet: https://github.com/dotMorten/NmeaParser/pull/112
Do you have an example of a string that causes problems?
@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 :)
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"
Closing this issue as it is fixed with #117
Reopening since fix isn't merged
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 https://github.com/dotnet/runtime/issues/108362
The bug happens here https://github.com/dotMorten/NmeaParser/blob/91d0a73cd29cb1a262532fef25baf1f45d1b64ce/src/NmeaParser/Nmea/Rmc.cs#L50
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.