Fix incorrect DF396 value derivation in MSM message parsing. Size of DF396 attribute is NSAT * NSIG but value of this attribute is num of bits set. "NCell" is also now made a public attribute.
Also incorporates enhanced bitfield parsing algorithms (approximately twice as fast as previously) and additional validation - will now output the following RTCMMessageError if an attempt is made to read payload attribute bits beyond the payload length:
Please test all changes, however trivial, against the supplied unittest suite tests/test_*.py e.g. by executing the tests/testsuite.py module or using your IDE's native Python unittest integration facilities. Please describe any test cases you have amended or added to this suite to maintain >= 99% code coverage.
[x] 4 tests amended in test_stream.py
Checklist:
[x] My code follows the style guidelines of this project (see CONTRIBUTING.MD).
[x] I have performed a self-review of my own code.
[x] (if appropriate) I have cited my RTCM documentation source(s).
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the documentation.
[x] (if appropriate) I have added test cases to the tests/test_*.py unittest suite to maintain >= 99% code coverage.
[x] I have tested my code against the full tests/test_*.py unittest suite.
[x] My changes generate no new warnings.
[x] Any dependent changes have been merged and published in downstream modules.
[x] I understand and acknowledge that the code will be published under a BSD 3-Clause license.
pyrtcm Pull Request Template
Description
Fix incorrect DF396 value derivation in MSM message parsing. Size of DF396 attribute is NSAT * NSIG but value of this attribute is num of bits set. "NCell" is also now made a public attribute.
Also incorporates enhanced bitfield parsing algorithms (approximately twice as fast as previously) and additional validation - will now output the following
RTCMMessageError
if an attempt is made to read payload attribute bits beyond the payload length:f"Attribute size {length} exceeds remaining payload length {self._payblen - position}"
Fixes #21
Testing
Please test all changes, however trivial, against the supplied unittest suite
tests/test_*.py
e.g. by executing thetests/testsuite.py
module or using your IDE's native Python unittest integration facilities. Please describe any test cases you have amended or added to this suite to maintain >= 99% code coverage.Checklist:
CONTRIBUTING.MD
).tests/test_*.py
unittest suite to maintain >= 99% code coverage.tests/test_*.py
unittest suite.