Missing some orbital paramenters in get Orbit: Keplerian

Hi, after updating to Orekit 12 some “get” + orbital parameters, are missing like:

getRightAscensionOfAscendingNode
getPerigeeArgument()
getTrueAnomaly()

Here the code example:

keplerianOrbit_iod
Out[98]: <Orbit: Keplerian parameters: {a: 6936461.235518173; e: 4.7273697557608614E-4; i: 97.383683909522; pa: 69.8666502137353; raan: -64.37416053444586; v: 9.820049447832053;}>


keplerianOrbit_iod.getA()
Out[101]: 6936461.235518173

keplerianOrbit_iod.getRightAscensionOfAscendingNode()
Traceback (most recent call last):

  Cell In[102], line 1
    keplerianOrbit_iod.getRightAscensionOfAscendingNode()

AttributeError: 'Orbit' object has no attribute 'getRightAscensionOfAscendingNode'

Many thanks for your time and help
Kind Regards

Hello @AlessandroV,

Cause

These methods were already not available in the Orbit class as you can see when comparing these documentations:
https://www.orekit.org/site-orekit-11.3.3/apidocs/org/orekit/orbits/Orbit.html
https://www.orekit.org/site-orekit-12.1.2/apidocs/org/orekit/orbits/Orbit.html

However, this is indeed due to a change in the output type of the IOD method you are using. It initially returned a KeplerianOrbit but in the 12.0 version, it returns an Orbit.

Solution

You can simply convert your orbit to a Keplerian one using :

converted_orbit = KeplerianOrbit.cast_(OrbitType.KEPLERIAN.convertType(keplerianOrbit_iod))

Cheers,
Vincent

ok thank you very much

1 Like