mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 21:27:35 +08:00
Merge pull request #1376 from tstellanova/hud_alt_reporting
Use global position altitude to report HUD altitude, for consistency.
This commit is contained in:
@@ -820,7 +820,11 @@ protected:
|
||||
msg.groundspeed = sqrtf(pos.vel_n * pos.vel_n + pos.vel_e * pos.vel_e);
|
||||
msg.heading = _wrap_2pi(att.yaw) * M_RAD_TO_DEG_F;
|
||||
msg.throttle = armed.armed ? act.control[3] * 100.0f : 0.0f;
|
||||
msg.alt = sensor_combined.baro_alt_meter;
|
||||
/*
|
||||
Do not use sensor_combined.baro_alt_meter here because
|
||||
it is mismatched with WSG84 AMSL used elsewhere for reporting altitude.
|
||||
*/
|
||||
msg.alt = pos.alt;
|
||||
msg.climb = -pos.vel_d;
|
||||
|
||||
_mavlink->send_message(MAVLINK_MSG_ID_VFR_HUD, &msg);
|
||||
|
||||
Reference in New Issue
Block a user