src/ukf.cpp
/**
 * Initializes Unscented Kalman filter
 * This is scaffolding, do not modify
 */
Initializes Unscented Kalman filter
This is scaffolding, do not modify
Initializes Unscented Kalman filter This is scaffolding do not modify
UKF::UKF() {
  use_lidar_ = true;
  use_radar_ = true;
  n_x_ = 5;
  n_aug_ = n_x_ + 2;
  lambda_ = 3 - n_x_;
  x_ = VectorXd(n_x_);
  P_ = MatrixXd(n_x_, n_x_);
  weights_ = VectorXd(2 * n_aug_ + 1);
  double weight_0 = lambda_ / (lambda_ + n_aug_);
  weights_(0) = weight_0;
  for (int i = 1; i < 2 * n_aug_ + 1; i++) {
    double weight = 0.5 / (n_aug_ + lambda_);
    weights_(i) = weight;
  }
  std_a_ = 0.7;
  std_yawdd_ = 1.0;
}
UKF :: UKF ( ) { use_lidar_ = true ; use_radar_ = true ; n_x_ = 5 ; n_aug_ = n_x_ + 2 ; lambda_ = 3 - n_x_ ; x_ = VectorXd ( n_x_ ) ; P_ = MatrixXd ( n_x_ , n_x_ ) ; weights_ = VectorXd ( 2 * n_aug_ + 1 ) ; double weight_0 = lambda_ / ( lambda_ + n_aug_ ) ; weights_ ( 0 ) = weight_0 ; for ( int i = 1 ; i < 2 * n_aug_ + 1 ; i ++ ) { double weight = 0.5 / ( n_aug_ + lambda_ ) ; weights_ ( i ) = weight ; } std_a_ = 0.7 ; std_yawdd_ = 1.0 ; }
Initializes Unscented Kalman filter
 This is scaffolding, do not modify
Initializes Unscented Kalman filter This is scaffolding do not modify
// if this is false, laser measurements will be ignored (except during init) // if this is false, radar measurements will be ignored (except during init) // initial state vector // initial covariance matrix // initialization of weights // Process noise standard deviation longitudinal acceleration in m/s^2 // Process noise standard deviation yaw acceleration in rad/s^2