Class MagneticFieldDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<MagneticFieldDetector>
-
- org.orekit.propagation.events.MagneticFieldDetector
-
- All Implemented Interfaces:
EventDetector
public class MagneticFieldDetector extends AbstractDetector<MagneticFieldDetector>
Detector for Earth magnetic field strength.The detector is based on the field intensity calculated at the satellite's latitude and longitude, either at sea level or at satellite altitude, depending on the value chosen for the
atSeaLevel
indicator.
It can detect flyovers of the South-Atlantic anomaly with a classically accepted limit value of 32,000 nT at sea level.- Author:
- Romaric Her
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel)
Build a detector.MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel, DataContext dataContext)
Build a detector.MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body)
Build a new detector.MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel)
Build a new detector.protected
MagneticFieldDetector(EventDetectionSettings detectionSettings, EventHandler handler, double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel, DataContext dataContext)
Protected constructor with full parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MagneticFieldDetector
create(EventDetectionSettings detectionSettings, EventHandler 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.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getDetectionSettings, getHandler, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
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.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold
-
-
-
-
Constructor Detail
-
MagneticFieldDetector
@DefaultDataContext public MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body)
Build a new detector.This constructor uses:
- the
default data context
- the
default value
for maximal checking interval - the
default value
for convergence threshold - the
atSeaLevel
switch set to false
- Parameters:
limit
- threshold value for magnetic field detection, in Teslasmodel
- magnetic field modelbody
- Earth body shape- See Also:
MagneticFieldDetector(double, double, double, GeoMagneticFieldFactory.FieldModel, OneAxisEllipsoid, boolean, DataContext)
- the
-
MagneticFieldDetector
@DefaultDataContext public MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel)
Build a new detector.This constructor uses:
- the
default data context
- the
default value
for maximal checking interval - the
default value
for convergence threshold
- Parameters:
limit
- threshold value for magnetic field detection, in Teslasmodel
- magnetic field modelbody
- Earth body shapeatSeaLevel
- switch for calculating field intensity at sea level (true) or satellite altitude (false)- See Also:
MagneticFieldDetector(double, double, double, GeoMagneticFieldFactory.FieldModel, OneAxisEllipsoid, boolean, DataContext)
- the
-
MagneticFieldDetector
@DefaultDataContext public MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel)
Build a detector.This method uses the
default data context
.- Parameters:
maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)limit
- threshold value for magnetic field detection, in Teslasmodel
- magnetic field modelbody
- Earth body shapeatSeaLevel
- switch for calculating field intensity at sea level (true) or satellite altitude (false)- See Also:
MagneticFieldDetector(double, double, double, GeoMagneticFieldFactory.FieldModel, OneAxisEllipsoid, boolean, DataContext)
-
MagneticFieldDetector
public MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel, DataContext dataContext)
Build a detector.- Parameters:
maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)limit
- threshold value for magnetic field detection, in Teslasmodel
- magnetic field modelbody
- Earth body shapeatSeaLevel
- switch for calculating field intensity at sea level (true) or satellite altitude (false)dataContext
- used to look up the magnetic field model.- Since:
- 10.1
-
MagneticFieldDetector
protected MagneticFieldDetector(EventDetectionSettings detectionSettings, EventHandler handler, double limit, GeoMagneticFieldFactory.FieldModel model, OneAxisEllipsoid body, boolean atSeaLevel, DataContext dataContext)
Protected constructor with full parameters.This constructor is not public as users are expected to use the builder API with the various
withXxx()
methods to set up the instance in a readable manner without using a huge amount of parameters.- Parameters:
detectionSettings
- event detection settingshandler
- event handler to call at event occurrenceslimit
- threshold value for magnetic field detection, in Teslasmodel
- magnetic field modelbody
- Earth body shapeatSeaLevel
- switch for calculating field intensity at sea level (true) or satellite altitude (false)dataContext
- used to look up the magnetic field model.- Since:
- 13.0
-
-
Method Detail
-
create
protected MagneticFieldDetector create(EventDetectionSettings detectionSettings, EventHandler newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<MagneticFieldDetector>
- Parameters:
detectionSettings
- detection settingsnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
init
public void init(SpacecraftState s0, AbsoluteDate t)
Initialize event handler at the start of a propagation.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)
.- Specified by:
init
in interfaceEventDetector
- Overrides:
init
in classAbstractDetector<MagneticFieldDetector>
- Parameters:
s0
- initial statet
- target time for the integration
-
g
public double g(SpacecraftState s)
Compute the value of the detection function.The returned value is the difference between the field intensity at spacecraft location, taking
atSeaLevel
switch into account, and the fixed threshold value.- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- difference between the field intensity at spacecraft location and the fixed threshold value
-
-