SNR, P and L std, float storage#647
Merged
rtklibexplorer merged 2 commits intortklibexplorer:demo5from Jul 20, 2025
Merged
Conversation
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 lossy 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.
2b44cf2 to
fc73a06
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Submitting this PR again as the queue is relatively clear now, and it touches a lot of places that can cause merge conflicts with other changes in the pipeline. This is largely a proposal to make the code more readable and maintainable, to avoid all the inline encoding and decoding, but it also improves the accuracy a little particularly for the P and L std, but at the expense of a little more memory usage (a 4 byte float vs 2 byte encoding).
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 lossy 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.