Class MagnetometerCalibration

Inheritance Relationships

Derived Type

Class Documentation

class MagnetometerCalibration

An abstract class for calibrating magnetometer measurements.

Subclassed by navtk::magnetic::MagnetometerCalibrationScaleFactorBias

Public Functions

virtual ~MagnetometerCalibration() = default
virtual void generate_calibration(const Matrix &mag) = 0

Given x and y magnetometer values, compute the calibration parameters.

Parameters

mag – Matrix of magnetometer measurements(any units), with each row corresponding to an axis, and each column to a measurement.

virtual Vector apply_calibration(const Vector &mag) const = 0

Apply calibration parameters to a magnetometer measurement to obtain a calibrated measurement.

Parameters

mag – magnetic field measurement vector (any units)

Returns

Vector containing the calibrated magnetic field vector in the same units as the input values.

bool is_calibrated()

Get status of [calibrated].

Returns

whether or not the calibration parameters have been generated yet. If false, all calls to apply_calibration will return uncalibrated_measurements.

Returns

false

Protected Attributes

bool calibrated = false

Indicates whether the calibration parameters have been generated yet.

If this is false, all calls to apply_calibration will return uncalibrated measurements.