diff --git a/src/modules/ekf2/EKF/ekf.h b/src/modules/ekf2/EKF/ekf.h index 6a25e7f41b..b7d213c65a 100644 --- a/src/modules/ekf2/EKF/ekf.h +++ b/src/modules/ekf2/EKF/ekf.h @@ -653,7 +653,7 @@ private: void resetHorizontalPositionTo(const Vector2f &new_horz_pos); - void resetVerticalPositionTo(const float &new_vert_pos); + void resetVerticalPositionTo(float new_vert_pos); void resetHeight(); diff --git a/src/modules/ekf2/EKF/ekf_helper.cpp b/src/modules/ekf2/EKF/ekf_helper.cpp index c6f33cb64d..ee10288437 100644 --- a/src/modules/ekf2/EKF/ekf_helper.cpp +++ b/src/modules/ekf2/EKF/ekf_helper.cpp @@ -229,7 +229,7 @@ void Ekf::resetHorizontalPositionTo(const Vector2f &new_horz_pos) _state_reset_status.posNE_counter++; } -void Ekf::resetVerticalPositionTo(const float &new_vert_pos) +void Ekf::resetVerticalPositionTo(const float new_vert_pos) { const float old_vert_pos = _state.pos(2); _state.pos(2) = new_vert_pos;