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

Handle (ignore) observation epochs containing event flags #226

Merged
merged 8 commits into from
Mar 31, 2024

Conversation

jigpu
Copy link
Contributor

@jigpu jigpu commented Mar 31, 2024

The epochs in an observation file contain flags that can have a value from 0 - 6. If the value is in the range 2 - 5 then it is an "event flag" that signals the following lines will contain type-specific data. Epochs with these particular flags are allowed to not have a date (if it is "not significant"), which would trip up our parsing of the file.

This patchset updates the parsing to better handle these situations. We don't yet do anything with these events, but not falling on our face is still an improvement :)

While we're at it, fix a bug in the meterological code that would trigger a test failure in the presence of some of the other patches in this set.

Fixes: #219

jigpu and others added 8 commits March 30, 2024 19:46
When parsing an epoch we want to ensure that we can at least read the
date and time fields. This function will end up consuming non-epoch
lines occasionally and we want to be sure that we bail early with an
error rather than either barreling ahead and triggering an "invalid
Gregorian date" panic or (even worse) assuming the bad parse is
valid.

Signed-off-by: Jason Gerecke <[email protected]>
Use the "format" function instead of the "format!" macro to verify that the
module produces correctly-formatted epoch strings.

Signed-off-by: Jason Gerecke <[email protected]>
Epoch flags are only used by observations, so it does not make sense to
have their processing done within the epoch module. Moves processing and
testing of the parsing and formatting of the flags over to the
observation module.

Signed-off-by: Jason Gerecke <[email protected]>
We don't yet actually *do* anything with events, but we can at least
return an Error to prevent the rest of the system from trying to
treat them as normal observations.

Signed-off-by: Jason Gerecke <[email protected]>
Event flags 2 - 5 allow the epoch fields to be left blank if they are
not "significant".

Fixes: georust#219
Signed-off-by: Jason Gerecke <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
@gwbres
Copy link
Collaborator

gwbres commented Mar 31, 2024

Thank you for your contributions!
I gave it a test and everything works fine.
Moving the Epoch Flag since it is totally dedicated to Observation RINEX, is a good idea.

Planning: i'm working on positioning /performance upgrades in the rtk-0.5 branch, I will publish RINEX 0.16 once this one gets merged. If you're interested in an intermediate release, I can do that just let me know

@gwbres gwbres merged commit e05eb6b into georust:main Mar 31, 2024
4 checks passed
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.

Panic with invalid Gregorian date: Carry while position-solving
2 participants