Propagation of GRAIL-A

Hi @Rafa,
sorry if I did not update you on the results from your implementation of the reader of the SPK kernels, unfortunatively I got quite busy with LEOP activities.
I can confirm you that when comparing the results from the propagation between Orekit and GMAT (using the native implementation of the SPK Kernels) the two are quite well aligned.
I set up the HolmesFeatherstoneAttarctionModel with the moonPA reference frame, which is constructed starting from the precise pole position and principal axis orientation obtained with your readers ( see our old discussion Updates for High Fidelity Heliocentric Propagation - #36 by Rafa) .
Here after an example code on how I have defined the moonPA reference frame.

First I define the position of the Frame (which I am sure I have used a way too complicated method)

public class LME2000PositionProvider implements TransformProvider{
    Frame ref; 
    
    public LME2000PositionProvider(Frame ref){
        this.ref = ref; 
    }
    @Override
    public Transform getTransform(AbsoluteDate date) {
        final Vector3D translation11 = CelestialBodyFactory.getMoon().getPVCoordinates(date,ref).getPosition().negate();
        final Vector3D velocity11 = CelestialBodyFactory.getMoon().getPVCoordinates(date,ref).getVelocity().negate();
        return new Transform(date,translation11,velocity11);
    }

    @Override
    public <T extends CalculusFieldElement<T>> FieldTransform<T> getTransform(FieldAbsoluteDate<T> date) {
        // Compute Field Translation 
        final FieldVector3D<T> translation = CelestialBodyFactory.getMoon().getPVCoordinates(date,ref).getPosition().negate();
        final FieldVector3D<T> velocity = CelestialBodyFactory.getMoon().getPVCoordinates(date,ref).getVelocity().negate();
        return new FieldTransform<>(date, translation, velocity);
    }

Then I define the Frame MoonPA as:

   public static Frame getMoonPA() {
       // Create a Moon-centered frame using the LME2000 position provider
       Frame moonCentered = new Frame(inertialFrame, new LME2000PositionProvider(inertialFrame), "moonCentered", true);
       
       // Define the MoonPA frame with a Moon Principal Axes (PA) rotation provider
       Frame MoonPA =  new Frame(moonCentered, new MoonPaRotationProvider(moonCentered), "MoonPA", true);
       
       return MoonPA; 
   }

The Rotation provider for now uses TabulatedProvided to define the orientation of the MoonPA ref frame wrt the ICRF frame.

1 Like