Class MagnetometerCalibrationScaleFactorBias

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class MagnetometerCalibrationScaleFactorBias : public navtk::magnetic::MagnetometerCalibration

General class for calibrating magnetometer measurements using a scale factor Matrix and a bias Vector.

Subclassed by navtk::magnetic::MagnetometerCalibrationCaruso2d, navtk::magnetic::MagnetometerCalibrationEllipse2d

Public Functions

std::pair<Matrix, Vector> get_calibration_params()

Get the Matrix of scale factors and distortions for each axis.

Returns

a pair containing the scale factor matrix and the bias vector

void set_calibration_params(Matrix const &sf, Vector const &b)

Set the Matrix of scale factors and distortions for each axis.

Parameters
  • sf – scale factor matrix to assign to [scale_factor]

  • b – the bias vector to assign to [bias]

virtual Vector apply_calibration(const Vector &mag) const override

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.

Protected Attributes

Matrix scale_factor

The scale factor and distortion matrix, with a row for each axis.

Vector bias

The bias vector, with an element for each axis.