Browse Source

use 1E7 instead 10000000.0f

sbg
Mohamed Abdelkader Zahana 8 years ago committed by Beat Küng
parent
commit
239370d72c
  1. 6
      src/modules/simulator/simulator_mavlink.cpp

6
src/modules/simulator/simulator_mavlink.cpp

@ -404,9 +404,9 @@ void Simulator::handle_message(mavlink_message_t *msg, bool publish) @@ -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 / 10000000.0f;//1E7
hil_gpos.lon = hil_state.lon / 10000000.0f;//1E7
hil_gpos.alt = hil_state.alt / 1000.0f;//1E3
hil_gpos.lat = hil_state.lat / 1E7;//1E7
hil_gpos.lon = hil_state.lon / 1E7;//1E7
hil_gpos.alt = hil_state.alt / 1E3;//1E3
hil_gpos.vel_n = hil_state.vx / 100.0f;
hil_gpos.vel_e = hil_state.vy / 100.0f;

Loading…
Cancel
Save