My team has been experimenting with Orekit and building a few scenarios.
We are using a GroundFielOfViewDetector to check when a Sat is passing trough certain point of earth at a given date range.
The scenario where we have the Sat enter and exit the area during the times works perfectly.
Now, the one we have not find a solution is the one where the Sat is already within the FOV already at the date range provided.
if the Sat position is already in, we get one event if it goes out during the date range
if the Sat goes in during the range we get an event, but if is not out by the end of the range we dont get another event.
If the Sat is inside the area during the whole date range, then we have nothing.
I understand why, but we want something different.
This probably a very long way to ask:
If the sat is already inside the fov at the start of the date range we want to know at what time it went in.
If the sat is inside the fov at the end of the date range we want to know at what time it will go out
Is there an Orekit out of the box method/class that would help us? Or is this something we need to do by hand. We dont mind coding this problem, but we want to use as much out of the box Orekit methods/classes as possible
Hi @jrivera, welcome
Events are detected only within the time range of the propagation. It is a design feature. In operational systems, for example, where events prediction is run periodically, you don’t want do get once again the events you already handled in the previous run on the previous time range. Another classical case is when propagation is split exactly on event dates (i.e. one event generate an Action.STOP action when
eventOccurred is called), then the event is triggered in the propagation that will be stopped, and it will be skipped over in the next propagation (note that I explicitly did not use terms like ‘before event’ or ‘after event’ because this behaviour also works when propagating backward). So as a summary, if an event is outside of the propagation time range, it will not be detected, and this is intentional. We cannot arbitrarily extend a propagation range to get a missed event (maybe there is a maneuver just outside of the propagation range, so extending it blindly would give wrong results).
So in your case, you will have to do something by yourself. First of all, you need to check the value of the
GroundFielOfViewDetector g function at initial/final state. If it is negative, it means your are within the field of view, hence you have missed an event. In this case, you should just start a new propagation say for one Keplerian period or any sensible duration, backward starting from initial state or forward starting from final state and grab only the first event to add it to the list the first propagation provided you. Of course, if you do this, it assumes you know how to configure the propagator outside of your initial search range, and as explained in the previous paragraph, you have for example to take maneuvers into account if there are some.