I have recently been trying to reproduce GRAIL-A’s trajectory as accurately as possible. To that extent, I was first looking for a source of state vectors as accurate as possible. I asked about this a while ago on SE exchange, and from the replies I got, it seems the best option would be the SPK kernels from here.
So I used my previous implementation in Orekit of SPK readers (see this MR) to read the SPK kernels for the 3rd-11th of April 2012. As far as I have read, this was a period where there was no manoeuvres, so it should make an easier starting point.
As a side note, I have verified that the results obtained when reading SPK kernels with my java implementation match exactly those obtained with CSPICE and with another previous implementation in R by myself, so the extracted reference positions and velocities should be correct.
From reading the kernels as well, it can be seen that the provided reference state vectors are in a frame of class 1 with a central body with NAIF code 301. So the state vectors are given in ICRF centered in the Moon.
So for a first test, I have tried to set up a numerical propagator considering only Moon spherical harmonics. I am currently using the
GRGM1200B model.
Using up to degree and order of 350 and propagating for a bit less than 2 hours, I get a final position error of over 1200 m, which seems too high to me. I have also done a plot of the position error versus time (using as propagation targets the epochs of each extracted reference state vector), and get the attached.
I have also attached my current attempt at setting this up. When setting up the SPH force model for the Moon, I’ve given the inertial frame centered on the Moon as the frame for the HolmesFeatherstoneAttractionModel as suggested in this answer. From the documentation here it says to use a rotating frame though, so just in case I also tried the default non-inertial frame centered on the Moon, but that didn’t help either.
The propagation error is too high I’d say, and I feel like I’m missing something very basic here! So any insights would be very appreciated
Thanks a lot!
App.java (8.1 KB)