org.orekit.propagation.events
Class NullMassDetector

java.lang.Object
  extended by org.orekit.propagation.events.AbstractDetector
      extended by org.orekit.propagation.events.NullMassDetector
All Implemented Interfaces:
Serializable, EventDetector

public class NullMassDetector
extends AbstractDetector

This class creates an event detector that detects when the global mass of the satellite becomes null. This detector is automatically added (in first position) to every propagator and stops the propagation once it detects a null global mass. Since the initial mass is positive or null, the first time where g = 0 will indicate the first time when the mass becomes null.

Since:
2.3
Version:
$Id: NullMassDetector.java 14874 2015-12-03 16:15:28Z bignon $
Author:
Sophie LAURENS
See Also:
Serialized Form

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.EventDetector
DECREASING, INCREASING, INCREASING_DECREASING
 
Constructor Summary
NullMassDetector(double maxCheck, double threshold, MassProvider massModel)
          Inherited constructor.
NullMassDetector(int slopeSelection, double maxCheck, double threshold, MassProvider massModel)
          Inherited constructor.
NullMassDetector(MassProvider massModel)
          Build a new instance (based on DateDetector).
 
Method Summary
 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
          If the global mass of the satellite becomes negative, the propagation is stopped.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 boolean isTriggered()
          Returns true if detector has been triggered.
 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, init, resetState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullMassDetector

public NullMassDetector(double maxCheck,
                        double threshold,
                        MassProvider massModel)
Inherited constructor.

Parameters:
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)
massModel - mass model

NullMassDetector

public NullMassDetector(int slopeSelection,
                        double maxCheck,
                        double threshold,
                        MassProvider massModel)
Inherited constructor.

Parameters:
slopeSelection - g-function slope selection (0, 1, or 2)
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)
massModel - mass model

NullMassDetector

public NullMassDetector(MassProvider massModel)
Build a new instance (based on DateDetector).

This constructor is dedicated to single date detection. MaxCheck is set to 10.e9, so almost no other date can be added. Tolerance is set to 10.e-10.

Parameters:
massModel - mass model
Method Detail

eventOccurred

public EventDetector.Action eventOccurred(SpacecraftState s,
                                          boolean increasing,
                                          boolean forward)
If the global mass of the satellite becomes negative, the propagation is stopped.

Specified by:
eventOccurred in interface EventDetector
Specified by:
eventOccurred in class AbstractDetector
Parameters:
s - the current state information : date, kinematics, attitude
increasing - 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.
Returns:
EventDetector.Action.STOP

g

public double g(SpacecraftState s)
         throws OrekitException
Compute the value of the switching function.

Specified by:
g in interface EventDetector
Specified by:
g in class AbstractDetector
Parameters:
s - the current state information: date, kinematics, attitude
Returns:
value of the switching function
Throws:
OrekitException - if some specific error occurs

isTriggered

public final boolean isTriggered()
Returns true if detector has been triggered.

Returns:
true if detector has been triggered

shouldBeRemoved

public boolean shouldBeRemoved()
Description copied from class: AbstractDetector
This method is called after 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.

Specified by:
shouldBeRemoved in interface EventDetector
Specified by:
shouldBeRemoved in class AbstractDetector
Returns:
true if the current detector should be removed after first event detection


Copyright © 2016 CNES. All Rights Reserved.