Hi Orekit community,
Nowadays, I am working with Orekit through the python wrapper.
I encounter a specific issue while trying to code class that directly implement Orekit interface. For instance, I tried to implement ThrustDirectionProvider interface as following:
class MySupaDupaThrustDirectionProvider(ThrustDirectionProvider):
def __init__(self):
pass
def computeThrustDirection(self,pvProv, date, frame):
... # Some interesting ccode
return directionVector
Then I create an instance of it:
attitudeProv = MySupaDupaThrustDirectionProvider()
However, when I try to use it for creating other object,
attitudeProvider = ThrustDirectionAndAttitudeProvider.buildFromDirectionInLOF(localFrame, attitudeProv, thrusterAxisInBody)
I obtain the following stack or errors:
orekit.JavaError: <super: <class 'JavaError'>, <JavaError object>>
Java stacktrace:
org.orekit.errors.OrekitException: Le paramètre variableDirectionInFrame de ThrustDirectionAndAttitudeProvider-DIRECTION_IN_LOF est null
at org.orekit.forces.maneuvers.propulsion.ThrustDirectionAndAttitudeProvider.checkParameterNotNull(ThrustDirectionAndAttitudeProvider.java:136)
at org.orekit.forces.maneuvers.propulsion.ThrustDirectionAndAttitudeProvider.buildFromDirectionInLOF(ThrustDirectionAndAttitudeProvider.java:204)
Moreover, when I check on the object type in the console, I get
>>>> isinstance(attitudeProv,ThrustDirectionProvider)
True
but in the same time the variable point to null
>>>> attitudeProv
<attitudeProv: <null>>
while I expecting something like <MySupaDupaThrustDirectionProvider : MySupaDupaThrustDirectionProvider.MySupaDupaThrustDirectionProvider@xxxxxxxxxx>
My observation is that the object is clearly recognized as an implementation of the interface but it is not initialized.
In my understanding, It comes from the fact, that I try to implement in Python an class that is actually a Java interface. I try to implement other interfaces and the observations is quite the same.
I hope that the community can help me with issue
Best regards
Christophe