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

from_gregorian but in GPST #257

Closed
gwbres opened this issue Aug 30, 2023 · 5 comments · Fixed by #332
Closed

from_gregorian but in GPST #257

gwbres opened this issue Aug 30, 2023 · 5 comments · Fixed by #332

Comments

@gwbres
Copy link
Collaborator

gwbres commented Aug 30, 2023

Hello @ChristopherRabotin,

I would be interested in having an Epoch construction method similar to Epoch::from_gregorian_utc but in TimeScale::GPST.

from_gregorian_utc is the best thing to use when all data fields are already known.

Such feature would solve the requirement I face in two of my parsers:

  • in RINEX when parsing NAV ephemeris - the SV broadcasts Epoch expressed in their timescale (GPST for example)
  • in SP3, all Epochs are expressed in a unique GNSS time scale
@ChristopherRabotin
Copy link
Member

ChristopherRabotin commented Aug 30, 2023 via email

@gwbres
Copy link
Collaborator Author

gwbres commented Aug 30, 2023

It sounds like it would be quite a bit easier in there. What do you think?

Yes, definitely easier if the new approach gets finalized.

I don't have a need for this immediatly either

@ChristopherRabotin
Copy link
Member

Would this make more sense in #229 to avoid proliferation of more initializers?

@gwbres
Copy link
Collaborator Author

gwbres commented May 21, 2024

I agree that if Epochs can be built from durations directly, it's okay to get rid of all the from_xxx_seconds,nanoseconds .
This will reduce code quantity and improve maintainability. (you did great in cleaning up the Epoch module BTW).

Now we have Epoch::from_gregorian_str(x:x:x:x:x $TS) which is very convenient to parse formatted epochs in specific timescales. Ideally you want a mirror operation to go with that

@ChristopherRabotin
Copy link
Member

Hi Guillaume,
This feature is already available it seems, and tested in the regression_test_gh_288 specifically with the GPST from str. I will add another test on the branch for 331 now.

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 a pull request may close this issue.

2 participants