In similar classes, such as the AngularSeparationDetector class, the beacon and observer were expected as PVCoordinatesProvider type. This enabled me to use satellite propagators as beacons
However, now with the ExtremumAngularSeparationDetector class, I have failed to make it work with beacons in the form of satellite propagators. It does work with celestial bodies as they use the ExtendedPositionProvider type, but propagators seems to be adapted for PVCoordinatesProvider type.
I tried different casting options but has not got it to work. Also tried the FrameAdapter class on the TEME frame of the satellite, but I am not sure if this is the correct approach.
Have I missed something? I assume the ExtremumAngularSeparationDetector class is not only for celestial bodies?
The rationale for this type of input is that this detector’s event function needs first order time derivatives and they are computed using automatic differentiation. In Orekit this is done by using Hipparchus CalculusFieldElement.
You can build your own ExtendedPositionProvider
For example with a target following a Keplerian orbit, the standard methods will wrap a KeplerianPropagator whilst the Field method will wrap a FieldKeplerianPropagator.
Arguably we could add a native method in Orekit to obtain an ExtendedPositionProvider from an interpolated ephemeris or something.
Thank you both for your replies! Following your comments, I will pause my implementation of the new ExtremumAngularSeparationDetector until the discussed native method is available.
I will regularly check this thread if any updates towards that end is in progress.
Building an ExtendedPositionProvider from ephemerides is not very straightforward. I’ll need to think more about it.
However, building them for pure Keplerian motion or SGP4 is both easy to implement and use. So I’ve already pushed on develop the former (you only need an Orbit) and I’ll do later the latter (for which only a TLE is required). Hopefully that should already cover some use cases.
As I said, ExtendedPositionProvider from TLE and Orbit are already available on the develop branch. You can use them in the Jpype wrapper if you replace the jar by the 14.0-SNAPSHOT one. I don’t think I’ll have time to do anything else on the subject before the release, my TODO list is long.