Skip to content

Commit

Permalink
Merge pull request PX4#45 from wingtra/pr-keep_yaw_var
Browse files Browse the repository at this point in the history
EKF: initialize covariances before we reset the heading in order to p…
  • Loading branch information
sverling committed Jan 21, 2019
2 parents b26c706 + fc5fb68 commit cb9f9f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EKF/ekf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ bool Ekf::initialiseFilter()
_state.mag_B.setZero();
_state.wind_vel.setZero();

// initialise the state covariance matrix
initialiseCovariance();

// get initial roll and pitch estimate from delta velocity vector, assuming vehicle is static
float pitch = 0.0f;
float roll = 0.0f;
Expand Down Expand Up @@ -295,9 +298,6 @@ bool Ekf::initialiseFilter()

}

// initialise the state covariance matrix
initialiseCovariance();

// try to initialise the terrain estimator
_terrain_initialised = initHagl();

Expand Down

0 comments on commit cb9f9f6

Please sign in to comment.