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

Export trajectory addition and frame conversion to Python #207

Conversation

ChristopherRabotin
Copy link
Member

Effects

Allows for this from Python:

    traj1_moon = traj1.to_frame("Moon J2000")
    traj2_moon = traj2.to_frame("Moon J2000")

    traj_moon = traj1_moon + traj2_moon

This feature was already available in Rust.

Breaking changes

  1. The addition operator in Rust now returns a Result type after checking for the frame. Prior to this PR, it was possible to add two trajectories in different frames.
  2. The order of addition matters: with self+rhs, only the states whose epoch is greater than self.last().epoch are added to the trajectory, so if there is an overlap in epochs, the order of the addition matters.

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

  • Yes, the branch I'm proposing to merge is called issue-xyz where xyz is the number of the issue.

If this change adds or modifies a validation case

  • No.

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Visit the preview URL for this PR (updated for commit 7cf59dd):

https://nyx-rustdoc--pr207-206-add-orbital-fram-rpexcd34.web.app

(expires Wed, 09 Aug 2023 22:01:52 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: d8e2a55934352d850c15d11866c39eb2d2e029be

@ChristopherRabotin ChristopherRabotin merged commit 615698e into master Aug 2, 2023
20 checks passed
@ChristopherRabotin ChristopherRabotin deleted the 206-add-orbital-frame-conversions-and-trajectory-addition-to-nyx-python-api branch August 2, 2023 23:00
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.

None yet

1 participant