From 95871c8d2be0236145143d55bc095f4ba1f93269 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Mon, 12 Aug 2013 14:39:04 +0200 Subject: [PATCH] [rotorcraft] v_adapt: reset while not in_flight --- sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c b/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c index c8cd29d6e1..53f74082a7 100644 --- a/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c +++ b/sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c @@ -166,6 +166,10 @@ void guidance_v_run(bool_t in_flight) { if (in_flight) { gv_adapt_run(stateGetAccelNed_i()->z, stabilization_cmd[COMMAND_THRUST], guidance_v_zd_ref); } + else { + /* reset estimate while not in_flight */ + gv_adapt_init(); + } switch (guidance_v_mode) {