VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions
makVrv::DtMagneticModel Class Reference

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.

Inheritance diagram for makVrv::DtMagneticModel:
Inheritance graph
[legend]

Public Member Functions

 DtMagneticModel ()
 
virtual ~DtMagneticModel ()
 
 DtMagneticModel (const DtMagneticModel &other)
 
DtMagneticModel & operator= (const DtMagneticModel &other)=delete
 
DtMagneticModel * clone () const
 
- Public Member Functions inherited from makVrv::DtWorldMagneticModel
 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
 
virtual double trueToMagneticHeading (const DtVector &geocentricPos, double trueHeadingRad) const
 
virtual double magneticToTrueHeading (const DtVector &geocentricPos, double magneticHeadingRad) const
 
virtual double getMagneticNorth (const DtGeodeticCoord &geodeticPos)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtMagneticModel & instance (DtDe &de)
 
static void registerInstance (DtDe &de, DtMagneticModel *instance)
 
static DtMagneticModel & instance (DtBaseConnection &conn)
 
static void registerInstance (DtBaseConnection &conn, DtMagneticModel *instance)
 
static void copyInstance (DtBaseConnection &conn, DtDe &de)
 

Additional Inherited Members

- Protected Member Functions inherited from makVrv::DtWorldMagneticModel
virtual bool computeYearMonthDay (const time_t unixTime, int &year, int &month, int &day) const
 
- Protected Attributes inherited from makVrv::DtWorldMagneticModel
MAGtype_MagneticModel * myMagneticModels [1]
 
MAGtype_MagneticModel * myTimedMagneticModel
 
MAGtype_Ellipsoid myEllip
 
MAGtype_Geoid myGeoid
 
MAGtype_Date myDate
 
time_t myUnixTime
 
bool myBadInit
 

Constructor & Destructor Documentation

makVrv::DtMagneticModel::DtMagneticModel ( )

Constructor note: Must call init() to use the object.

virtual makVrv::DtMagneticModel::~DtMagneticModel ( )
virtual

Destructor.

makVrv::DtMagneticModel::DtMagneticModel ( const DtMagneticModel &  other)

Copy Constructor.

Member Function Documentation

DtMagneticModel& makVrv::DtMagneticModel::operator= ( const DtMagneticModel &  other)
delete

Assignment Operator not implemented - Assignment not allowed.

DtMagneticModel* makVrv::DtMagneticModel::clone ( ) const

Create a copy of the world magnetic model.

static DtMagneticModel& makVrv::DtMagneticModel::instance ( DtDe &  de)
static

Access an instance of DtMagneticModel 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 void makVrv::DtMagneticModel::registerInstance ( DtDe &  de,
DtMagneticModel *  instance 
)
static

Register an initialized instance of the DtMagneticModel on the DtDe.

static DtMagneticModel& makVrv::DtMagneticModel::instance ( DtBaseConnection &  conn)
static

Access an instance of DtMagneticModel 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 void makVrv::DtMagneticModel::registerInstance ( DtBaseConnection &  conn,
DtMagneticModel *  instance 
)
static

Register an initialized instance of the DtMagneticModel on a DtBaseConnection.

static void makVrv::DtMagneticModel::copyInstance ( DtBaseConnection &  conn,
DtDe &  de 
)
static

Copy instance will create a clone of the DtMagneticModel currently registered on the specified DtDe and register that clone on the specified DtBaseConnection.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)