ecompass
Libraries:
Sensor Fusion and Tracking Toolbox /
Multisensor Positioning /
Navigation Filters
Navigation Toolbox /
Multisensor Positioning /
Navigation Filters
Description
The ecompass Simulink® block computes orientation using accelerometer and magnetometer readings. You can use the computed orientation to rotate quantities from global coordinate system to sensor body coordinate system.
Ports
Input
Accel — Accelerometer readings
N-by-3 matrix of real scalar
Accelerometer readings in sensor body coordinate system in m/s2, specified as an N-by-3 matrix of real scalar. The columns of the matrix correspond to the x-, y-, and z-axes of the sensor body. The rows in the matrix, N, correspond to individual samples.
Data Types: single
| double
Mag — Magnetometer readings
N-by-3 matrix of real scalar
Magnetometer readings in sensor body coordinate system in µT, specified as an N-by-3 matrix. The columns of the matrix correspond to the x-, y-, and z-axes of the sensor body. The rows in the matrix, N, correspond to individual samples.
Data Types: single
| double
Output
Orientation — Orientation that rotates quantities from global coordinate system to sensor body
coordinate system
N-by-4 matrix of quaternions (default) | 3-by-3-by-N array
Orientation that can rotate quantities from a global coordinate system to a sensor body coordinate system, returned as an N-by-4 matrix of quaternions or 3-by-3-by-N array of rotation matrices. N denotes the number of samples. Orientations are the rotation that takes a quantity from the local navigation coordinate system to the body coordinate system.
If the Orientation format is specified as
quaternion
, the block returns the orientation as an N-by-4 matrix of quaternions.If the Orientation format is specified as
Rotation matrix
, the block returns the orientation as an 3-by-3-by-N array of rotation matrices.
Data Types: single
| double
Parameters
To edit block parameters interactively, use the Property Inspector. From the Simulink Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
Reference frame — Navigation reference frame
NED
(default) | ENU
Navigation reference frame, specified as NED
for North-East-Down
frame or ENU
for East-North-Up frame.
Orientation format — Format used to describe orientation
quaternion
(default) | Rotation matrix
Format used to describe orientation, specified as 'quaternion'
or
'Rotation matrix'
.
Simulate using — Type of simulation to run
Interpreted execution
(default) | Code generation
Interpreted execution
— Simulate the model using the MATLAB® interpreter. This option shortens startup time. InInterpreted execution
mode, you can debug the source code of the block.Code generation
— Simulate the model using generated C code. The first time that you run a simulation, Simulink generates C code for the block. The C code is reused for subsequent simulations if the model does not change. This option requires additional startup time.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2024a
See Also
ecompass
| IMU | AHRS | Complementary Filter | IMU
Filter
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)