org.orekit.propagation.events
Class AlignmentDetector

java.lang.Object
  extended by org.orekit.propagation.events.AbstractDetector
      extended by org.orekit.propagation.events.AlignmentDetector
All Implemented Interfaces:
Serializable, EventDetector

public class AlignmentDetector
extends AbstractDetector

Finder for satellite/body alignment events.

This class finds alignment events.

Alignment means the conjunction, with some threshold angle, between the satellite position and the projection in the orbital plane of some body position.

The default implementation behavior is to stop propagation when alignment is reached. This can be changed by using provided constructors.

Author:
Pascal Parraud
See Also:
Propagator.addEventDetector(EventDetector), Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.orekit.propagation.events.EventDetector
EventDetector.Action
 
Field Summary
 
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
 
Fields inherited from interface org.orekit.propagation.events.EventDetector
DECREASING, INCREASING, INCREASING_DECREASING
 
Constructor Summary
AlignmentDetector(Orbit orbit, PVCoordinatesProvider body, double alignAngle)
          Build a new alignment detector.
AlignmentDetector(Orbit orbit, PVCoordinatesProvider body, double alignAngle, double threshold)
          Build a new alignment detector.
AlignmentDetector(Orbit orbit, PVCoordinatesProvider body, double alignAngle, double threshold, EventDetector.Action actionStart, EventDetector.Action actionEnd)
          Build a new alignment detector.
AlignmentDetector(Orbit orbit, PVCoordinatesProvider body, double alignAngle, double threshold, EventDetector.Action actionStart, EventDetector.Action actionEnd, boolean removeStart, boolean removeEnd)
          Build a new alignment detector.
 
Method Summary
 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
          Handle an alignment event and choose what to do next.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 double getAlignAngle()
          Get the alignment angle (rad).
 PVCoordinatesProvider getPVCoordinatesProvider()
          Get the body to align.
 boolean shouldBeRemoved()
          This method is called after EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean, boolean) has been triggered.
 
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, init, resetState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlignmentDetector

public AlignmentDetector(Orbit orbit,
                         PVCoordinatesProvider body,
                         double alignAngle)
Build a new alignment detector.

The orbit is used only to set an upper bound for the max check interval to period/3 and to set the convergence threshold according to orbit size.

The default behavior is to stop propagation when the expected alignment is reached.

Parameters:
orbit - initial orbit
body - the body to align
alignAngle - the alignment angle (rad)

AlignmentDetector

public AlignmentDetector(Orbit orbit,
                         PVCoordinatesProvider body,
                         double alignAngle,
                         double threshold)
Build a new alignment detector.

The orbit is used only to set an upper bound for the max check interval to period/3.

The default behavior is to stop propagation when the expected alignment is reached.

Parameters:
orbit - initial orbit
body - the body to align
alignAngle - the alignment angle (rad)
threshold - convergence threshold (s)

AlignmentDetector

public AlignmentDetector(Orbit orbit,
                         PVCoordinatesProvider body,
                         double alignAngle,
                         double threshold,
                         EventDetector.Action actionStart,
                         EventDetector.Action actionEnd)
Build a new alignment detector.

The orbit is used only to set an upper bound for the max check interval to period/3.

Parameters:
orbit - initial orbit
body - the body to align
alignAngle - the alignment angle (rad)
threshold - convergence threshold (s)
actionStart - action performed when the alignment start
actionEnd - action performed when the alignment end

AlignmentDetector

public AlignmentDetector(Orbit orbit,
                         PVCoordinatesProvider body,
                         double alignAngle,
                         double threshold,
                         EventDetector.Action actionStart,
                         EventDetector.Action actionEnd,
                         boolean removeStart,
                         boolean removeEnd)
Build a new alignment detector.

The orbit is used only to set an upper bound for the max check interval to period/3.

Parameters:
orbit - initial orbit
body - the body to align
alignAngle - the alignment angle (rad)
threshold - convergence threshold (s)
actionStart - action performed when the alignment start
actionEnd - action performed when the alignment end
removeStart - true if detector should be removed when the alignment start
removeEnd - true if detector should be removed when the alignment end
Since:
3.1
Method Detail

getPVCoordinatesProvider

public PVCoordinatesProvider getPVCoordinatesProvider()
Get the body to align.

Returns:
the body to align

getAlignAngle

public double getAlignAngle()
Get the alignment angle (rad).

Returns:
the alignment angle

shouldBeRemoved

public boolean shouldBeRemoved()
This method is called after EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean, boolean) has been triggered. It returns true if the current detector should be removed after first event detection. WARNING: this method can be called only once a event has been triggered. Before, the value is not available.

Specified by:
shouldBeRemoved in interface EventDetector
Specified by:
shouldBeRemoved in class AbstractDetector
Returns:
true if the current detector should be removed after first event detection

eventOccurred

public EventDetector.Action eventOccurred(SpacecraftState s,
                                          boolean increasing,
                                          boolean forward)
                                   throws OrekitException
Handle an alignment event and choose what to do next.

The default implementation behavior is to stop propagation when alignment is reached.

Specified by:
eventOccurred in interface EventDetector
Specified by:
eventOccurred in class AbstractDetector
Parameters:
s - the current state information : date, kinematics, attitude
increasing - if true, the value of the switching function increases when times increases around event
forward - if true, the integration variable (time) increases during integration.
Returns:
the action performed when alignment is reached.
Throws:
OrekitException - if some specific error occurs

g

public double g(SpacecraftState s)
         throws OrekitException
Compute the value of the switching function. This function measures the difference between the alignment angle and the angle between the satellite position and the body position projection in the orbital plane.

Specified by:
g in interface EventDetector
Specified by:
g in class AbstractDetector
Parameters:
s - the current state information: date, kinematics, attitude
Returns:
value of the switching function
Throws:
OrekitException - if some specific error occurs


Copyright © 2017 CNES. All Rights Reserved.