From 6514dd8890bd04ecb2be6854235fefa053d03a67 Mon Sep 17 00:00:00 2001 From: "mich146@hotmail.com" Date: Sun, 15 May 2011 06:14:55 +0000 Subject: [PATCH] GCS Alt fix. git-svn-id: https://arducopter.googlecode.com/svn/trunk@2287 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/GCS_Mavlink.pde | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ArduCopterMega/GCS_Mavlink.pde b/ArduCopterMega/GCS_Mavlink.pde index 24e62074de..eb3b6773f8 100644 --- a/ArduCopterMega/GCS_Mavlink.pde +++ b/ArduCopterMega/GCS_Mavlink.pde @@ -400,11 +400,8 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) // command needs scaling x = tell_command.lat/1.0e7; // local (x), global (latitude) y = tell_command.lng/1.0e7; // local (y), global (longitude) - if (tell_command.options & WP_OPTION_ALT_RELATIVE) { - z = (tell_command.alt - home.alt) / 1.0e2; // because tell_command.alt already includes a += home.alt - } else { - z = tell_command.alt/1.0e2; // local (z), global/relative (altitude) - } + // ACM is processing alt inside each command. so we save and load raw values. - this is diffrent to APM + z = tell_command.alt/1.0e2; // local (z), global/relative (altitude) }