residualmvo

Residuals and residual covariance from monocular visual odometry measurements for `insfilterErrorState`

Since R2020a

Syntax

``[pResidual,oResidual,resCov] = residualmvo(FUSE,position,positionCovariance,ornt,orntCovariance)``

Description

example

````[pResidual,oResidual,resCov] = residualmvo(FUSE,position,positionCovariance,ornt,orntCovariance)` computes the residual information based on the monocular visual odometry measurements and covariance.```

Examples

collapse all

`Create` an `insfilterErrorState` object and display its state.

```filter = insfilterErrorState; disp(filter.State')```
``` 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ```

Define a MOV reading and its covariance.

`position = [10 10 10]`
```position = 1×3 10 10 10 ```
```positionCovariance = eye(3); orientation = quaternion.ones; orientationCovariance = 0.1*[1 1 1];```

Obtain the residual and residual covariance.

```[pResidual,oResidual,resCovariance] = residualmvo(filter,position,positionCovariance, ... orientation,orientationCovariance)```
```pResidual = 1×3 10 10 10 ```
```oResidual = 1×3 0 0 0 ```
```resCovariance = 6×6 2.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 2.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 2.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.1000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.1000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.1000 ```

Input Arguments

collapse all

`insfilterErrorState`, specified as an object.

Position of camera in the local NED coordinate system in meters, specified as a real finite 3-element row vector.

Data Types: `single` | `double`

Position measurement covariance of MVO in m2, specified as a scalar, 3-element vector, or 3-by-3 matrix.

Data Types: `single` | `double`

Orientation of the camera with respect to the local NED coordinate system, specified as a scalar quaternion or 3-by-3 rotation matrix. The quaternion or rotation matrix is a frame rotation from the NED coordinate system to the current camera coordinate system.

Data Types: `quaternion` | `single` | `double`

Orientation measurement covariance of monocular visual odometry in rad2, specified as a scalar, 3-element vector, or 3-by-3 matrix.

Data Types: `single` | `double`

Output Arguments

collapse all

Position residual, returned as a 1-by-3 vector of real values in meters.

Rotation vector residual, returned a 1-by-3 vector of real values in radians.

Residual covariance, returned as a 6-by-6 matrix of real values.

Version History

Introduced in R2020a