Estimate pose from MARG and GPS data
The insfilterMARG
object implements sensor fusion of MARG and GPS
data to estimate pose in the NED (or ENU) reference frame. MARG (magnetic, angular rate,
gravity) data is typically derived from magnetometer, gyroscope, and accelerometer sensors.
The filter uses a 22-element state vector to track the orientation quaternion, velocity,
position, MARG sensor biases, and geomagnetic vector. The insfilterMARG
object
uses an extended Kalman filter to estimate these quantities.
creates an
filter
= insfilterMARGinsfilterMARG
object with default property values.
allows you to specify the reference frame, filter
= insfilterMARG('ReferenceFrame'
,RF
)RF
, of the
filter
. Specify RF
as 'NED'
(North-East-Down) or 'ENU'
(East-North-Up). The default value is
'NED'
.
also allows you set properties of the created filter
= insfilterMARG(___,Name,Value
)filter
using one or
more name-value pairs. Enclose each property name in single quotes.
correct | Correct states using direct state measurements for insfilterMARG
|
residual | Residuals and residual covariances from direct state measurements for
insfilterMARG |
fusegps | Correct states using GPS data for insfilterMARG |
residualgps | Residuals and residual covariance from GPS measurements for
insfilterMARG |
fusemag | Correct states using magnetometer data for
insfilterMARG |
residualmag | Residuals and residual covariance from magnetometer measurements for
insfilterMARG |
pose | Current orientation and position estimate for
insfilterMARG |
predict | Update states using accelerometer and gyroscope data for
insfilterMARG |
reset | Reset internal states for insfilterMARG |
stateinfo | Display state vector information for insfilterMARG |
copy | Create copy of insfitlerMARG |
Note: The following algorithm only applies to an NED reference frame.
insfilterMARG
uses a 22-axis extended Kalman filter structure to estimate
pose in the NED reference frame. The state is defined as:
where
q0, q1, q2, q3 –– Parts of orientation quaternion. The orientation quaternion represents a frame rotation from the platform's current orientation to the local NED coordinate system.
positionN, positionE, positionD –– Position of the platform in the local NED coordinate system.
νN, νE, νD –– Velocity of the platform in the local NED coordinate system.
ΔθbiasX, ΔθbiasY, ΔθbiasZ –– Bias in the integrated gyroscope reading.
ΔνbiasX, ΔνbiasY, ΔνbiasZ –– Bias in the integrated accelerometer reading.
geomagneticFieldVectorN, geomagneticFieldVectorE, geomagneticFieldVectorD –– Estimate of the geomagnetic field vector at the reference location.
magbiasX, magbiasY, magbiasZ –– Bias in the magnetometer readings.
Given the conventional formation of the predicted state estimate,
uk is controlled by accelerometer and gyroscope data that has been converted to delta velocity and delta angle through trapezoidal integration. The predicted state estimation is:
where
ΔθX, ΔθY, ΔθZ –– Integrated gyroscope reading.
ΔνX, ΔνY, ΔνZ –– Integrated accelerometer readings.
Δt –– IMU sample time.
gN, gE, gD –– Constant gravity vector in the NED frame.
insfilterAsync
| insfilterErrorState
| insfilterNonholonomic