Module: magneticFieldWMM¶
Evaluate a magnetic field model about Earth for a range of spacecraft locations using the World Magnetic Model (WMM).
For more information on this module see this For more information on this module see this PDF Description
.
-
class
MagneticFieldWMM
: public MagneticFieldBase¶ Public Functions
-
MagneticFieldWMM
()¶ The constructor method initializes the dipole parameters to zero, resuling in a zero magnetic field result by default.
- Return
void
-
~MagneticFieldWMM
()¶ Clean up any memory allocations.
- Return
void
Public Members
-
std::string
epochInMsgName
¶ Message name of the epoch message
-
std::string
dataPath
¶ String with the path to the WMM coefficient file
-
double
epochDateFractionalYear
¶ Specified epoch date as a fractional year.
Private Functions
-
void
evaluateMagneticFieldModel
(MagneticFieldSimMsg *msg, double currentTime)¶ This method is evaluates the centered dipole magnetic field model.
- Return
void
- Parameters
msg
: magnetic field message structure
-
void
initializeWmm
(const char *dataPath)¶
-
void
cleanupEarthMagFieldModel
()¶ Performs memory cleanup necessary for magnetic field models
- Return
void
- Parameters
msg
: magnetic field message structure
-
void
computeWmmField
(double decimalYear, double phi, double lambda, double h, double B_M[3])¶
-
void
customReset
(uint64_t CurrentClock)¶ Custom Reset() method. This loads the WMM coefficient file and gets the model setup.
- Return
void
-
void
customCrossInit
()¶ Custom CrossInit() method. Subscribe to the epoch message.
- Return
void
-
void
customSetEpochFromVariable
()¶ Custom customSetEpochFromVariable() method. This allows specifying epochDateFractionYear directly from Python. If an epoch message is set then this variable is not used.
- Return
void
-
void
decimalYear2Gregorian
(double fractionalYear, struct tm *gregorian)¶ Convert a fraction year double value into a time structure with gregorian date/time information
- Return
void
-
double
gregorian2DecimalYear
(double currentTime)¶ Convert a time structure with gregorian date/time information into a fraction year value.
- Return
double
Private Members
-
MAGtype_MagneticModel *
magneticModels
[1]¶
-
MAGtype_MagneticModel *
timedMagneticModel
¶
-
MAGtype_Ellipsoid
ellip
¶
-
MAGtype_Geoid
geoid
¶
-
MAGtype_Date
userDate
¶
-