public class MagneticFieldDetector extends AbstractDetector<MagneticFieldDetector>
The detector is based on the value of the earth magnetic field at see level at the satellite latitude and longitude.
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Constructor and Description |
---|
MagneticFieldDetector(double maxCheck,
double threshold,
double limit,
GeoMagneticFieldFactory.FieldModel type,
OneAxisEllipsoid body,
boolean seaLevel)
Build a detector.
|
MagneticFieldDetector(double limit,
GeoMagneticFieldFactory.FieldModel type,
OneAxisEllipsoid body)
Build a new detector.
|
MagneticFieldDetector(double limit,
GeoMagneticFieldFactory.FieldModel type,
OneAxisEllipsoid body,
boolean seaLevel)
Build a new detector.
|
Modifier and Type | Method and Description |
---|---|
protected MagneticFieldDetector |
create(double newMaxCheck,
double newThreshold,
int newMaxIter,
EventHandler<? super MagneticFieldDetector> newHandler)
Build a new instance.
|
double |
g(SpacecraftState s)
Compute the value of the detection function.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
public MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel type, OneAxisEllipsoid body) throws OrekitIllegalArgumentException
The new instance uses default values for maximal checking interval
(AbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).
limit
- the threshold value of magnetic field at see leveltype
- the magnetic field modelbody
- the bodyOrekitIllegalArgumentException
- if orbit type is OrbitType.CARTESIAN
public MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel type, OneAxisEllipsoid body, boolean seaLevel) throws OrekitIllegalArgumentException
The new instance uses default values for maximal checking interval
(AbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).
limit
- the threshold value of magnetic field at see leveltype
- the magnetic field modelbody
- the bodyseaLevel
- true if the magnetic field intensity is computed at the sea level, false if it is computed at satellite altitudeOrekitIllegalArgumentException
- if orbit type is OrbitType.CARTESIAN
public MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel type, OneAxisEllipsoid body, boolean seaLevel) throws OrekitIllegalArgumentException
maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)limit
- the threshold value of magnetic field at see leveltype
- the magnetic field modelbody
- the bodyseaLevel
- true if the magnetic field intensity is computed at the sea level, false if it is computed at satellite altitudeOrekitIllegalArgumentException
- if orbit type is OrbitType.CARTESIAN
protected MagneticFieldDetector create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super MagneticFieldDetector> newHandler)
create
in class AbstractDetector<MagneticFieldDetector>
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic 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.
The default implementation does nothing
This implementation sets the direction of propagation and initializes the event
handler. If a subclass overrides this method it should call super.init(s0, t)
.
init
in interface EventDetector
init
in class AbstractDetector<MagneticFieldDetector>
s0
- initial statet
- target time for the integrationpublic double g(SpacecraftState s)
The value is the angle difference between the spacecraft and the fixed
angle to be crossed, with some sign tweaks to ensure continuity.
These tweaks imply the increasing
flag in events detection becomes
irrelevant here! As an example, the angle always increase in a Keplerian
orbit, but this g function will increase and decrease so it
will cross the zero value once per orbit, in increasing and decreasing
directions on alternate orbits..
g
in interface EventDetector
g
in class AbstractDetector<MagneticFieldDetector>
s
- the current state information: date, kinematics, attitudeCopyright © 2002-2019 CS Systèmes d'information. All rights reserved.