Closed semuadmin closed 2 years ago
Might it not be more user-friendly to render the separate standard and high precision elements as a single attribute and then scale and round e.g. render
lat
andlatHp
as:
lat = round((lat + (latHp * 1e-2)) * 1e-7, 12)
and same for lon, height, hMSL and ecefX/Y/Z?
Agreed and done. The coordinate and height attributes returned by NAV-HPPOSLLH and NAV-HPPOSECEF now represent the high precision value in the units specified in the interface spec (i.e. height is in mm for HPPOSLLH, cm for HPPOSECEF). Release Notes updated
pyubx2 Pull Request Template
Description
Currently scaled attributes are rounded to 8 dp after multiplication by the applicable scaling factor. This causes some loss of useful precision in the additive high precision elements of the NAV-HPPOSLLH and NAV-HPPOSECEF messages (e.g.
lonHp
). This change increases the precision to 12 dp.Fixes # (issue)
55
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.