-
-
Notifications
You must be signed in to change notification settings - Fork 31
Introduce Epoch::precise_timescale_conversion #362
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
Conversation
* Introduce Polynomials for interpolation terms description * Add one example * Add one test Signed-off-by: Guillaume W. Bres <[email protected]>
* not needed since we're using Epochs directly Signed-off-by: Guillaume W. Bres <[email protected]>
|
The fundamental idea, is that Hifitime is responsible of the calculations, while the user is responsible for Polynomials correctness. All we can verify is that it is an actual transition. That is, target is not the origin timescale. |
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
ChristopherRabotin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is superb! Really good work, I just have minor comments and cleanups, but I really like this implementation. Does it fit your purpose with GPST corrections?
| /// - GPST->UTC is the forward conversion | ||
| /// - UTC->GPST is the backwards conversion | ||
| /// - reference_epoch: any reference [Epoch] for the provided [Polynomials]. | ||
| /// While we support any time difference, it should remain short in pratice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what reasons should we limit it t one day in practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the equations apply at all times and remain valid.
In practice, especially when targeting high accuracy, you want to keep your residual error small, and it is said to grow rather fast when it comes to clock behavior. RINEXv3 (NAV) describes polynomials (like GPST-UTC, GST-GPST, BDT-GST, TAI-UTC) for 24 hours. And people have been using it for many years and still to this day. Personnally I'd consider that huge but whatever. It simply means as the day goes by, the error when you convert for example GPST to UTC grows. Now they have "invented" RINEXv4, which allows to update these corrections during the day, so you can maintain the error to a minimum.
Side note, I'm still not very familiar with Clock RINEX, but I think it describes TAI-UTC and can describe UTC(k)-UTC and UTC(k)-TAI, for example k=USNO.
The only thing that is fundamental, is the time interval needs to be expressed in the LHS timescale.
In GGTO=|GST-GPST| example, GPST is the reference, so LHS is GST. Apparently that remains true even in reversed equation, but I'm not 100% sure about that, and I have a hard time finding documentation. I think my implementation is correct, src/epoch/l225 : reference_epoch = reference_epoch.to_time_scale(self.time_scale), assuming self.time_scale is LHS and user did the right thing.
| ) -> Result<Self, HifitimeError> { | ||
| if self.time_scale == target { | ||
| // Incorrect operation. | ||
| return Err(HifitimeError::SystemTimeError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should introduce a new enum type for this case, maybe InvalidTimeScaleConversion? The enum is marked as non-exhaustive already so it would not be a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what the right thing is honestly. The fundamental thing is we need to be certain that the time interval should always be expressed in LHS domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fine as-is,m just with a different enum variant for the error.
Co-authored-by: Chris <[email protected]>
Co-authored-by: Chris <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
My application is ideally to navigate (by that, I mean resolve P.V.T solutions) using any constellation/timescales (1) and output correct T (absolute time solution) in any prefered timescale (2) or at least with maximal flexibility (3). To achieve all of that, we need the correction equation obviously but is not enough. The rest of the work is out of scope of hifitime. Currently my framework does both, so I will backport this (equation side) to my framework, and maybe one day, hifitime will provide the basic support.
|
|
Would you want to try out this framework in RINEX before merging? Or maybe try it out before we officially release 4.1.0 ? |
It would definitely be best I think. But I was simply counting on you not releasing it right away and naturally have time to play with it. Yet I just realized it's not easy and not enough. All my stuff relies on both anise+nyx so I need some kind of branch with "up to date" hifitime |
|
Okay, let's merge this then, and I can create a non-release branch of ANISE that always points to the git repo of hifitime. Sounds good? Edit: ANISE now has a branch called |
|
awesome thanks ! I will keep you updated. I have to update my framework to the branch. I will re-run the tests I ran to validate my current state. I am also about to be able to produce more tests, I will keep you updated on all that.
very cool! I should probably do this in my own stuff side note: that made me realized I can get rid of the nyx dependency and solely depend on anise in gnss_rtk (in its current state). |
Uh oh!
There was an error while loading. Please reload this page.