Skip to content
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

SNR, Pstd, Lstd: float rather than compressed encoding #506

Open
wants to merge 2 commits into
base: demo5
Choose a base branch
from

Conversation

ourairquality
Copy link

This data, the observation SNR, Pstd and Lstd, used a compressed encoding were a float is the natural representation. These were being encoded and decoder when used, making a lot of redundant code and a burden to get right. This proposal just uses a float for these, simplifying code.

If the extra storage space is shown to be an issue then this path would still be proposed, but also adding common access functions for compressed encoding and decoding. If the L and P std are not generally useful data then this code could also become a compilation conditional to save using any storage for these if not needed. Having the code readable and maintainable seems more important to me than saving a bit of storage for these.

The Pstd and Lstd encodings were aligned with the ublox output, with a further compression to digits 1 to 9 for RINEX. This proposal moves this encoding into rinex.c, specific to the RINEX format. Raw formats decoded to RINEX should give the same output, and should read back the same float values. Changes to this encoding can now be local to rinex.c, and all uses need not be updated. The raw formats can be decoded to floats without compression to the limited RINEX encoding, and this even helps a little for the ublox format, and gives much better data for sbf and unicore formats.

Added support to the rtknavi-qt monitor observation page to output the P and L Std which was now simpler to do.

Store the SNR as a float, rather than a uint16_t, avoiding the scaling
and rounding at each access.

The comnav and tersus decoders were not even using the SNR_UNIT for
scaling, perhaps another encoding, but assume scaling is not need when
stored as a float.

Store the P and L std in the float format. Makes better use of the
input format, without lossly compression. Avoids having to do the
encoding and decoding to the compressed format at each use.

Implement the compressed encoding in RINEX input and output. Easier to
make changes in one location here, and avoids this lossy compression
on other paths.

This uses a little extra storage, but if this is an issue then it
might be better to abstract a compressed encoding into accessor
functions than to have this distributed to each use. The P and L std
might be made a compilation option.

ublox: decode_trkmeas is estimating Lstd so have it respect the
-RCVSTDS option.

unicore: was not initialising P and L std.
For now only enabled when extended observations are enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant