nyx-space / nyx

Nyx is a high fidelity, fast, reliable and validated astrodynamics toolkit library written in Rust and available in Python
https://nyxspace.com
GNU Affero General Public License v3.0
198 stars 20 forks source link

Have Frame implement Default #222

Closed gwbres closed 1 year ago

gwbres commented 1 year ago

Effects

If this is a new feature or a bug fix ...

If this change adds or modifies a validation case

ChristopherRabotin commented 1 year ago

In what cases do you need a default for Frame? Is it to create a default orbit?

The issue is that the frame contains the gravity information for the central object of the orbit, along with flattening values, and the "paths" in the ephemeris file. All of this will be made obsolete when I get ANISE working and integrated in Nyx in the next few weeks hopefully.

gwbres commented 1 year ago

Hello @ChristopherRabotin,

In what cases do you need a default for Frame? Is it to create a default orbit?

My use case is, when parsing files that describe several possible Reference Frames, like ITRF08, ITRF15... is how to provide a default case and avoid a panic!. Does that make sense ?

ChristopherRabotin commented 1 year ago

I understand. The function should return an error if that frame does not exist because if it doesn't stop at initialization, it will panic later if the frame information is needed for any computations.

ChristopherRabotin commented 1 year ago

I'll close this for now but we can revisit this after #86 .

gwbres commented 1 year ago

Hello @ChristopherRabotin,

the function should return an error if that frame does not exist because if it doesn't stop at initialization, it will panic later if the frame information is needed for any computations

That make a lot more sense than my initial plan.