Search in sources :

Example 1 with LatitudeExtremumDetector

use of org.orekit.propagation.events.LatitudeExtremumDetector in project Orekit by CS-SI.

the class AlongTrackAiming method findHalfTrack.

/**
 * Find the ascending or descending part of an orbit track.
 * @param orbit orbit along which tiles should be aligned
 * @param ellipsoid ellipsoid over which track is sampled
 * @param isAscending indicator for zone tiling with respect to ascending
 * or descending orbits
 * @return time stamped ground points on the selected half track
 * @exception OrekitException if some frame conversion fails
 */
private static List<Pair<GeodeticPoint, TimeStampedPVCoordinates>> findHalfTrack(final Orbit orbit, final OneAxisEllipsoid ellipsoid, final boolean isAscending) throws OrekitException {
    // find the span of the next half track
    final Propagator propagator = new KeplerianPropagator(orbit);
    final HalfTrackSpanHandler handler = new HalfTrackSpanHandler(isAscending);
    final LatitudeExtremumDetector detector = new LatitudeExtremumDetector(0.25 * orbit.getKeplerianPeriod(), 1.0e-3, ellipsoid).withHandler(handler).withMaxIter(100);
    propagator.addEventDetector(detector);
    propagator.propagate(orbit.getDate().shiftedBy(3 * orbit.getKeplerianPeriod()));
    // sample the half track
    propagator.clearEventsDetectors();
    final HalfTrackSampler sampler = new HalfTrackSampler(ellipsoid);
    propagator.setMasterMode(handler.getEnd().durationFrom(handler.getStart()) / SAMPLING_STEPS, sampler);
    propagator.propagate(handler.getStart(), handler.getEnd());
    return sampler.getHalfTrack();
}
Also used : KeplerianPropagator(org.orekit.propagation.analytical.KeplerianPropagator) Propagator(org.orekit.propagation.Propagator) KeplerianPropagator(org.orekit.propagation.analytical.KeplerianPropagator) LatitudeExtremumDetector(org.orekit.propagation.events.LatitudeExtremumDetector)

Aggregations

Propagator (org.orekit.propagation.Propagator)1 KeplerianPropagator (org.orekit.propagation.analytical.KeplerianPropagator)1 LatitudeExtremumDetector (org.orekit.propagation.events.LatitudeExtremumDetector)1