Giter Site home page Giter Site logo

Comments (1)

ChristopherRabotin avatar ChristopherRabotin commented on June 12, 2024

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.

from anise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.