From a9ec1a35bc83b84e9663af161f173f98fed4b250 Mon Sep 17 00:00:00 2001 From: Mohamed Abdelkader Zahana Date: Thu, 13 Apr 2017 09:27:21 +0300 Subject: [PATCH] divide lat/lon received from HIL_STATE_QUATERNION msg by 1E7 --- src/modules/simulator/simulator_mavlink.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/simulator/simulator_mavlink.cpp b/src/modules/simulator/simulator_mavlink.cpp index 2588538a74..7543e638ff 100644 --- a/src/modules/simulator/simulator_mavlink.cpp +++ b/src/modules/simulator/simulator_mavlink.cpp @@ -404,9 +404,9 @@ void Simulator::handle_message(mavlink_message_t *msg, bool publish) hil_gpos.timestamp = timestamp; hil_gpos.time_utc_usec = timestamp; - hil_gpos.lat = hil_state.lat; - hil_gpos.lon = hil_state.lon; - hil_gpos.alt = hil_state.alt / 1000.0f; + hil_gpos.lat = hil_state.lat / 10000000.0f;//1E7 + hil_gpos.lon = hil_state.lon / 10000000.0f;//1E7 + hil_gpos.alt = hil_state.alt / 1000.0f;//1E3 hil_gpos.vel_n = hil_state.vx / 100.0f; hil_gpos.vel_e = hil_state.vy / 100.0f;