Issue using TLEPropagator.getPVCoordinates() in Python Wrapper 12.2

I recently upgraded my Python wrapper version to the new 12.2 Orekit and am now getting the following error:
Exception has occurred: AttributeError 'super' object has no attribute 'getPVCoordinates'
This is from the following block of code:

self.tleEnvisat = TLE("1 27386U 02009A   17238.87724141 +.00000000 +00000-0 +13804-4 0  9992",
                             "2 27386 098.2254 281.1813 0001340 081.3267 278.8065 14.37901343811233")
self.initialDate = self.tleEnvisat.getDate()
self.initialOrbit = CartesianOrbit(TLEPropagator.selectExtrapolator(self.tleEnvisat).getPVCoordinates(self.initialDate,Common.inertialFrame),
                                               Common.inertialFrame,self.initialDate,Common.muEarth) 

I spent some time in the debugger trying to figure out some ways to make this work, and it does work if I use the getPVCorrdinates(AbsoluteDate) overload, but won’t work with getPVCoordinates(AbsoluteDate,Frame), which is what I need, so that I can get TimeStampedPVCoordinates.

My Common.inertialFrame here is FactoryManagedFrame: EME2000. So I tried using a Frame object directly, but that still gave the same error.

From this, it seems that Python isn’t recognizing the overload method in TLEPropagator that includes the Frame object input, but I could be doing something wrong. Is there anything I can do, or maybe that I am doing wrong?

Hello @rhooper,

I think you have to cast the TLEPropagator instance coming out of TLEPropagator.selectExtrapolator(self.tleEnvisat) to PVCoordinatesProvider to have access to the getPVCoordinates​(AbsoluteDate date, Frame frame) method signature (see PVCoordinatesProvider (OREKIT 12.2 API)).

You seem familiar with the Python wrapper but for beginners reading this, i highly recommend to see this documentation : examples/1_The_Basics.ipynb · master · Orekit Labs / Orekit Python Wrapper · GitLab

Cheers,
Vincent

2 Likes

Hello @Vincent. That worked. Thank you for the help and the quick response!

1 Like