src/ukf.cpp
/**
 * Updates the state and the state covariance matrix using a laser measurement.
 * @param {MeasurementPackage} meas_package
 */
Updates the state and the state covariance matrix using a laser measurement.
Updates the state and the state covariance matrix using a laser measurement .
void UKF::UpdateLidar(MeasurementPackage meas_package) {
  const int n_z = 2;
  VectorXd z_pred = VectorXd(n_z);              
  MatrixXd Zsig = MatrixXd(n_z, n_sigma_);      
  MatrixXd S = MatrixXd(n_z, n_z);              
  Zsig.fill(0.0);
  z_pred.fill(0.0);
  S.fill(0.0);
  PredictLidarMeasurement(z_pred, Zsig, S);
  UpdateState(meas_package, z_pred, Zsig, S);
  CalculateNIS(meas_package, z_pred, S);
}
void UKF :: UpdateLidar ( MeasurementPackage meas_package ) { const int n_z = 2 ; VectorXd z_pred = VectorXd ( n_z ) ; MatrixXd Zsig = MatrixXd ( n_z , n_sigma_ ) ; MatrixXd S = MatrixXd ( n_z , n_z ) ; Zsig . fill ( 0.0 ) ; z_pred . fill ( 0.0 ) ; S . fill ( 0.0 ) ; PredictLidarMeasurement ( z_pred , Zsig , S ) ; UpdateState ( meas_package , z_pred , Zsig , S ) ; CalculateNIS ( meas_package , z_pred , S ) ; }
Updates the state and the state covariance matrix using a laser measurement.
Updates the state and the state covariance matrix using a laser measurement .
// measurement dimension. lidar can measure px and py // predicted measurement // sigma points transformed to measurement space // measurement covariance matrix // initializing in/out variables // 1: measurement prediction step // 2: update step // +1: calculating NIS