public class NullMassPartDetector extends AbstractDetector implements EventDetector
EventDetector.Action
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
NullMassPartDetector(double maxCheck,
double threshold,
MassProvider massModel,
String part)
Inherited constructor.
|
NullMassPartDetector(int slopeSelection,
double maxCheck,
double threshold,
MassProvider massModel,
String part)
Inherited constructor.
|
NullMassPartDetector(MassProvider massModel,
String part)
Build a new instance MaxCheck is set to 10.e9, so almost no other date can be added.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
If the mass of the element becomes negative, a reset_state is performed.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
String |
getPartName()
Get the name of the part (attribute).
|
SpacecraftState |
resetState(SpacecraftState oldState)
Reset the state (including additional states) prior to continue 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, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, init
public NullMassPartDetector(double maxCheck, double threshold, MassProvider massModel, String part)
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)massModel
- mass modelpart
- name of the partpublic NullMassPartDetector(int slopeSelection, double maxCheck, double threshold, MassProvider massModel, String part)
slopeSelection
- g-function slope selection (0, 1, or 2)maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)massModel
- mass modelpart
- name of the partpublic NullMassPartDetector(MassProvider massModel, String part)
massModel
- mass modelpart
- name of the partpublic SpacecraftState resetState(SpacecraftState oldState) throws PatriusException
resetState
in interface EventDetector
resetState
in class AbstractDetector
oldState
- the current SpacecraftState whose MassProvider has to be updatedPatriusException
- if mass is negative : bcs function updateMasspublic EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
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 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.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 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 String getPartName()
public EventDetector copy()
The following attributes are not deeply copied:
MassProvider
copy
in interface EventDetector
Copyright © 2019 CNES. All rights reserved.