Adjust state estimate based on sensor measurement
[
calculates the corrected system state and its associated uncertainty
covariance based on a sensor stateCorr
,stateCov
]
= correct(pf
,measurement
)measurement
at the
current time step. correct
uses the
MeasurementLikelihoodFcn
property from
the particle filter object, pf
, as a function
to calculate the likelihood of the sensor measurement for each
particle. The two inputs to the
MeasurementLikelihoodFcn
function are:
pf
– The
stateEstimatorPF
object, which
contains the particles of the current
iteration
measurement
– The sensor
measurements used to correct the state
estimate
The MeasurementLikelihoodFcn
function then extracts the best state estimate and covariance based
on the setting in the StateEstimationMethod
property.
[
passes all additional arguments in stateCorr
,stateCov
]
= correct(pf
,measurement
,varargin
)varargin
to
the underlying MeasurementLikelihoodFcn
after the
first three required inputs.
correct
| getStateEstimate
| initialize
| predict
| resamplingPolicyPF
| stateEstimatorPF