Class MagneticFieldDetector
- All Implemented Interfaces:
EventDetector
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_CHECK, DEFAULT_MAX_ITER, DEFAULT_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionMagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape body, boolean atSeaLevel) Build a detector.MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape body, boolean atSeaLevel, DataContext dataContext) Build a detector.MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape body) Build a new detector.MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape body, boolean atSeaLevel) Build a new detector.protectedMagneticFieldDetector(EventDetectionSettings detectionSettings, EventHandler handler, double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape body, boolean atSeaLevel, DataContext dataContext) Protected constructor with full parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected MagneticFieldDetectorcreate(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.doubleg(SpacecraftState s) Compute the value of the detection function.voidinit(SpacecraftState s0, AbsoluteDate t) Initialize event detector at the start of a propagation.Methods inherited from class org.orekit.propagation.events.AbstractDetector
checkIfForward, getDetectionSettings, getEventFunction, getHandler, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThresholdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.events.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold, reset
-
Constructor Details
-
MagneticFieldDetector
@DefaultDataContext public MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape body) Build a new detector.This constructor uses:
- the
default data context - the
default valuefor maximal checking interval - the
default valuefor convergence threshold - the
atSeaLevelswitch set to false
- Parameters:
limit- threshold value for magnetic field detection, in Teslasmodel- magnetic field modelbody- Earth body shape- See Also:
- the
-
MagneticFieldDetector
@DefaultDataContext public MagneticFieldDetector(double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape body, boolean atSeaLevel) Build a new detector.This constructor uses:
- the
default data context - the
default valuefor maximal checking interval - the
default valuefor 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:
- the
-
MagneticFieldDetector
@DefaultDataContext public MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape 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
public MagneticFieldDetector(double maxCheck, double threshold, double limit, GeoMagneticFieldFactory.FieldModel model, BodyShape 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, BodyShape 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 Details
-
create
protected MagneticFieldDetector create(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.- Specified by:
createin classAbstractDetector<MagneticFieldDetector>- Parameters:
detectionSettings- detection settingsnewHandler- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
init
Initialize event detector 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 initializes the handler.
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:
initin interfaceEventDetector- Overrides:
initin classAbstractDetector<MagneticFieldDetector>- Parameters:
s0- initial statet- target time for the integration
-
g
Compute the value of the detection function.The returned value is the difference between the field intensity at spacecraft location, taking
atSeaLevelswitch 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
-