public class AlignmentDetector extends AbstractDetector
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.
Propagator.addEventDetector(EventDetector)
,
Serialized FormEventDetector.Action
DEFAULT_MAXCHECK
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
AlignmentDetector(Orbit orbit,
PVCoordinatesProvider bodyIn,
double alignAngleIn)
Build a new alignment detector.
|
AlignmentDetector(Orbit orbit,
PVCoordinatesProvider bodyIn,
double alignAngleIn,
double thresholdIn)
Build a new alignment detector.
|
AlignmentDetector(Orbit orbit,
PVCoordinatesProvider bodyIn,
double alignAngleIn,
double threshold,
EventDetector.Action actionStart,
EventDetector.Action actionEnd)
Build a new alignment detector.
|
AlignmentDetector(Orbit orbit,
PVCoordinatesProvider bodyIn,
double alignAngleIn,
double threshold,
EventDetector.Action actionStart,
EventDetector.Action actionEnd,
boolean removeStart,
boolean removeEnd)
Build a new alignment detector.
|
AlignmentDetector(PVCoordinatesProvider bodyIn,
double alignAngleIn,
double maxcheck,
double threshold,
EventDetector.Action actionStart,
EventDetector.Action actionEnd,
boolean removeStart,
boolean removeEnd)
Build a new alignment detector.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
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(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, init, resetState
public AlignmentDetector(Orbit orbit, PVCoordinatesProvider bodyIn, double alignAngleIn)
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.
orbit
- initial orbitbodyIn
- the body to alignalignAngleIn
- the alignment angle (rad)public AlignmentDetector(Orbit orbit, PVCoordinatesProvider bodyIn, double alignAngleIn, double thresholdIn)
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.
orbit
- initial orbitbodyIn
- the body to alignalignAngleIn
- the alignment angle (rad)thresholdIn
- convergence threshold (s)public AlignmentDetector(Orbit orbit, PVCoordinatesProvider bodyIn, double alignAngleIn, double threshold, EventDetector.Action actionStart, EventDetector.Action actionEnd)
The orbit is used only to set an upper bound for the max check interval to period/3.
orbit
- initial orbitbodyIn
- the body to alignalignAngleIn
- the alignment angle (rad)threshold
- convergence threshold (s)actionStart
- action performed when the alignment startactionEnd
- action performed when the alignment endpublic AlignmentDetector(Orbit orbit, PVCoordinatesProvider bodyIn, double alignAngleIn, double threshold, EventDetector.Action actionStart, EventDetector.Action actionEnd, boolean removeStart, boolean removeEnd)
The orbit is used only to set an upper bound for the max check interval to period/3.
orbit
- initial orbitbodyIn
- the body to alignalignAngleIn
- the alignment angle (rad)threshold
- convergence threshold (s)actionStart
- action performed when the alignment startactionEnd
- action performed when the alignment endremoveStart
- true if detector should be removed when the alignment startremoveEnd
- true if detector should be removed when the alignment endpublic AlignmentDetector(PVCoordinatesProvider bodyIn, double alignAngleIn, double maxcheck, double threshold, EventDetector.Action actionStart, EventDetector.Action actionEnd, boolean removeStart, boolean removeEnd)
The orbit is used only to set an upper bound for the max check interval to period/3.
maxcheck
- max check intervalbodyIn
- the body to alignalignAngleIn
- the alignment angle (rad)threshold
- convergence threshold (s)actionStart
- action performed when the alignment startactionEnd
- action performed when the alignment endremoveStart
- true if detector should be removed when the alignment startremoveEnd
- true if detector should be removed when the alignment endpublic PVCoordinatesProvider getPVCoordinatesProvider()
public double getAlignAngle()
public boolean shouldBeRemoved()
EventDetector.eventOccurred(fr.cnes.sirius.patrius.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.shouldBeRemoved
in interface EventDetector
shouldBeRemoved
in class AbstractDetector
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
The default implementation behavior is to stop
propagation when alignment is
reached.
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the current state information : date, kinematics, attitudeincreasing
- if true, the value of the switching function increases when times increases
around eventforward
- if true, the integration variable (time) increases during integration.PatriusException
- if some specific error occurspublic double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information: date, kinematics, attitudePatriusException
- if some specific error occurspublic EventDetector copy()
The following attributes are not deeply copied:
PVCoordinatesProvider
Copyright © 2019 CNES. All rights reserved.