From 9b9ce2b1a2c24ad59304161376a64a6f0e2f4116 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 6 Dec 2018 22:51:44 +1100 Subject: [PATCH] SITL: removed Morse position offset this allows for creating swarms of vehicles with different start locations --- libraries/SITL/SIM_Morse.cpp | 7 ------- libraries/SITL/SIM_Morse.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/libraries/SITL/SIM_Morse.cpp b/libraries/SITL/SIM_Morse.cpp index 987decc271..e27c17c52a 100644 --- a/libraries/SITL/SIM_Morse.cpp +++ b/libraries/SITL/SIM_Morse.cpp @@ -431,7 +431,6 @@ void Morse::update(const struct sitl_input &input) // cope with restarting while connected initial_time_s = time_now_us * 1.0e-6f; last_time_s = state.timestamp; - position_offset.zero(); return; } @@ -490,12 +489,6 @@ void Morse::update(const struct sitl_input &input) scanner.points = state.scanner.points; scanner.ranges = state.scanner.ranges; - // offset based on first position to account for offset in morse world - if (position_offset.is_zero()) { - position_offset = position; - } - position -= position_offset; - update_position(); time_advance(); uint64_t new_time_us = (state.timestamp - initial_time_s)*1.0e6; diff --git a/libraries/SITL/SIM_Morse.h b/libraries/SITL/SIM_Morse.h index 7cc9c76c05..3c7de83978 100644 --- a/libraries/SITL/SIM_Morse.h +++ b/libraries/SITL/SIM_Morse.h @@ -76,8 +76,6 @@ private: double extrapolated_s; double average_frame_time_s; - Vector3f position_offset; - uint64_t socket_frame_counter; uint64_t last_socket_frame_counter; uint64_t frame_counter;