Skip to content

Commit

Permalink
Remove non enterable if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilritz authored and bresch committed Dec 11, 2019
1 parent cd030e7 commit 66f707e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions EKF/ekf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,6 @@ bool Ekf::initialiseFilter()
increaseQuatYawErrVariance(sq(fmaxf(_params.mag_heading_noise, 1.0e-2f)));
}

if (_control_status.flags.rng_hgt) {
// if we are using the range finder as the primary source, then calculate the baro height at origin so we can use baro as a backup
// so it can be used as a backup ad set the initial height using the range finder
const baroSample &baro_newest = _baro_buffer.get_newest();
_baro_hgt_offset = baro_newest.hgt;
_state.pos(2) = -math::max(_rng_filt_state * _R_rng_to_earth_2_2, _params.rng_gnd_clearance);
ECL_INFO_TIMESTAMPED("EKF using range finder height - commencing alignment");

}

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

Expand Down

0 comments on commit 66f707e

Please sign in to comment.