Maximum Elevation and EventEnablingPredicateFilter

Hello,

I have code to determine the maximum elevation during a ground station visibility period. Within the propagation I’ve provided an ElevationDetector for AOS/LOS times, and a ElevationExtremumDetector for getting the maximum elevation during the individual visibility periods. Since ElevationExtremumDetector passes both the negative and positive extrema I originally simply put an if… statement in the handler to only process elevations that were > 0. This worked just fine.

On looking through posts here I learned about the EventEnablingPredicateFilter and wanted to implement it for this case. I removed the “if” statement from the handler, and created the following:

public class MaximumElevationEnablingPredicate implements EnablingPredicate {
  @Override
  public boolean eventIsEnabled(SpacecraftState state, EventDetector detector, double g) {
    ElevationExtremumDetector elevationExtremumDetector = (ElevationExtremumDetector) detector;
    double elevation = elevationExtremumDetector.getElevation(state);
    return elevation > 0;
  }
}

The filter is added to the propagator as follows:

    MaxElevationHandler maxElHandler = new MaxElevationHandler(groundStation);
    ElevationExtremumDetector maxElDetector = new ElevationExtremumDetector(groundStationFrame).withHandler(maxElHandler);
    MaximumElevationEnablingPredicate maxElEnablingPredicate = new MaximumElevationEnablingPredicate();
    EventEnablingPredicateFilter maxElEnablingPredicateFilter = new EventEnablingPredicateFilter(maxElDetector, maxElEnablingPredicate);
    propagator.addEventDetector(maxElEnablingPredicateFilter);

This doesn’t seem to work properly. While most visibility arcs have a maximum elevation associated with them, some do not. There doesn’t seem to be any particular commonality between the events without a maximum elevation detected and those with. The ones missed are rather low elevation events (6.1 and 1.1 degrees max elevation) but it catches one that is almost at the horizon (0.8 deg max elevation). The ground stations all have simple circular masks of 0 deg elevation and the satellite is in a LEO orbit, so visibility periods are on the order of minutes.

Am I using the EnablingPredicate interface correctly?

Hi,

It could just be that the event function is not evaluated frequentlly enough. In Orekit this is tuned with the so called max. check which can be a constant or a function via the interface AdaptableInterval.
What’s the half duration for your shortest pass? Use it on your extremum elevation detector.
If could slow down your calculation tho, so another solution is to remove the PredicateFilter and post process the events, selecting only the maximum elevation within your passes

Cheers,
Romain.

Thanks for the quick response.

Yes, that was it. I changed the max check to 100 s and now I can get all the max elevation reports I was expecting.

Thanks again,

Greg.