Main Content


Residuals and residual covariance from altimeter measurements for ahrs10filter

Since R2020a



[res,resCov] = residualaltimeter(FUSE,altimeterReadings,altimeterReadingsCovariance) computes the residual, res, and the innovation covariance, resCov, based on the magnetometer readings and the corresponding covariance.


collapse all

Create an ahrs10filter object and display its state.

filter = ahrs10filter;
    1.0000         0         0         0         0         0         0         0         0         0         0         0   27.5550   -2.4169  -16.0849         0         0         0

Define altimeter data with a reading and a covariance. Obtain the residual of the data.

magReading = 50;
magCovariance = 4;
[res,resCovariance] = residualaltimeter(filter,magReading,magCovariance)
res = -50
resCovariance = 4.0000

Input Arguments

collapse all

ahrs10filter, specified as an object.

Altimeter readings in meters, specified as a real scalar.

Data Types: single | double

Altimeter readings error covariance in m2, specified as a real scalar.

Data Types: single | double

Output Arguments

collapse all

Measurement residual, returned as a scalar in meters.

Residual covariance, returned as a nonnegative scalar in m2.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2020a