Class AlignmentDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<AlignmentDetector>
-
- org.orekit.propagation.events.AlignmentDetector
-
- All Implemented Interfaces:
EventDetector
public class AlignmentDetector extends AbstractDetector<AlignmentDetector>
Finder for satellite/body alignment events in orbital plane.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 handler behavior is to
stop
propagation when alignment is reached. This can be changed by callingAbstractDetector.withHandler(EventHandler)
after construction.- Author:
- Pascal Parraud
- See Also:
Propagator.addEventDetector(EventDetector)
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_CHECK, DEFAULT_MAX_ITER, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description AlignmentDetector(double maxCheck, double threshold, PVCoordinatesProvider body, double alignAngle)
Build a new alignment detector.AlignmentDetector(double threshold, Orbit orbit, PVCoordinatesProvider body, double alignAngle)
Build a new alignment detector.AlignmentDetector(Orbit orbit, PVCoordinatesProvider body, double alignAngle)
Build a new alignment detector.protected
AlignmentDetector(EventDetectionSettings detectionSettings, EventHandler handler, PVCoordinatesProvider body, double alignAngle)
Protected constructor with full parameters.AlignmentDetector(EventDetectionSettings detectionSettings, PVCoordinatesProvider body, double alignAngle)
Build a new alignment detector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AlignmentDetector
create(EventDetectionSettings detectionSettings, EventHandler newHandler)
Build a new instance.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.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getDetectionSettings, getHandler, init, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.events.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold
-
-
-
-
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.
- Parameters:
orbit
- initial orbitbody
- the body to alignalignAngle
- the alignment angle (rad)
-
AlignmentDetector
public AlignmentDetector(double maxCheck, double threshold, PVCoordinatesProvider body, double alignAngle)
Build a new alignment detector.- Parameters:
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)body
- the body to alignalignAngle
- the alignment angle (rad)
-
AlignmentDetector
public AlignmentDetector(EventDetectionSettings detectionSettings, PVCoordinatesProvider body, double alignAngle)
Build a new alignment detector.- Parameters:
detectionSettings
- detection settingsbody
- the body to alignalignAngle
- the alignment angle (rad)- Since:
- 13.0
-
AlignmentDetector
public AlignmentDetector(double threshold, 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.
- Parameters:
threshold
- convergence threshold (s)orbit
- initial orbitbody
- the body to alignalignAngle
- the alignment angle (rad)
-
AlignmentDetector
protected AlignmentDetector(EventDetectionSettings detectionSettings, EventHandler handler, PVCoordinatesProvider body, double alignAngle)
Protected constructor with full parameters.This constructor is not public as users are expected to use the builder API with the various
withXxx()
methods to set up the instance in a readable manner without using a huge amount of parameters.- Parameters:
detectionSettings
- detection settingshandler
- event handler to call at event occurrencesbody
- the body to alignalignAngle
- the alignment angle (rad)- Since:
- 13.0
-
-
Method Detail
-
create
protected AlignmentDetector create(EventDetectionSettings detectionSettings, EventHandler newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<AlignmentDetector>
- Parameters:
detectionSettings
- detection settingsnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
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
-
g
public double g(SpacecraftState s)
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.- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
-