Calibration Data Model
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Classes: Triad, AccelerationTriad, AngularSpeedTriad, MagneticFluxDensityTriad, SpeedTriad,
DistanceTriad, BodyKinematicsSequence, FrameBodyKinematics, FrameBodyMagneticFluxDensity,
StandardDeviationBodyKinematics, StandardDeviationFrameBodyKinematics,
StandardDeviationBodyMagneticFluxDensity, StandardDeviationFrameBodyMagneticFluxDensity,
StandardDeviationTimedBodyKinematics, TimedBodyKinematics, TimedBodyKinematicsAndMagneticFluxDensity,
IMUErrors, CalibrationException (see the Class Reference table at the end of this page for
Javadoc and source links).
Every calibrator in Accelerometer Calibration, Gyroscope Calibration, and Magnetometer Calibration consumes measurements built from a small set of shared, composable data classes. Understanding these once avoids repeating them on every calibrator page.
Triads
Triad<U, M> is the generic base for "three related scalar measurements sharing a unit," specialized as
AccelerationTriad, AngularSpeedTriad, MagneticFluxDensityTriad, SpeedTriad, and DistanceTriad.
Each wraps three com.irurueta.units measurements (e.g. three Acceleration values) as a single 3-axis
vector, with conversions to/from a raw double[]/Matrix for use in the linear algebra that calibrators
perform internally.
AccelerationTriad triad = new AccelerationTriad(0.15, -0.18, -9.79); // m/s^2, default unit
double[] asArray = triad.getValuesAsArray();
double norm = triad.getNorm(); // magnitude of the 3-axis vector
Building up a measurement
Calibration measurements are built by progressively attaching more context to a raw BodyKinematics
(specific force + angular rate) or magnetic-flux-density reading:
-
TimedBodyKinematics/TimedBodyKinematicsAndMagneticFluxDensity— add a (relative) timestamp, needed once measurements must be processed in sequence (e.g. byEasyGyroscopeCalibrator, which integrates angular rate over time). -
StandardDeviationBodyKinematics/StandardDeviationBodyMagneticFluxDensity— add the measurement’s standard deviation, used to weight measurements in a least-squares/robust fit (e.g. by a noise estimator's output). -
FrameBodyKinematics/FrameBodyMagneticFluxDensity— add the known NED/ECEF/velocity/orientation frame the measurement was taken at. This is what lets a "known frame" calibrator solve for sensor errors directly, without needing to also estimate orientation. -
StandardDeviationFrameBodyKinematics/StandardDeviationFrameBodyMagneticFluxDensity— both of the above combined; the most complete measurement type, used by most linear/non-linear least-squares calibrators. -
BodyKinematicsSequence<T extends TimedBodyKinematics>— an ordered collection of timed kinematics samples captured while the device was moving, bracketed by static periods (whose mean specific force approximates the local gravity direction in body axes). This is the measurement unit consumed byEasyGyroscopeCalibratorand is built by the interval detector/generator pipeline.
BodyKinematics rawKinematics = new BodyKinematics(0.15, -0.18, -9.79, 0.001, -0.0005, 0.02);
// a "known frame" measurement: raw kinematics + std devs + the frame it was taken at
NEDPosition position = new NEDPosition(Math.toRadians(41.3851), Math.toRadians(2.1734), 0.0);
CoordinateTransformation attitude = new CoordinateTransformation(
0.0, 0.0, 0.0, FrameType.LOCAL_NAVIGATION_FRAME, FrameType.BODY_FRAME);
NEDFrame frame = new NEDFrame(position, attitude);
StandardDeviationFrameBodyKinematics measurement =
new StandardDeviationFrameBodyKinematics(frame);
measurement.setKinematics(rawKinematics);
measurement.setSpecificForceStandardDeviation(0.01);
measurement.setAngularRateStandardDeviation(0.001);
IMUErrors
A container for a complete IMU error model: accelerometer bias and (scale
factor/cross-coupling), gyroscope bias, , and (g-dependent
bias), plus each sensor’s noise root-PSD and quantization level (see
the sensor error model). It is the output of a full calibration run
(assembled by IMUErrorsCreator, see Fixers: Undoing the Sensor Error Model) and can also be used as the input
to a synthetic-data generator to simulate a specific, imperfect IMU for testing.
double[] accelerometerBiases = {0.02, -0.01, 0.05};
double[] gyroBiases = {1e-4, -5e-5, 2e-5};
Matrix accelerometerMa = new Matrix(3, 3);
Matrix gyroMg = new Matrix(3, 3);
double accelerometerNoiseRootPsd = 1.2e-3;
double gyroNoiseRootPsd = 3.5e-5;
IMUErrors imuErrors = new IMUErrors(accelerometerBiases, gyroBiases, accelerometerMa, gyroMg,
accelerometerNoiseRootPsd, gyroNoiseRootPsd);
CalibrationException
Thrown by calibrators when the underlying numerical solve fails (e.g., an ill-conditioned or rank-deficient measurement set — too few measurements, or measurements that don’t sufficiently excite all axes).
Class Reference
Javadoc and source links for the classes used in the examples above:
| Class | Javadoc | Source |
|---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Where to go next
-
Fixers: Undoing the Sensor Error Model — applying a known
IMUErrorsto correct raw readings. -
Accelerometer Calibration, Gyroscope Calibration, Magnetometer Calibration — the calibrators that produce these error parameters.
-
reference.adoc#bibliography — bibliography.