Implementing interfaces from Hipparchus

Hey there,

I’m trying to implement a Java Interface (namely OrdinaryDifferentialEquation) from Hipparchus with the Python wrapper, but I’m getting a Null pointer exception when I use an instantiation. I read here that to implement a class Y from Orekit, one should use the PythonY version. Is that always the case? What if the Java class of interest does not have this Python counterpart?

Cheers,
Romain.

Hi Romain,

You are right, in order to implement the interfaces in the standard orekit you need to use the PythonY counterpart class. For this these needs to be included in the python-orekit-jar as special classes.

Add a ticket on the python-orekit-wrapper gitlab repo, on which interfaces you would need and I can add them for next release of the conda package, or we make a build release with these included.

As mentioned in some other threads, there is also an alternative implementaiton of orekit based on jpype that is still quite untested and misses the capabilitiy to subclass fully, but can deal with interfaces directly without any need of special classes. Depending on your usecase and a bit rough, it can be something to have a look at it, Files · master · Petrus Hyvönen / orekit_jpype · GitLab

Regards
/Petrus

Hi Petrus,

thanks for all the info.
I ended up using PythonFieldAdditionalDerivativesProvider, because there does not seem to be a PythonAdditionalDerivativesProvider, so I will open a ticket about that.

Cheers,
Romain.