fusegyro
Correct states using gyroscope data for
insfilterAsync
Description
[
fuses gyroscope data to correct the state estimate.res
,resCov
] = fusegyro(FUSE
,gyroReadings
,gyroCovariance
)
Examples
Fuse Gyroscope Data Using insfilterAsync
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 an gyroscope measurement with its covariance.
angularVel = [1 1 1]
angularVel = 1×3
1 1 1
angularVelCovariance = 0.01*diag([1 1 1]); [res,resCovariance] = fusegyro(filter,angularVel,angularVelCovariance)
res = 1×3
1 1 1
resCovariance = 3×3
0.0120 0 0
0 0.0120 0
0 0 0.0120
Display the state after the fusing.
disp(filter.State')
1.0000 0 0 0 0.0833 0.0833 0.0833 0 0 0 0 0 0 0 0 0 0 0 0 0.0833 0.0833 0.0833 27.5550 -2.4169 -16.0849 0 0 0
Input Arguments
FUSE
— insfilterAsync
object
object
insfilterAsync
, specified as an object.
gyroReadings
— Gyroscope readings in local sensor body coordinate system (rad/s)
3-element row vector
Gyroscope readings in local sensor body coordinate system in rad/s, specified as a 3-element row vector.
Data Types: single
| double
gyroCovariance
— Covariance of gyroscope measurement error ((rad/s)2)
scalar | 3-element row vector | 3-by-3 matrix
Covariance of gyroscope measurement error in (rad/s)2, specified as a scalar, 3-element row vector, or 3-by-3 matrix.
Data Types: single
| double
Output Arguments
res
— Residual
1-by-3 vector of real values
Residual, returned as a 1-by-3 vector of real values in rad/s.
resCov
— Residual covariance
3-by-3 matrix of real values
Residual covariance, returned as a 3-by-3 matrix of real values in (rad/s)2.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2019a
See Also
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
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)