Eclipse with two occulting bodies

Hi guys,

I am trying to compute moon eclipse events but the ending time is wrong. In the example below, I would expect the Moon Eclipse to end at 19:19:32, coincidentally with the start of the Earth eclipse. It doesn’t look like I can configure two occulting bodies in the EclipseDetector. I suppose that the only possibility is to build more logic on top of the results returned by Orekit (I am using the python wrapper), or build a custom EventDetector, right?

2022-04-30 19:04:50.567702 2022-04-30 19:23:16.531051 MOON ECLIPSE 1105.963
2022-04-30 19:19:31.954416 2022-04-30 19:51:18.964730 EARTH ECLIPSE 1907.010


Hi @ramihoudroge, nice to see you again!

You are right, EclipseDetector handles one occulting body at at time.
You can look at AbstractRadiationForceModel where several occulting bodies can be used. By default only one body is used, but the addOccultingBody can be called several time. This was needed for example to take into account Sun Eclipses by the Moon in GNSS contexts. This is implemented simply by adding a new detector for each added body.

Hi @luc , thanks for your answer! It is nice to play with Orekit again :wink:
I’ll give it a try and will let you know how it goes.