From 009f42b2e1f98828e7334a5008e05b53e2971178 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 4 Aug 2014 11:31:46 +0900 Subject: [PATCH] InertialNav: do not reset velocity after glitch clears --- libraries/AP_InertialNav/AP_InertialNav.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libraries/AP_InertialNav/AP_InertialNav.cpp b/libraries/AP_InertialNav/AP_InertialNav.cpp index b30bc21c65..4f99056693 100644 --- a/libraries/AP_InertialNav/AP_InertialNav.cpp +++ b/libraries/AP_InertialNav/AP_InertialNav.cpp @@ -185,8 +185,6 @@ void AP_InertialNav::correct_with_gps(uint32_t now, int32_t lon, int32_t lat) // reset the inertial nav position and velocity to gps values if (_flags.gps_glitching) { set_position_xy(x,y); - set_velocity_xy(_ahrs.get_gps().velocity().x * 100.0f, - _ahrs.get_gps().velocity().y * 100.0f); _position_error.x = 0.0f; _position_error.y = 0.0f; }else{ @@ -334,7 +332,6 @@ void AP_InertialNav::correct_with_baro(float baro_alt, float dt) // reset the inertial nav alt to baro alt if (_flags.baro_glitching) { set_altitude(baro_alt); - set_velocity_z(_baro.get_climb_rate() * 100.0f); _position_error.z = 0.0f; }else{ // 3rd order samples (i.e. position from baro) are delayed by 150ms (15 iterations at 100hz)