position_estimator_inav: publish vertical position derivative

This commit is contained in:
Paul Riseborough 2017-04-27 11:24:51 +10:00 committed by Dennis Mannhart
parent a147179ad8
commit 28017105f4
1 changed files with 6 additions and 0 deletions

View File

@ -1346,6 +1346,9 @@ int position_estimator_inav_thread_main(int argc, char *argv[])
local_pos.evh = 0.0f;
local_pos.evv = 0.0f;
// this estimator does not provide a separate vertical position time derivative estimate, so use the vertical velocity
local_pos.z_deriv = z_est[1];
if (local_pos.dist_bottom_valid) {
local_pos.dist_bottom = dist_ground;
local_pos.dist_bottom_rate = - z_est[1];
@ -1371,6 +1374,9 @@ int position_estimator_inav_thread_main(int argc, char *argv[])
global_pos.vel_e = local_pos.vy;
global_pos.vel_d = local_pos.vz;
// this estimator does not provide a separate vertical position time derivative estimate, so use the vertical velocity
global_pos.pos_d_deriv = local_pos.vz;
global_pos.yaw = local_pos.yaw;
global_pos.eph = eph;