public class SensorInhibitionDetector extends AbstractSignalPropagationDetector
Event detector for the inhibition of a sensor. The g function is positive if one of the inhibition target is in its inhibition field.
The default implementation behaviour is to continue
propagation when entering the zone and to stop
when exiting the zone. This can be changed by using provided constructors.
This detector can takes into account signal propagation duration through
AbstractSignalPropagationDetector.setPropagationDelayType(PropagationDelayType, Frame)
(default is signal being instantaneous).
SensorModel
,
Serialized FormAbstractSignalPropagationDetector.DatationChoice, AbstractSignalPropagationDetector.PropagationDelayType
EventDetector.Action
actionAtEntry, actionAtExit, DEFAULT_MAXCHECK, DEFAULT_MAXITER, DEFAULT_THRESHOLD, removeAtEntry, removeAtExit, shouldBeRemovedFlag
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
SensorInhibitionDetector(Assembly assembly,
String partName,
double maxCheck,
double threshold)
|
SensorInhibitionDetector(Assembly assembly,
String partName,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit)
Constructor for the "inhibition" detector
|
SensorInhibitionDetector(SensorModel sensorModel,
double maxCheck,
double threshold)
Constructor for the "inhibition" detector The default implementation behaviour is to
continue propagation when
entering the zone and to stop when exiting the zone. |
SensorInhibitionDetector(SensorModel sensorModel,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit)
Constructor for the "inhibition" detector
|
SensorInhibitionDetector(SensorModel sensorModel,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit,
boolean removeEntry,
boolean removeExit)
Constructor for the "inhibition" 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 event and choose what to do next.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
Assembly |
getAssembly()
Get the assembly.
|
AbstractSignalPropagationDetector.DatationChoice |
getDatationChoice()
Specify if the datation choice corresponds to the emitter date or the receiver date.
|
PVCoordinatesProvider |
getEmitter(SpacecraftState s)
Getter for the signal emitter.
|
int |
getInhibitionNumber()
Get the inhibition number.
|
PVCoordinatesProvider |
getReceiver(SpacecraftState s)
Getter for the signal receiver.
|
SensorModel |
getSensor()
Get the sensor.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
void |
setPropagationDelayType(AbstractSignalPropagationDetector.PropagationDelayType propagationDelayType,
Frame frame)
Setter for the propagation delay computation type.
|
getEpsilonSignalPropagation, getInertialFrame, getMaxIterSignalPropagation, getPropagationDelayType, getSignalEmissionDate, getSignalEmissionDate, getSignalReceptionDate, getSignalReceptionDate, setEpsilonSignalPropagation, setMaxIterSignalPropagation
filterEvent, getActionAtEntry, getActionAtExit, getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, isRemoveAtEntry, isRemoveAtExit, logEventsOverTimeInterval, resetState, setMaxCheckInterval, setMaxIter, shouldBeRemoved
public SensorInhibitionDetector(Assembly assembly, String partName, double maxCheck, double threshold)
continue
propagation when
entering the zone and to stop
when
exiting
the zone.assembly
- the assembly to consider (its main part frame must have a parent frame !!)partName
- the name of the part that supports the sensormaxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)public SensorInhibitionDetector(Assembly assembly, String partName, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
assembly
- the assembly to consider (its main part frame must have a parent frame !!)partName
- the name of the part that supports the sensormaxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the inhibition zoneexit
- action performed when exiting the inhibition zonepublic SensorInhibitionDetector(SensorModel sensorModel, double maxCheck, double threshold)
continue
propagation when
entering the zone and to stop when exiting the zone.sensorModel
- the sensor model (the main part frame of the assembly must have a parent
frame !!)maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)public SensorInhibitionDetector(SensorModel sensorModel, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
sensorModel
- the sensor model (the main part frame of the assembly must have a parent
frame !!)maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the inhibition zoneexit
- action performed when exiting the inhibition zonepublic SensorInhibitionDetector(SensorModel sensorModel, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
sensorModel
- the sensor model (the main part frame of the assembly must have a parent
frame !!)maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the inhibition zoneexit
- action performed when exiting the inhibition zoneremoveEntry
- true if entering the inhibition zoneremoveExit
- true if exiting the inhibition zonepublic 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 current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesPatriusException
- if some specific error occurspublic 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 int getInhibitionNumber()
public Assembly getAssembly()
public SensorModel getSensor()
public void setPropagationDelayType(AbstractSignalPropagationDetector.PropagationDelayType propagationDelayType, Frame frame)
setPropagationDelayType
in class AbstractSignalPropagationDetector
propagationDelayType
- Propagation delay type used in events computationframe
- Frame to use for signal propagation with delay (may be null if propagation delay type is
considered instantaneous). Warning: the usage of a pseudo inertial frame is tolerated, however it will
lead to some inaccuracies due to the non-invariance of the frame with respect to time. For this reason,
it is suggested to use the ICRF frame or a frame which is frozen with respect to the ICRF.public PVCoordinatesProvider getEmitter(SpacecraftState s)
getEmitter
in class AbstractSignalPropagationDetector
s
- the spacecraft state used by the detectorUnsupportedOperationException
- As the emitter is not obviously the sensor main targetpublic PVCoordinatesProvider getReceiver(SpacecraftState s)
getReceiver
in class AbstractSignalPropagationDetector
s
- the spacecraft state used by the detectorpublic AbstractSignalPropagationDetector.DatationChoice getDatationChoice()
getDatationChoice
in class AbstractSignalPropagationDetector
public EventDetector copy()
The following attributes are not deeply copied:
SensorModel
Copyright © 2023 CNES. All rights reserved.