Engee documentation

Complementary Filter

Page in progress.

Orientation calculation using an additional filter.

blockType: ComplementaryFilter

Path in the library:

/Navigation/Multisensor Positioning/Navigation filters/Complementary Filter

Description

Block Complementary Filter Combines accelerometer, magnetometer, and gyroscope data to estimate device orientation.

Ports

Input

# Accel — accelerometer readings in the coordinate system of the sensor housing, m/s2
the matrix

Details

Accelerometer readings in the coordinate system of the sensor housing in m/s2, set as a real matrix of size on , where — the number of samples, and the three columns of the matrix represent measurements respectively.

Data types

Float32, Float64

Complex numbers support

No

# Gyro — gyroscope readings in the coordinate system of the sensor housing, rad/s
the matrix

Details

The gyroscope readings in the coordinate system of the sensor housing in rad/s, set as a real matrix of the size on , where — the number of samples, and the three columns of the matrix represent measurements respectively.

Data types

Float32, Float64

Complex numbers support

No

# Mag — magnetometer readings in the coordinate system of the sensor housing, MCT
the matrix

Details

Magnetometer readings in the coordinate system of the sensor housing in mkTl, set as a real matrix of the size on , where — the number of samples, and the three columns of the matrix represent measurements respectively.

Dependencies

To use this port, check the box Enable Magnetometer input.

Data types

Float32, Float64

Complex numbers support

No

Output

# Orientation — orientation of the sensor housing coordinate system relative to the navigation coordinate system
the matrix | array

Details

The orientation of the sensor housing coordinate system relative to the navigation coordinate system, returned as a real matrix on or as an array of rotation matrices on on . Each row of the matrix on It contains four quaternion elements.

Number of input samples defines the size of the output data .

The output format depends on the parameter value Orientation format.

Data types

Float32, Float64

Complex numbers support

No

# Angular Velocity — angular velocity in the coordinate system of the sensor housing, rad/s
the matrix

Details

The angular velocity, taking into account the displacement of the gyroscope in the coordinate system of the sensor housing in rad/s, returned as a real matrix of the size on .

Number of input samples defines the size of the output data .

Data types

Float32, Float64

Complex numbers support

No

Parameters

Filter settings

# Reference frame — navigation coordinate system
NED | ENU

Details

The navigation coordinate system, set as NED (north-east-down) or ENU (east-north-up).

Values

NED | ENU

Default value

NED

Program usage name

DispRefFrame

Tunable

No

Evaluatable

No

# Orientation format — orientation output format
quaternion | Rotation matrix

Details

Output data format Orientation:

  • quaternion — the Orientation output port outputs a real matrix on . Each row of the matrix contains four quaternion elements.

  • Rotation matrix — the Orientation output port outputs an array of rotation matrices on on .

Number of input samples defines the size of the output data .

Values

quaternion | Rotation matrix

Default value

quaternion

Program usage name

OrientationFormat

Tunable

No

Evaluatable

No

Measurement parameters

# Accelerometer gain — accelerometer gain
Real number

Details

Accelerometer gain in the form of a real scalar in the range [0, 1]. The gain factor determines how much the unit trusts the accelerometer measurements compared to the gyroscope measurements for calculating orientation.

Default value

0.01

Program usage name

AccelerometerGain

Tunable

Yes

Evaluatable

Yes

# Enable Magnetometer input — accept magnetometer input readings
Logical

Details

Select this option to allow the magnetometer readings to be entered into the Mag port.

Default value

true (switched on)

Program usage name

HasMagnetometer

Tunable

No

Evaluatable

No

# Magnetometer gain — magnification factor of the magnetometer
Real number

Details

Specify the magnification factor of the magnetometer as a real scalar in the range [0, 1]. The gain factor determines how much the unit trusts the magnetometer measurements compared to the gyroscope measurements for calculating orientation.

Dependencies

To use this option, check the box Enable Magnetometer input.

Default value

0.01

Program usage name

MagnetometerGain

Tunable

Yes

Evaluatable

Yes