semuconsulting / pyrtcm

Python library for parsing RTCM 3 protocol messages.
BSD 3-Clause "New" or "Revised" License
75 stars 23 forks source link

Fix DF396 value derivation (NCELL) in MSM messages Fixes #21 #23

Closed semuadmin closed 1 year ago

semuadmin commented 1 year ago

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 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.

Checklist: