AOLEvent 4.1 : Différence entre versions

De Wiki
Aller à : navigation, rechercher
(Page créée avec « <syntaxhighlight lang="java"> public class AOLEvent { public static void main(String[] args) throws PatriusException { // AOL event with default values... »)
 
(Aucune différence)

Version actuelle en date du 18 décembre 2018 à 10:20

public class AOLEvent {
 
    public static void main(String[] args) throws PatriusException {
 
        // AOL event with default values
        final AnomalyDetector aolEvent1 = new AnomalyDetector(PositionAngle.TRUE, FastMath.PI);
 
        // Same event with customized convergence values
        final double maxCheck = 0.5 * AbstractDetector.DEFAULT_MAXCHECK;
        final double threshold = 2. * AbstractDetector.DEFAULT_THRESHOLD;
        final AnomalyDetector aolEvent2 = new AnomalyDetector(PositionAngle.TRUE, FastMath.PI, maxCheck, threshold);
 
        // Same event with customized convergence values and specifying the action to be done when events occured
        final AnomalyDetector aolEvent3 = new AnomalyDetector(PositionAngle.TRUE, FastMath.PI, maxCheck, threshold, Action.STOP);
 
        // Same event with customized convergence values, specifying the action to be done when events occured
        // and specifying the event is removed once it is occured
        final AnomalyDetector aolEvent4 = new AnomalyDetector(PositionAngle.TRUE, FastMath.PI, maxCheck, threshold, Action.STOP, true);
 
        System.out.println("Anomaly of the event: " + FastMath.toDegrees(aolEvent4.getAnomaly()) + " deg");
        System.out.println("Anomaly of the event: " + aolEvent4.getAnomalyType());
        System.out.println("Max check interval of the event: " + aolEvent4.getMaxCheckInterval() + " s");
        System.out.println("Threshold of the event: " + aolEvent4.getThreshold() + " s");
        System.out.println("Remove the event after occuring: " + aolEvent4.shouldBeRemoved());
        System.out.println();
        System.out.println("Slope selection of the event: " + aolEvent4.getSlopeSelection());
        System.out.println("Max iteration count of the event: " + aolEvent4.getMaxIterationCount());
 
    }
 
}