Hi @ShikaDing, Hi Everyone,
After few tests it seems that the workaround poposed by @ShikaDing is not suitable for my issue. But maybe something is wrong with my code.
Let start with declaring a new class that inherits from PythonAttitudeProvider:
from org.orekit.attitudes import PythonAttitudeProvider
from org.orekit.frames import FramesFactory, LOFType
from org.hipparchus.geometry.euclidean.threed import Vector3D
class MyAttitudeProvider(PythonAttitudeProvider):
def __init__(self,params):
self.params = params
def getAttitude(self,pvProv, date, frame):
# code to compute a rotation object from the input arguments
return Attitude(date, frame, rotation.revert(), Vector3D.ZERO, Vector3D.ZERO)
Then create an instance of this class
In[1]: from MyAttitudeProvider import MyAttitudeProvider
In[2]: attProv = MyAttitudeProvider(1)
But surprisingly, the type of the instance attProv
is not the one I expected
In[3]: type(attProv)
Out[3]: jcc.FinalizerProxy
At this step, I am little bit lost because of the following surprising behaviour.
In one hand, no exception is raised while constructing others objects like org.orekit.forces.maneuvers.Maneuver. On the other hand, the Maneuver.getAttitudeOverride()
return a null object. Consequently, the maneuver does not provide the expected acceleration during the propagation.
Maybe @petrus.hyvonen or @ShikaDing or anyone in the community, can you help me to understand this issue and find a way to overcome this drawback.
Best regards to the community
Christophe