multirotor_pos_control: new ground level -> altitude setpoint correction fixed

This commit is contained in:
Anton Babushkin 2013-06-28 23:35:48 +04:00
parent a29e3b5a94
commit 7dfaed3ee7
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ static int multirotor_pos_control_thread_main(int argc, char *argv[]) {
if (local_pos.home_timestamp != home_alt_t) {
if (home_alt_t != 0) {
/* home alt changed, don't follow large ground level changes in manual flight */
local_pos_sp.z -= local_pos.home_alt - home_alt;
local_pos_sp.z += local_pos.home_alt - home_alt;
}
home_alt_t = local_pos.home_timestamp;
home_alt = local_pos.home_alt;