[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orekit Users] Issue with EventState/Propagator/Elevation Detector - HELP!!
Jim,
On Mon, 2017-05-01 at 20:47 +0200, schatzman-james@n-ask.com wrote:
Update-
Well, this was mostly my fault. I did not understand the order of events in
the Propagator and detection sequence. There does not seem to be any mechanism
to record the elevation at the critical times event ElevationDetector events
are detected, although they are close to the set threshold. The
EventState.evaluateStep method finds the critical time (e.g., when the
elevation rises above or falls below the critical inclination) and records it
in pendingEventTime/getEventDate(). However, the actual elevation at that time
is not recorded.
The actual elevation at that time is the user provider elevation threshold to within the user provider tolerance. Keep in mind that the tolerance is on the independent variable (time) not on the dependent variable (elevation). If you need a more precise
value of the elevation threshold you can use a smaller tolerance. Or you could compute the elevation in the eventOccurred() method in your EventHandler.
Another issue is what happens when the threshold is exceeded at either end of
the propagation interval. That starting or ending interval is not recorded by
the tutorial EventHandler.
That is correct. An event is defined to occur when the g function crosses zero. If there is no zero crossing then there is no event to record. See [1]
In other words, if what you want is a complete list of all periods between the
current date and the propagate end date where the elevation exceeds the
threshold, the tutorial code will not do this because it does not report
intervals that include either the initial or the final propagation date. It
appears that events should be generated at the initial and final propagation
dates for any elevations exceeding the threshold.
If you need to know the initial sign of the g function simply use the 'increasing' parameter to eventOccurred(). If for the first event 'increasing' is true then you know the g function was initially <=0 and vice versa. Similarly if at the end of propagation
if the last event was an increasing event then the g function is still positive. Events are guaranteed to occur in an alternating increasing / decreasing sequence.
Please submit an update for the documentation if you find it unclear or submit some helper code to do as you describe if you think it would be a useful addition to the Orekit library.
Best Regards,
Evan