mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-15 03:07:35 +08:00
multirotor_pos_control: new ground level -> altitude setpoint correction fixed
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user