public class SatToSatMutualVisibilityDetector extends AbstractSignalPropagationDetector implements MultiEventDetector
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 can takes into account signal propagation duration through
AbstractSignalPropagationDetector.setPropagationDelayType(PropagationDelayType, Frame)
(default is signal being instantaneous).
Detection is between two spacecrafts in a symmetrical way (no station), therefore SatToSatMutualVisibilityDetector.LinkType
needs to be
clarified. What is called Downlink
is signal propagation from each spacecraft to the target
one with signal emission at the date defined by the spacecraft state of the g function. Visibilities are therefore
checked at the date state.getDate()+propagation_time: this date is called reception date. Uplink
corresponds to the opposite: the date of the spacecraft state is a reception date by each satellite, meaning
signal emission happended before this date. Default linktype is LinkType#DOWNLINK
.
Modifier and Type | Class and Description |
---|---|
static class |
SatToSatMutualVisibilityDetector.LinkType
Type of link.
|
AbstractSignalPropagationDetector.DatationChoice, AbstractSignalPropagationDetector.PropagationDelayType
EventDetector.Action
actionAtEntry, actionAtExit, DEFAULT_MAXCHECK, DEFAULT_MAXITER, DEFAULT_THRESHOLD, removeAtEntry, removeAtExit, shouldBeRemovedFlag
DECREASING, INCREASING, INCREASING_DECREASING
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
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(SensorModel mainSensorModel,
SensorModel secondarySensorModel,
Propagator secondSpacecraftPropagator,
boolean withMasking,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit,
boolean removeEntry,
boolean removeExit,
SatToSatMutualVisibilityDetector.LinkType linkTypeIn)
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 ). |
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,
SatToSatMutualVisibilityDetector.LinkType linkTypeIn)
Constructor to be used for multi-spacecraft propagation only (
MultiPropagator ). |
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
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.
|
boolean |
filterEvent(Map<String,SpacecraftState> states,
boolean increasing,
boolean forward)
Filter last event: returns true if the last event is a false detection, false otherwise.
|
double |
g(Map<String,SpacecraftState> s)
Compute the value of the switching function.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
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.
|
String |
getInMainSpacecraftId()
Get the main spacecraft id.
|
String |
getInSecondarySpacecraftId()
Get the secondary spacecraft id.
|
SatToSatMutualVisibilityDetector.LinkType |
getLinkType()
Returns the type of link (it can be uplink or downlink).
|
Assembly |
getMainSpacecraft()
Get the main assembly to consider.
|
PVCoordinatesProvider |
getReceiver(SpacecraftState s)
Getter for the signal receiver.
|
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.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, shouldBeRemoved
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(SensorModel mainSensorModel, SensorModel secondarySensorModel, Propagator secondSpacecraftPropagator, boolean withMasking, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit, SatToSatMutualVisibilityDetector.LinkType linkTypeIn)
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 zonelinkTypeIn
- the type of link: downlink corresponds to signal emission from each spacecraft at the date
encapsulated by the spacecraft state called in the g function. Uplink is signal reception at this date.public 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.public 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, SatToSatMutualVisibilityDetector.LinkType linkTypeIn)
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.linkTypeIn
- type of link (MAIN_TO_SECONDARY or SECONDARY_TO_MAIN)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 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 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 double g(Map<String,SpacecraftState> s) throws PatriusException
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 statesPatriusException
- if some specific error occurspublic SensorModel getSensorMainSpacecraft()
public Assembly getMainSpacecraft()
public SensorModel getSensorSecondarySpacecraft()
public Assembly getSecondarySpacecraft()
public boolean isMaskingCheck()
public SatToSatMutualVisibilityDetector.LinkType getLinkType()
public String getInMainSpacecraftId()
public String getInSecondarySpacecraftId()
public void init(Map<String,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 MultiEventDetector
s0
- map of initial statest
- target time for the integrationpublic EventDetector.Action eventOccurred(Map<String,SpacecraftState> s, boolean increasing, boolean forward) throws PatriusException
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
PatriusException
- if some specific error occurspublic Map<String,SpacecraftState> resetStates(Map<String,SpacecraftState> oldStates) throws PatriusException
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<java.lang.String, fr.cnes.sirius.patrius.propagation.SpacecraftState>, boolean, boolean)
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<java.lang.String, fr.cnes.sirius.patrius.propagation.SpacecraftState>, boolean, boolean)
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 statesPatriusException
- if the states cannot be resetedpublic void setPropagationDelayType(AbstractSignalPropagationDetector.PropagationDelayType propagationDelayType, Frame frame)
AbstractSignalPropagationDetector
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 detectorpublic 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
SensorModel
Propagator
copy
in interface EventDetector
public boolean filterEvent(Map<String,SpacecraftState> states, boolean increasing, boolean forward) throws PatriusException
This method is called right before #eventOccurred(SpacecraftState, boolean, boolean)
method.
This may be useful in order to filter some events in particular when angles are at stake (see for example
LocalTimeAngleDetector
).
filterEvent
in interface MultiEventDetector
states
- states at last event occurrenceincreasing
- 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.PatriusException
- thrown if computation failed for some reasonsCopyright © 2023 CNES. All rights reserved.