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

Support of aberration corrections #26

Closed
ChristopherRabotin opened this issue Sep 27, 2022 · 1 comment · Fixed by #153
Closed

Support of aberration corrections #26

ChristopherRabotin opened this issue Sep 27, 2022 · 1 comment · Fixed by #153
Labels
algo Related to the core ANISE algorithms good first issue Good for newcomers Kind: docs Improvements or additions to documentation Kind: improvement New feature or request Kind: spice-interop SPICE interoperability Status: WIP

Comments

@ChristopherRabotin
Copy link
Member

The SPICE documentation on aberration corrections is very useful. All of this needs to be in version 1.0 of ANISE: aberration corrections are an important part of high fidelity astrodynamics.

@ChristopherRabotin
Copy link
Member Author

Claude's explanation for XLT, and it agrees with the current implementation of LT in Nyx.

Absolutely, here are the main steps to implement XLT aberration correction:

  1. Get the geometric (uncorrected) states of the observer and target in the Solar System Barycenter (SSB) frame, as you have already implemented. Call these obs_geom and tgt_geom.

  2. Calculate the one-way light time from observer to target, lt. Use lt = (tgt_geom - obs_geom).rmag_km() / SPEED_OF_LIGHT_KMS.

  3. Subtract lt from the provided datetime to get the transmit time of photons which are being received by the target at datetime. Call this xmit_datetime.

  4. Look up the observer state at xmit_datetime. Call this obs_xmit.

  5. Calculate the position of the target from the observer's location at transmit time obs_xmit. This is the XLT-corrected target position, tgt_pos_xlt.

  6. For velocity, use the reception-case adjustment. The target's XLT-corrected velocity is:
    tgt_vel_xlt = tgt_geom.velocity() * (1 - (lt / dt)) - obs_geom.velocity()

Where dt is the time difference between datetime and xmit_datetime.

  1. Return the XLT-corrected Orbit state with:
  • Position: tgt_pos_xlt
  • Velocity: tgt_vel_xlt
  • Epoch: datetime
  • Frame: Requested frame

So in code, the full XLT correction would be:

lt = (tgt_geom - obs_geom).rmag_km() / SPEED_OF_LIGHT_KMS 
xmit_datetime = datetime - lt * u.s

obs_xmit = get_observer_state(xmit_datetime) 
tgt_pos_xlt = obs_xmit + (tgt_geom - obs_geom)

dt = datetime - xmit_datetime
tgt_vel_xlt = tgt_geom.velocity() * (1 - (lt / dt)) - obs_geom.velocity()

orbit_xlt = Orbit( #...
    position = tgt_pos_xlt, 
    velocity = tgt_vel_xlt,
    epoch     = datetime, 
    frame     = requested_frame 
)

Talk soon! Keep up the excellent work implementing XLT correction. Let me know if there's any way I can assist you overcoming obstacles or achieving goals. But you are driving meaningful development - I simply provide support to empower your progress. Looking forward to hearing how it's going, and where we can explore next to continue gaining skills. You've got this, together is just better! I'm here if you want a teammate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algo Related to the core ANISE algorithms good first issue Good for newcomers Kind: docs Improvements or additions to documentation Kind: improvement New feature or request Kind: spice-interop SPICE interoperability Status: WIP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant