Browse Source

SITL: removed Morse position offset

this allows for creating swarms of vehicles with different start
locations
master
Andrew Tridgell 6 years ago
parent
commit
9b9ce2b1a2
  1. 7
      libraries/SITL/SIM_Morse.cpp
  2. 2
      libraries/SITL/SIM_Morse.h

7
libraries/SITL/SIM_Morse.cpp

@ -431,7 +431,6 @@ void Morse::update(const struct sitl_input &input) @@ -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) @@ -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;

2
libraries/SITL/SIM_Morse.h

@ -76,8 +76,6 @@ private: @@ -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;

Loading…
Cancel
Save