Parallel Propagation

Hello everyone,

I’m fairly new to Orekit (and also to Python and Java for that matter :sweat_smile:), I’ve been fiddling with it for like a month now.
I’m trying to implement a way to parallelize the propagation of the same orbit subject to different manoeuvres and observing the results. I’m trying to use PropagatorsParallelizer to do this. However, I need to attach to my propagators a custom distance detector that in the “non parallel case” stops the propagation after a certain event. Reading more on PropagatorsParallelizer I discovered that this would result in all propagators stopping as soon as one of them triggers its detector.
What I need instead is each propagator stopping upon reaching its corresponding event. Alternatively, if that’s not possible, what could also work for me is being able to access each distance detector (without stopping the propagation) and use each propagator’s event at a “global level” (i.e. being able to access the distance evaluated from each propagator after using the parallelizer).
Is this possible? How would the MultiSatStepHandler need to look like in order to do this?

Thanks in advance!

Best regards,
Emiliano

Hi @Emiliano

I am not sure to understand the use case.

PropagatorsParallelizer is intended to synchronize propagations when one needs to do some computations between all propagators throughout the computation. If one propagator stops, it cannot be used with the other ones, so we stop everything to guarantee the MultiSatStepHandler will always have all states available on the complete step time range.

So if you need to have all propagators continue even after the events, I would suggest to change the event handler so it does not stop after the maneuver.

What is the distance detector you are talking about? If it is something like and inter-satellite distance between two different configurations, just using the spacecraft states you get from the list of interpolators in MultiSatStepHandler and using Vector3D.distance pairwise may be sufficient.

Another point is that if you use several propagations just to sample out and model the effect of some maneuvering parameters, you may want to look at Taylor algebra and use a single propagation with partial derivatives related to the parameter you want. This will give you a full Taylor series at the end of the single propagation. It is not really easy to do and works only if the parameter you are interested in can be set using a ParameterDriver. This is possible for example for start and stop time of maneuvers since Orekit version 11.1 (see DateBasedManeuverTriggers).

Hi @luc,

The distance detector I’m referring to is evaluating the distance of the satellite from an external object on its own orbit. I already modified my distance detector so as not to stop the propagations. However, I don’t know how to access from the MultiSatStepHandler each event triggered by the detectors.

Your last suggestion on using Taylor algebra could be very useful to me since my parameters are indeed start and stop time for the manoeuvres. I’ll look into it and see if that will do the job.

Thank you very much!

One way to access the detectors from the MultiSatStepHandler is to keep a list of references to the detectors in the handler directly. You can populate the list while you are creating the various propagators, and then pass it to the handler constructor.