Fixes for Sim - Missing climb rate calculation

This commit is contained in:
Jason Short 2011-11-08 10:46:52 -08:00
parent 10bbfdbe11
commit 1ab1d8bab4
2 changed files with 8 additions and 6 deletions

View File

@ -1210,8 +1210,10 @@ static void update_altitude()
altitude_sensor = BARO;
#if HIL_MODE == HIL_MODE_ATTITUDE
current_loc.alt = g_gps->altitude - gps_base_alt;
return;
current_loc.alt = g_gps->altitude - gps_base_alt;
climb_rate = (g_gps->altitude - old_baro_alt) * 10;
old_baro_alt = g_gps->altitude;
return;
#else
// calc the vertical accel rate

View File

@ -262,10 +262,10 @@ static void NOINLINE send_gps_status(mavlink_channel_t chan)
mavlink_msg_gps_status_send(
chan,
g_gps->num_sats,
NULL,
NULL,
NULL,
NULL,
next_WP.alt,
nav_throttle,
angle_boost,
manual_boost,
NULL);
}