Earth magnetic model.
More...
#include <magnetic_model.h>
Earth magnetic model.
Definition at line 61 of file magnetic_model.h.
◆ MagneticModel()
magnetic_model::MagneticModel::MagneticModel |
( |
const cras::LogHelperPtr & |
log, |
|
|
const std::string & |
name, |
|
|
const std::string & |
modelPath, |
|
|
bool |
strict |
|
) |
| |
Create the magnetic model.
- Parameters
-
[in] | log | The logger. |
[in] | name | Name of the model (e.g. "wmm2020"). |
[in] | modelPath | Path to the folder with stored models. If empty, a default system location will be used. |
[in] | strict | Whether to fail if the magnetic model is used outside its natural validity bounds. |
◆ ~MagneticModel()
virtual magnetic_model::MagneticModel::~MagneticModel |
( |
| ) |
|
|
virtual |
◆ getMagneticField()
virtual cras::expected<MagneticField, std::string> magnetic_model::MagneticModel::getMagneticField |
( |
const sensor_msgs::NavSatFix & |
fix, |
|
|
const ros::Time & |
stamp |
|
) |
| const |
|
virtual |
Get the magnetic field vector on the provided place on Earth.
- Parameters
-
[in] | fix | The place for which magnetic field is queried. Timestamp from the message is ignored. |
[in] | stamp | The time for which magnetic field is queried. |
- Returns
- The magnetic field.
◆ getMagneticFieldComponents() [1/2]
Get the components of the measured magnetic field.
- Parameters
-
[in] | field | The measured magnetic field. |
[in] | stamp | The time for which magnetic field components are queried. |
- Returns
- The magnetic field components.
◆ getMagneticFieldComponents() [2/2]
Get the magnetic field components on the provided place on Earth.
- Parameters
-
[in] | fix | The place for which magnetic field components are queried. Timestamp from the message is ignored. |
[in] | stamp | The time for which magnetic field components are queried. |
- Returns
- The magnetic field components.
◆ isValid() [1/2]
virtual bool magnetic_model::MagneticModel::isValid |
( |
const ros::Time & |
time | ) |
const |
|
virtual |
Tell whether this model is valid at the given time instant.
- Parameters
-
[in] | time | The time of validity. |
- Returns
- Whether the model is valid (regardless of strictness).
◆ isValid() [2/2]
virtual bool magnetic_model::MagneticModel::isValid |
( |
int |
year | ) |
const |
|
virtual |
Tell whether this model is valid at the given year.
- Parameters
-
[in] | year | The year of validity. |
- Returns
- Whether the model is valid (regardless of strictness).
◆ data
std::unique_ptr<MagneticModelPrivate> magnetic_model::MagneticModel::data |
|
protected |
◆ strict
bool magnetic_model::MagneticModel::strict {true} |
|
protected |
If true, the magnetic model will fail if it is used outside its bounds.
Definition at line 123 of file magnetic_model.h.
◆ WMM2010
const char* magnetic_model::MagneticModel::WMM2010 |
|
static |
◆ WMM2015
const char* magnetic_model::MagneticModel::WMM2015 |
|
static |
◆ WMM2020
const char* magnetic_model::MagneticModel::WMM2020 |
|
static |
◆ WMM2025
const char* magnetic_model::MagneticModel::WMM2025 |
|
static |
The documentation for this class was generated from the following file: