How to find eclipse status given SpacecraftState

Given a single SpacecraftState, how can I find out if the object is in umbra at that time without propagating and using an EclipseDetector?

Hi @howdoidothis,

Welcome in the Orekit forum!

You can just call the g function of the detector and look at the sign: detector.g(state)

According to its Javadoc, the function becomes negative when entering the region of shadow and positive when exiting.

Now, if you don’t want to use the detector, you can simply look at and reuse the implementation of the g function.

Regards,
Bryan

I’m a little embarrassed to have missed that in the documentation. This was exactly what I was looking for. Thanks for the quick answer!