after reading official frames tutorial, I have been trying to build a custom MarsICRF frame and convert vectors w.r.t. this frame into the MarsFIXED one (this last frame is already implemented in Orekit following IAU definitions.)
I’ve created an small script, which runs on the following steps:
- Compute the actual location of Mars barycenter in ICRF frame.
- Define de MarsICRF as a pure translation of ICRF but centered in previously computed planet position.
- Get MarsFIXED frame and compute transformation MarsICRF → MarsFIXED.
- Check if vectors are properly converted comparing against GMAT expected output.
My implementation can be found here: Converts from custom MarsICRS to MarsFixed using Orekit API · GitHub
I define the following position vector w.r.t. MarsICRS:
POS = Vector3D(float(7000e3), float(5000e3), float(200e3)) # [m]
The computed and expected results w.r.t. MarsFIXED are as follows:
computed_pos = [292696819883.6013, -234324874333.56342, -175803942360.86267] expected_pos = [-8471116.77589713, 845074.9156806216, 1251410.786458257]
I am definitely missing something, as the position vector predicted by my implementation is extremely huge… May anyone guide me through this or give me a hint? Any kind of help is welcomed.
Thank you in advance for your time!