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

@ -237,7 +237,7 @@ static void NOINLINE send_location(mavlink_channel_t chan)
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
(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

@ -199,7 +199,7 @@ static void NOINLINE send_location(mavlink_channel_t chan)
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
(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

@ -242,7 +242,7 @@ static void NOINLINE send_location(mavlink_channel_t chan)
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
(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,