anise icon indicating copy to clipboard operation
anise copied to clipboard

Transformation through two or more barycenters may be incorrect

Open ChristopherRabotin opened this issue 1 year ago • 0 comments

Bug report

Describe the bug

When computing the sun vector for a Moon orbiter, the translation seems to skip a barycenter transformation.

To Reproduce

  1. Download an LRO BSP from https://naif.jpl.nasa.gov/pub/naif/pds/data/lro-l-spice-6-v1.0/lrosp_1000/data/spk/
  2. Compute the state of LRO with respect to the Sun
  3. Note that the distance is far from correct

The temporary fix is to compute the state of the orbiter to the Earth J2000 frame and then request the state from the Earth J2000 frame to the Sun j2000 frame, and add both vectors.

Expected behavior

The norm of the distance should be on the order of 150 million kilometers, but it is not.

ChristopherRabotin avatar Aug 02 '24 01:08 ChristopherRabotin