public class ExtremaSightAxisDetector extends AbstractDetector
The detector is similar to the extrema three body angle detector : body one is the target point, body two is the frame origin on the line, and body three is the direction vector of the line. Each one are expressed in the frame with origin on the line.
The detector doesn't take into account potential masking.
The default implementation behavior is to stop
propagation when the minimum angle is detected.
EventDetector
,
ExtremaThreeBodiesAngleDetector
,
Serialized FormEventDetector.Action
Modifier and Type | Field and Description |
---|---|
static int |
MAX
Flag for local maximum angle detection (g decreasing).
|
static int |
MIN
Flag for local minimum angle detection (g increasing).
|
static int |
MIN_MAX
Flag for both local minimum and maximum angle detection.
|
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Assembly assembly,
String partName)
Constructor based on an Assembly containing at least one part with sensor property describing
the vehicle.
|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Assembly assembly,
String partName,
double maxCheck,
double threshold)
Constructor based on an Assembly containing at least one part with sensor property describing
the vehicle.
|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Assembly assembly,
String partName,
double maxCheck,
double threshold,
EventDetector.Action action)
Constructor for both minimal and maximal angle based on an Assembly containing at least one
part with sensor property describing the vehicle.
|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Assembly assembly,
String partName,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Constructor for both minimal and maximal angle based on an Assembly containing at least one
part with sensor property describing the vehicle.
|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Vector3D sightAxisDirection)
Constructor to use without assembly.
|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Vector3D sightAxisDirection,
double maxCheck,
double threshold)
Constructor to use without assembly.
|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Vector3D sightAxisDirection,
double maxCheck,
double threshold,
EventDetector.Action action)
Constructor to use without assembly.
|
ExtremaSightAxisDetector(int extremumType,
PVCoordinatesProvider target,
Vector3D sightAxisDirection,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Constructor to use without assembly.
|
ExtremaSightAxisDetector(PVCoordinatesProvider target,
Assembly assembly,
String partName,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax)
Constructor for both minimal and maximal angle based on an Assembly containing at least one
part with sensor property describing the vehicle.
|
ExtremaSightAxisDetector(PVCoordinatesProvider target,
Assembly assembly,
String partName,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax,
boolean removeMin,
boolean removeMax)
Constructor for both minimal and maximal angle based on an Assembly containing at least one
part with sensor property describing the vehicle.
|
ExtremaSightAxisDetector(PVCoordinatesProvider target,
Vector3D sightAxisDirection,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax)
Constructor to use without assembly for both minimal and maximal angle detection.
|
ExtremaSightAxisDetector(PVCoordinatesProvider target,
Vector3D sightAxisDirection,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax,
boolean removeMin,
boolean removeMax)
Constructor to use without assembly for both minimal and maximal angle detection.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next.
|
double |
g(SpacecraftState s)
The switching function is specific case of the extrema three bodies angle detector.
|
String |
getSensorName()
Get the sensor name.
|
Vector3D |
getSightAxis()
Get the sight axis
|
PVCoordinatesProvider |
getTargetPoint()
Get the target point.
|
Assembly |
getVehicle()
Get the vehicle.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
boolean |
shouldBeRemoved()
This method is called after
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, resetState
public static final int MIN
public static final int MAX
public static final int MIN_MAX
public ExtremaSightAxisDetector(PVCoordinatesProvider target, Vector3D sightAxisDirection, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax)
target
- the target could be on central body surface or another vehiclesightAxisDirection
- the direction of the sight view line which origin is the position
of the vehiclemaxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedIllegalArgumentException
- if sight axis direction is nullpublic ExtremaSightAxisDetector(PVCoordinatesProvider target, Vector3D sightAxisDirection, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax, boolean removeMin, boolean removeMax)
target
- the target could be on central body surface or another vehiclesightAxisDirection
- the direction of the sight view line which origin is the position
of the vehiclemaxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedremoveMin
- true if detector should be removed when the expected local minimum is
reachedremoveMax
- true if detector should be removed when the expected local maximum is
reachedIllegalArgumentException
- if sight axis direction is nullpublic ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Vector3D sightAxisDirection, double maxCheck, double threshold, EventDetector.Action action)
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehiclesightAxisDirection
- the direction of the sight view line which origin is the position
of the vehiclemaxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)action
- action to be performed when the expected extrema is reached.IllegalArgumentException
- thrown if sight axis direction is nullpublic ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Vector3D sightAxisDirection, double maxCheck, double threshold, EventDetector.Action action, boolean remove)
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehiclesightAxisDirection
- the direction of the sight view line which origin is the position
of the vehiclemaxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)action
- action to be performed when the expected extrema is reached.remove
- true if detector should be removed when the expected extrema is reached NB : If
remove is true, it means detector should be removed at detection, so the value of
attributes removeMIN and removeMAX must be decided according extremumType.IllegalArgumentException
- if sight axis direction is nullpublic ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Vector3D sightAxisDirection, double maxCheck, double threshold)
The default behavior is to stop
propagation when the minimum angle is detected
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehiclesightAxisDirection
- the direction of the sight view line which origin is the position
of the vehiclemaxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)IllegalArgumentException
- thrown if sight axis direction is nullpublic ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Vector3D sightAxisDirection)
The default behavior is to stop
propagation when the minimum angle is detected.
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehiclesightAxisDirection
- the direction of the sight view line which origin is the position
of the vehiclepublic ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Assembly assembly, String partName, double maxCheck, double threshold)
The default behavior is to stop
propagation when the minimum angle is detected
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehicleassembly
- the assembly to consider (its main part frame must have a parent frame !!).
Must have at least one part with sensor property.partName
- the name of the part that supports the sensor property.maxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)IllegalArgumentException
- thrown if the part identified by partName doesn't have the
SENSOR property.public ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Assembly assembly, String partName)
The default behavior is to stop
propagation when the minimum angle is detected
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehicleassembly
- the assembly to consider (its main part frame must have a parent frame !!).
Must have at least one part with sensor property.partName
- the name of the part that supports the sensor property.public ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Assembly assembly, String partName, double maxCheck, double threshold, EventDetector.Action action)
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehicleassembly
- the assembly to consider (its main part frame must have a parent frame !)
Must have at least one part with sensor property.partName
- the name of the part that supports the sensor property.maxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)action
- action to be performed when the expected extrema is reachedIllegalArgumentException
- if the part identified by partName doesn't have the SENSOR
propertypublic ExtremaSightAxisDetector(int extremumType, PVCoordinatesProvider target, Assembly assembly, String partName, double maxCheck, double threshold, EventDetector.Action action, boolean remove)
extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle detectiontarget
- the target could be on central body surface or another vehicleassembly
- the assembly to consider (its main part frame must have a parent frame !!).
Must have at least one part with sensor property.partName
- the name of the part that supports the sensor property.maxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)action
- action to be performed when the expected extrema is reached.remove
- true if detector should be removed when the expected extrema is reached
NB : If remove is true, it means detector should be removed at detection, so the value
of attributes removeMIN and removeMAX must be decided according extremumType.IllegalArgumentException
- if the part identified by partName doesn't have the SENSOR
property.public ExtremaSightAxisDetector(PVCoordinatesProvider target, Assembly assembly, String partName, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax)
target
- the target can be on central body surface or another vehicleassembly
- the assembly to consider (its main part frame must have a parent frame !!).
Must have at least one part with sensor property.partName
- the name of the part that supports the sensor property.maxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedIllegalArgumentException
- if the part identified by partName doesn't have the sensor
property.public ExtremaSightAxisDetector(PVCoordinatesProvider target, Assembly assembly, String partName, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax, boolean removeMin, boolean removeMax)
target
- the target can be on central body surface or another vehicleassembly
- the assembly to consider (its main part frame must have a parent frame !!).
Must have at least one part with sensor property.partName
- the name of the part that supports the sensor property.maxCheck
- maximum checking interval (s)(see AbstractDetector
)threshold
- convergence threshold (s)(see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedremoveMin
- true if detector should be removed when the expected local minimum is
reachedremoveMax
- true if detector should be removed when the expected local maximum is
reachedIllegalArgumentException
- if the part identified by partName doesn't have the SENSOR
property.public void init(SpacecraftState s0, AbsoluteDate t)
This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.
init
in interface EventDetector
init
in class AbstractDetector
s0
- initial statet
- target time for the integrationpublic double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- the spacecraft state used to determine the local framePatriusException
- if some specific error occursExtremaThreeBodiesAngleDetector
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
The scheduling between this method and the PatriusStepHandler method handleStep() is to call this method first
and handleStep
afterwards. This scheduling allows the propagator to pass true
as the
isLast
parameter to the step handler to make it aware the step will be the last one if this method
returns EventDetector.Action.STOP
. As the interpolator may be used to navigate back throughout the last
step (as OrekitStepNormalizer
does for example), user code called by this method and user code called by step handlers
may experience apparently out of order values of the independent time variable. As an example, if the same user
object implements both this EventDetector
interface and the OrekitFixedStepHandler
interface, a forward integration may call its eventOccurred
method
with a state at 2000-01-01T00:00:10 first and call its handleStep
method with a state at
2000-01-01T00:00:09 afterwards. Such out of order calls are limited to the size of the integration step for
variable step handlers
and to the size of
the fixed step for fixed step
handlers
.
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesincreasing
- if true, the value of the switching function increases when times increases
around event (note that increase is measured with respect to physical time, not with
respect to propagation which may go backward in time)forward
- if true, the integration variable (time) increases during integration.EventDetector.Action.STOP
, EventDetector.Action.RESET_STATE
,
EventDetector.Action.RESET_DERIVATIVES
, EventDetector.Action.CONTINUE
PatriusException
- if some specific error occurspublic 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 PVCoordinatesProvider getTargetPoint()
public Vector3D getSightAxis()
public Assembly getVehicle()
public String getSensorName()
public EventDetector copy()
The following attributes are not deeply copied:
PVCoordinatesProvider
Assembly
Copyright © 2019 CNES. All rights reserved.