correct
Correct states using direct state measurements for
insfilterAsync
Description
correct(
corrects the state and state estimation error covariance based on the measurement and
measurement covariance. The measurement maps directly to the state specified by the indices
FUSE
,idx
,measurement
,measurementCovariance
)idx
.
Examples
Correct insfilterAsync
Using Direct Measurement
Create
an insfilterAsync
object and display its state.
filter = insfilterAsync; disp(filter.State')
1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 27.5550 -2.4169 -16.0849 0 0 0
Fuse a position measurement with its corresponding covariance.
idx = [8 9 10]; measure = [10 10 0]; measureCov = 1e-4*diag([5 5 5]); correct(filter,idx,measure,measureCov)
Display the state after the fusing.
disp(filter.State')
1.0000 0 0 0 0 0 0 6.6667 6.6667 0 0 0 0 0 0 0 0 0 0 0 0 0 27.5550 -2.4169 -16.0849 0 0 0
Input Arguments
FUSE
— insfilterAsync
object
object
insfilterAsync
, specified as an object.
idx
— State vector index of measurement to correct
N-element vector of increasing integers in the range [1,
28]
State vector index of measurement to correct, specified as an N-element vector of increasing integers in the range [1, 28].
The state values represent:
State | Units | Index |
---|---|---|
Orientation (quaternion parts) | N/A | 1:4 |
Angular Velocity (XYZ) | rad/s | 5:7 |
Position (NED) | m | 8:10 |
Velocity (NED) | m/s | 11:13 |
Acceleration (NED) | m/s2 | 14:16 |
Accelerometer Bias (XYZ) | m/s2 | 17:19 |
Gyroscope Bias (XYZ) | rad/s | 20:22 |
Geomagnetic Field Vector (NED) | μT | 23:25 |
Magnetometer Bias (XYZ) | μT | 26:28 |
Data Types: single
| double
measurement
— Direct measurement of state
N-element vector
Direct measurement of state, specified as an N-element vector.
N is the number of elements of the index argument,
idx
.
Data Types: single
| double
measurementCovariance
— Covariance of measurement
scalar | N-element vector | N-by-N matrix
Covariance of measurement, specified as a scalar, N-element
vector, or N-by-N matrix. N is
the number of elements of the index argument, idx
.
Data Types: single
| double
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2019a
See Also
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)