Event occurred at the first step

Hello all,
I have created my own detector to detect the inter-satellite communications (given in TLEs). And it worked. But, when I tried using some other tle data, it failed detecting. I simulated them with STK. The result was the event happened at the start time of the scenario time. So, how can I fix this?

This is a feature.
The rationale behind this design choice is that users sometimes propagate orbits up to some event, have the propagation stop exactly at this event, and then restart. This choice avoids being stuck in an infinite loop.

Hi, @luc.
I am doing things like this. The two satellites can communicate with each other the whole time. So, according to your reply, is this means I cannot detect the access time.
Thanks for your reply.

No, it just means that if you do several propagations in a row, the event will be handled by the first propagator (and end its propagation), not by both propagators, hence avoiding being stuck in an infinite loop of propagators ending as soon as they start after 0s of propagation.
In such a case, as you do have some logic on top of the propagators to manage them, then you should manage at top level the discontinuity you introduce yourself, the propagators at the lower level of your loop cannot guess what you want to do.

I think in such a case, it is far simpler to not stop propagation so the events arrive sometime during propagation and are handled properly. There is a huge and complicated amount of logic in the propagators to handle events, including simultaneous events, events that reset the state, events that disappear because an earlier event in the same step changed the state, events that stop the propagation… Reproducing such logic in a top level loop you would manage above the propagator is possible, but difficult, so I would advise to look if you can just avoid that, and then the problem will disappear. If you cannot avoid that and still need to loop over propagators, then you should probably store somewhere the information that one propagator detected the event just before stopping, and pass this information to the next propagator.

Also note that event detectors only detect events. If you want to determine the access intervals you’ll have to handle the case where there are no events and decide whether that means there is always access or never access.

Well, thank you all for answering me. I will try to figure this out by your advice :smiley: