![]() |
VR-Forces 5.0.3 Developer's Guide
|
Contains the interface to the world magnetic model. The class utilizes the WMM c code provided by NOAA which has been wrapped into makWMM.
This class is initialized using a coefficients file called WMM.COF which resides in the bin(platform) folder. Note that the parameters are good until the year 2025. The parameters have a 5 year epoch that deteriorates over the 5 year period (2020 - 2024). The WMM.COF file will need to be updated after the epoch ends. see this link for more information: https://www.ngdc.noaa.gov/geomag/WMM/limit.shtml
The basic use of this class is to compute the magnetic north declination at any given location on the globe. See the positionToMagneticNorth method.

Public Member Functions | |
| DtWorldMagneticModel () | |
| virtual | ~DtWorldMagneticModel () |
| DtWorldMagneticModel (const DtWorldMagneticModel &other) | |
| DtWorldMagneticModel & | operator= (const DtWorldMagneticModel &other)=delete |
| DtWorldMagneticModel * | clone () const |
| virtual bool | init (const time_t unixTime) |
| virtual bool | badInit () const |
| virtual void | setTime (const time_t unixTime) |
| virtual const time_t | unixTime () const |
| virtual double | positionToMagneticNorth (const DtGeodeticCoord &pos) const |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtWorldMagneticModel & | instance (DtDe &de) |
| static void | registerInstance (DtDe &de, DtWorldMagneticModel *instance) |
| static DtWorldMagneticModel & | instance (DtBaseConnection &conn) |
| static void | registerInstance (DtBaseConnection &conn, DtWorldMagneticModel *instance) |
| static void | copyInstance (DtBaseConnection &conn, DtDe &de) |
Protected Member Functions | |
| virtual bool | computeYearMonthDay (const time_t unixTime, int &year, int &month, int &day) const |
Protected Attributes | |
| MAGtype_MagneticModel * | myMagneticModels [1] |
| MAGtype_MagneticModel * | myTimedMagneticModel |
| MAGtype_Ellipsoid | myEllip |
| MAGtype_Geoid | myGeoid |
| MAGtype_Date | myDate |
| time_t | myUnixTime |
| bool | myBadInit |
| makVrv::DtWorldMagneticModel::DtWorldMagneticModel | ( | ) |
Constructor note: Must call init() to use the object.
|
virtual |
Destructor.
| makVrv::DtWorldMagneticModel::DtWorldMagneticModel | ( | const DtWorldMagneticModel & | other | ) |
Copy Constructor.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
| DtWorldMagneticModel* makVrv::DtWorldMagneticModel::clone | ( | ) | const |
Create a copy of the world magnetic model.
|
virtual |
Initialize the WMM model using the "WMM.COF" located in the bin(platform) folder. This is required to be called before using the object. This returns true if the initialization is successful; false otherwise.
|
virtual |
Returns true if initialization was unsucessful.
|
virtual |
Sets the current time used for the WMM model. This will update the model time.
|
virtual |
Returns the time used for the WMM model.
|
virtual |
Computes magnetic north declination at the given radian geodetic coordinates. Returns declination in radians. declination is the angle between true north and magnetic north, positive east rotation.
| pos | The location radian geodetic coordinates. |
|
static |
Access an instance of DtWorldMagneticModel from the DtDe. Note that this does NOT create an instance if it doesn't exist; an instance MUST be registered (currently done by DtSharedState). This will throw an exception if the instance doesn't exist.
|
static |
Register an initialized instance of the DtWorldMagneticModel on the DtDe.
|
static |
Access an instance of DtWorldMagneticModel from a DtBaseConnection. Note that this does NOT create an instance if it doesn't exist; an instance MUST be registered. This will throw an exception if the instance doesn't exist.
|
static |
Register an initialized instance of the DtWorldMagneticModel on a DtBaseConnection.
|
static |
Copy instance will create a clone of the DtWorldMagneticModel currently registered on the specified DtDe and register that clone on the specified DtBaseConnection.
|
protectedvirtual |
Computes the (year, month, day) from the given time. Returns true on success.
| unixTime | The input time. |
| year | The computed output year. |
| month | The computed output month (1 - 12); 1 = january. |
| day | The computed output day or the month (1 - 31). |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |