|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.orekit.propagation.events.AbstractDetector fr.cnes.sirius.patrius.events.sensor.SatToSatMutualVisibilityDetector
public class SatToSatMutualVisibilityDetector
Mutual spacecraft visibility detector : the g function is positive only if each spacecraft is in the main field of
view of the other one's sensor. In a single spacecraft propagation mode (Propagator
), this event detector
shall be used in the propagation of a main spacecraft, and will use internally a given propagator to get the position
of the secondary spacecraft.
The default implementation behavior is to continue
propagation when entering the visibility zone and to
stop
propagation when exiting the visibility zone.
This detector could be used in single spacecraft propagation mode, using the following constructors :
or in multi spacecraft propagation mode, using the following constructors : If the wrong constructor is used, an exception will be raised during propagation.
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.multi.MultiEventDetector |
---|
DECREASING, INCREASING, INCREASING_DECREASING |
Fields inherited from interface org.orekit.propagation.events.EventDetector |
---|
DECREASING, INCREASING, INCREASING_DECREASING |
Constructor Summary | |
---|---|
SatToSatMutualVisibilityDetector(SensorModel mainSensorModel,
SensorModel secondarySensorModel,
Propagator secondSpacecraftPropagator,
boolean withMasking,
double maxCheck,
double threshold)
Constructor to be used for single spacecraft propagation only ( Propagator ). |
|
SatToSatMutualVisibilityDetector(SensorModel mainSensorModel,
SensorModel secondarySensorModel,
Propagator secondSpacecraftPropagator,
boolean withMasking,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit)
Constructor to be used for single spacecraft propagation only ( Propagator ). |
|
SatToSatMutualVisibilityDetector(SensorModel mainSensorModel,
SensorModel secondarySensorModel,
Propagator secondSpacecraftPropagator,
boolean withMasking,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit,
boolean removeEntry,
boolean removeExit)
Constructor to be used for single spacecraft propagation only ( Propagator ). |
|
SatToSatMutualVisibilityDetector(String mainSpacecraftId,
String secondarySpacecraftId,
SensorModel mainSensorModel,
SensorModel secondarySensorModel,
boolean withMasking,
double maxCheck,
double threshold)
Constructor to be used for multi spacecraft propagation only ( MultiPropagator ). |
|
SatToSatMutualVisibilityDetector(String mainSpacecraftId,
String secondarySpacecraftId,
SensorModel mainSensorModel,
SensorModel secondarySensorModel,
boolean withMasking,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit)
Constructor to be used for multi spacecraft propagation only ( MultiPropagator ). |
|
SatToSatMutualVisibilityDetector(String mainSpacecraftId,
String secondarySpacecraftId,
SensorModel mainSensorModel,
SensorModel secondarySensorModel,
boolean withMasking,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit,
boolean removeEntry,
boolean removeExit)
Constructor to be used for multi-spacecraft propagation only ( MultiPropagator ). |
Method Summary | |
---|---|
EventDetector.Action |
eventOccurred(Map<String,SpacecraftState> s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next. |
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next. |
double |
g(Map<String,SpacecraftState> s)
Compute the value of the switching function. |
double |
g(SpacecraftState s)
Compute the value of the switching function. |
String |
getInMainSpacecraftId()
Get the main spacecraft id. |
String |
getInSecondarySpacecraftId()
Get the secondary spacecraft id. |
Assembly |
getMainSpacecraft()
Get the main assembly to consider. |
Assembly |
getSecondarySpacecraft()
Get the secondary assembly to consider. |
SensorModel |
getSensorMainSpacecraft()
Get the main spacecraft sensor. |
SensorModel |
getSensorSecondarySpacecraft()
Get the secondary spacecraft sensor. |
void |
init(Map<String,SpacecraftState> s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation. |
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation. |
boolean |
isMaskingCheck()
Check maskings. |
Map<String,SpacecraftState> |
resetStates(Map<String,SpacecraftState> oldStates)
Reset the states (including additional states) prior to continue propagation. |
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, resetState |
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.multi.MultiEventDetector |
---|
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold |
Constructor Detail |
---|
public SatToSatMutualVisibilityDetector(SensorModel mainSensorModel, SensorModel secondarySensorModel, Propagator secondSpacecraftPropagator, boolean withMasking, double maxCheck, double threshold)
Constructor to be used for single spacecraft propagation only (Propagator
).
Constructor for the mutual spacecraft to spacecraft visibility detector.
The default implementation behavior is to continue
propagation when entering the visibility zone and to
stop
propagation when exiting the visibility
zone.
mainSensorModel
- the sensor model to consider for the main spacecraft.
The secondary sensor model must be its main target !secondarySensorModel
- the sensor model to consider for the secondary spacecraft.
The main sensor model must be its main target !secondSpacecraftPropagator
- the propagator for the secondary spacecraftwithMasking
- set true to compute maskings of each spacecrafts' sensors : in
this case, there is no visibility if one of the masking bodies of both sensors
is between the satellites.maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)public SatToSatMutualVisibilityDetector(SensorModel mainSensorModel, SensorModel secondarySensorModel, Propagator secondSpacecraftPropagator, boolean withMasking, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
Propagator
).
Constructor for the mutual spacecraft to spacecraft visibility detector.
mainSensorModel
- the sensor model to consider for the main spacecraft.
The secondary sensor model must be its main target !secondarySensorModel
- the sensor model to consider for the secondary spacecraft.
The main sensor model must be its main target !secondSpacecraftPropagator
- the propagator for the secondary spacecraftwithMasking
- set true to compute maskings of each spacecrafts' sensors : in
this case, there is no visibility if one of the masking bodies of both sensors
is between the satellites.maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the visibility zoneexit
- action performed when exiting the visibility zonepublic SatToSatMutualVisibilityDetector(SensorModel mainSensorModel, SensorModel secondarySensorModel, Propagator secondSpacecraftPropagator, boolean withMasking, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
Propagator
).
Constructor for the mutual spacecraft to spacecraft visibility detector.
mainSensorModel
- the sensor model to consider for the main spacecraft.
The secondary sensor model must be its main targetsecondarySensorModel
- the sensor model to consider for the secondary spacecraft.
The main sensor model must be its main targetsecondSpacecraftPropagator
- the propagator for the secondary spacecraftwithMasking
- true to compute maskings of each spacecrafts' sensors : in
this case, there is no visibility if one of the masking bodies of both sensors
is between the satellites.maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the visibility zoneexit
- action performed when exiting the visibility zoneremoveEntry
- true if entering the visibility zoneremoveExit
- true if exiting the visibility zonepublic SatToSatMutualVisibilityDetector(String mainSpacecraftId, String secondarySpacecraftId, SensorModel mainSensorModel, SensorModel secondarySensorModel, boolean withMasking, double maxCheck, double threshold)
MultiPropagator
).
Constructor for the mutual spacecraft to spacecraft visibility detector.
The default implementation behavior is to continue
propagation when entering the visibility zone and to
stop
propagation when exiting the visibility
zone.
mainSpacecraftId
- id of the main spacecraftsecondarySpacecraftId
- id of the secondary spacecraftmainSensorModel
- the sensor model to consider for the main spacecraft.
The secondary sensor model must be its main target !secondarySensorModel
- the sensor model to consider for the secondary spacecraft.
The main sensor model must be its main target !withMasking
- set true to compute maskings of each spacecrafts' sensors : in
this case, there is no visibility if one of the masking bodies of both sensors
is between the satellites.maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)public SatToSatMutualVisibilityDetector(String mainSpacecraftId, String secondarySpacecraftId, SensorModel mainSensorModel, SensorModel secondarySensorModel, boolean withMasking, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
MultiPropagator
).
Constructor for the mutual spacecraft to spacecraft visibility detector.
mainSpacecraftId
- id of the main spacecraftsecondarySpacecraftId
- id of the secondary spacecraftmainSensorModel
- the sensor model to consider for the main spacecraft.
The secondary sensor model must be its main target !secondarySensorModel
- the sensor model to consider for the secondary spacecraft.
The main sensor model must be its main target !withMasking
- set true to compute maskings of each spacecrafts' sensors : in
this case, there is no visibility if one of the masking bodies of both sensors
is between the satellites.maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the visibility zoneexit
- action performed when exiting the visibility zonepublic SatToSatMutualVisibilityDetector(String mainSpacecraftId, String secondarySpacecraftId, SensorModel mainSensorModel, SensorModel secondarySensorModel, boolean withMasking, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
MultiPropagator
).
Constructor for the mutual spacecraft to spacecraft visibility detector.
mainSpacecraftId
- id of the main spacecraftsecondarySpacecraftId
- id of the secondary spacecraftmainSensorModel
- the sensor model to consider for the main spacecraft.
The secondary sensor model must be its main targetsecondarySensorModel
- the sensor model to consider for the secondary spacecraft.
The main sensor model must be its main targetwithMasking
- true to compute maskings of each spacecrafts' sensors : in
this case, there is no visibility if one of the masking bodies of both sensors
is between the satellites.maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the visibility zoneexit
- action performed when exiting the visibility zoneremoveEntry
- true if entering the visibility zone.removeExit
- true if exiting the visibility zone.Method Detail |
---|
public void init(SpacecraftState s0, AbsoluteDate t)
AbstractDetector
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 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws OrekitException
AbstractDetector
The scheduling between this method and the OrekitStepHandler
method handleStep(interpolator, isLast)
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
OrekitException
- if some specific error occurspublic double g(SpacecraftState s) throws OrekitException
AbstractDetector
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 states
OrekitException
- if some specific error occurspublic SensorModel getSensorMainSpacecraft()
public Assembly getMainSpacecraft()
public SensorModel getSensorSecondarySpacecraft()
public Assembly getSecondarySpacecraft()
public boolean isMaskingCheck()
public String getInMainSpacecraftId()
public String getInSecondarySpacecraftId()
public void init(Map<String,SpacecraftState> s0, AbsoluteDate t)
MultiEventDetector
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 MultiEventDetector
s0
- map of initial statest
- target time for the integrationpublic double g(Map<String,SpacecraftState> s) throws OrekitException
MultiEventDetector
This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.
g
in interface MultiEventDetector
s
- the current states information: date, kinematics, attitudes for forces
and events computation, and additional states for each states
OrekitException
- if some specific error occurspublic EventDetector.Action eventOccurred(Map<String,SpacecraftState> s, boolean increasing, boolean forward) throws OrekitException
MultiEventDetector
The scheduling between this method and the MultiOrekitStepHandler 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 MultiOrekitStepNormalizer 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 MultiEventDetector
interface and the MultiOrekitFixedStepHandler 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 MultiOrekitStepHandler and to the size of the fixed step for
MultiOrekitFixedStepHandler.
eventOccurred
in interface MultiEventDetector
s
- the current states information: date, kinematics, attitude for forces
and events computation, and additional states for each 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
OrekitException
- if some specific error occurspublic Map<String,SpacecraftState> resetStates(Map<String,SpacecraftState> oldStates) throws OrekitException
MultiEventDetector
This method is called after the step handler has returned and before the next step is started, but only when
MultiEventDetector.eventOccurred(java.util.Map
has itself returned the
EventDetector.Action.RESET_STATE
indicator. It allows the user to reset the
state for the next step, without perturbing the step handler of the finishing step. If the MultiEventDetector.eventOccurred(java.util.Map
never returns the EventDetector.Action.RESET_STATE
indicator, this function
will never be called, and it is safe to simply return null.
resetStates
in interface MultiEventDetector
oldStates
- old states
OrekitException
- if the states cannot be resetedpublic boolean shouldBeRemoved()
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.
shouldBeRemoved
in interface EventDetector
shouldBeRemoved
in interface MultiEventDetector
shouldBeRemoved
in class AbstractDetector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |