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

Open
gwbres opened this issue Aug 30, 2023 · 4 comments
Open

from_gregorian but in GPST #257

gwbres opened this issue Aug 30, 2023 · 4 comments

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

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

No branches or pull requests

2 participants