Info sampling between propagation events

Hello everyone!

I want to use ElevationDetector. And when I have increasing == true event occured, I want to record, for example, SpacecraftState for every 1 second (or any step in general), until next event, which will be increasing == false. And do this for all pairs of increasing == true / increasing == false events during propagation.
How can I do this with Orekit?

Thank you in advance for your answers.

You have to set up an event handler and a step handler. The even handler must keep a reference to the event handler so it can for example call a method stepHandler.setSampling(true) at one event occurrence and stepHandler.setSampling(false) at the other occurrence. Then the step handler would know if it should write something or just return without writing anything.