Changed mavlink GLOBAL_POSITION_INT.relative_alt message to correctly return altitude above ground.

This commit is contained in:
Jonathan Challinger 2012-07-16 20:20:20 -07:00 committed by Andrew Tridgell
parent a976a59c88
commit fc4f111d15
3 changed files with 6 additions and 6 deletions

View File

@ -236,8 +236,8 @@ static void NOINLINE send_location(mavlink_channel_t chan)
millis(),
current_loc.lat, // in 1E7 degrees
current_loc.lng, // in 1E7 degrees
g_gps->altitude*10, // millimeters above sea level
current_loc.alt * 10, // millimeters above ground
g_gps->altitude * 10, // millimeters above sea level
(current_loc.alt - home.alt) * 10, // millimeters above ground
g_gps->ground_speed * rot.a.x, // X speed cm/s
g_gps->ground_speed * rot.b.x, // Y speed cm/s
g_gps->ground_speed * rot.c.x,

View File

@ -198,8 +198,8 @@ static void NOINLINE send_location(mavlink_channel_t chan)
millis(),
current_loc.lat, // in 1E7 degrees
current_loc.lng, // in 1E7 degrees
g_gps->altitude*10, // millimeters above sea level
current_loc.alt * 10, // millimeters above ground
g_gps->altitude * 10, // millimeters above sea level
(current_loc.alt - home.alt) * 10, // millimeters above ground
g_gps->ground_speed * rot.a.x, // X speed cm/s
g_gps->ground_speed * rot.b.x, // Y speed cm/s
g_gps->ground_speed * rot.c.x,

View File

@ -241,8 +241,8 @@ static void NOINLINE send_location(mavlink_channel_t chan)
millis(),
current_loc.lat, // in 1E7 degrees
current_loc.lng, // in 1E7 degrees
g_gps->altitude*10, // millimeters above sea level
current_loc.alt * 10, // millimeters above ground
g_gps->altitude * 10, // millimeters above sea level
(current_loc.alt-home.alt) * 10, // millimeters above ground
g_gps->ground_speed * rot.a.x, // X speed cm/s
g_gps->ground_speed * rot.b.x, // Y speed cm/s
g_gps->ground_speed * rot.c.x,