-
Notifications
You must be signed in to change notification settings - Fork 9
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
INT field not decoding negative numbers properly #1
Comments
Interesting. All integer RTCM fields are two's complement in the spec. They should be being parsed as such (everything else appears to work correctly). Perhaps there is some other bit alignment issue. I'll take a look when I get the chance. |
You're definitely correct - this issue stems from the restruct library not correctly dealing with integers which aren't int8, 16, 32, or 64. It just unpacks the bits into the larger int type and therefore the sign bit is not considered correctly (but works fine for positive numbers). In this specific case you can do the following:
I'd rather wait until this is fixed upstream, because otherwise we'll have to add similar code to all of the serialize and deserialize methods for all the structs containing ints. |
Thanks for reporting - this is fixed now, I'll cut a release v0.0.2. |
thank you very much 😃 |
For RTCM SSR, the decoded number is beyond the range of precision representation? |
See jcmb/RTCM3#6 and jcmb/RTCM3#7
How to reproduce it
go run latency.go -caster http://caster.centipede.fr:2101/PAS64 -username centipede -password centipede
ECEF coordinates must be 46320270351 -751698368 43694212166
The text was updated successfully, but these errors were encountered: