Update handling of SPARTN-1X-BPAC and SPARTN-1X-EAS-DYN message types (not yet tested).
Add improved handling of half-day rollovers when decrypting SPARTN datastreams - thanks to @jonathanmuller @JonathanMullerGeosatis for contribution:
Different constellations are using different time reference :
GPS = GAL = QZSS = UTC -18s
BEI = UTC -14
GLO = UTC + 3h (exactly 3h, 0 seconds)
Because of that, passing a basedate to convert a 16 bits timetag to 32 bits unambiguous can be either
Correct
Wrong because basedate is ahead of the constellation (GPS for example)
Wrong because the basedate is behind the constellation (GLONASS for example)
In order to account for those time difference not being in sync, 3 unambitious solutions are calculated :
At the time of basedate
12h after basedate
12h prior to basedate
The closest in time is the one returned
By doing so, basedate can be up to 3h inaccurate (as GLONASS is +3h ahead) and still allow for a correct parsing
Fixes #17
Testing
Please test all changes, however trivial, against the supplied pytest suite tests/test_*.py. Please describe any test cases you have amended or added to this suite to maintain >= 85% code coverage.
[x] test_stream.py test cases enhanced to include 16-bit and 32-bit timetag datastreams with half-day rollovers.
pyspartn Pull Request Template
Description
Different constellations are using different time reference : GPS = GAL = QZSS = UTC -18s BEI = UTC -14 GLO = UTC + 3h (exactly 3h, 0 seconds)
Because of that, passing a basedate to convert a 16 bits timetag to 32 bits unambiguous can be either
In order to account for those time difference not being in sync, 3 unambitious solutions are calculated :
By doing so, basedate can be up to 3h inaccurate (as GLONASS is +3h ahead) and still allow for a correct parsing
Fixes #17
Testing
Please test all changes, however trivial, against the supplied pytest suite
tests/test_*.py
. Please describe any test cases you have amended or added to this suite to maintain >= 85% code coverage.Checklist:
CONTRIBUTING.MD
).tests/test_*.py
pytest suite to maintain >= 85% code coverage.tests/test_*.py
unittest suite.