From 3b7e57a5b2eef2916200829b1eda543f44b8c480 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 5 Jun 2017 18:16:30 -0400 Subject: [PATCH] navigator/follow_target remove unused --- src/modules/navigator/follow_target.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/modules/navigator/follow_target.cpp b/src/modules/navigator/follow_target.cpp index 5711303259..506c28d441 100644 --- a/src/modules/navigator/follow_target.cpp +++ b/src/modules/navigator/follow_target.cpp @@ -179,26 +179,18 @@ void FollowTarget::on_active() dt_ms = ((_current_target_motion.timestamp - _previous_target_motion.timestamp) / 1000); // ignore a small dt - if (dt_ms > 10.0F) { - - math::Vector<3> prev_position_delta = _target_position_delta; - // get last gps known reference for target - map_projection_init(&target_ref, _previous_target_motion.lat, _previous_target_motion.lon); // calculate distance the target has moved - map_projection_project(&target_ref, _current_target_motion.lat, _current_target_motion.lon, &(_target_position_delta(0)), &(_target_position_delta(1))); // update the average velocity of the target based on the position - _est_target_vel = _target_position_delta / (dt_ms / 1000.0f); // if the target is moving add an offset and rotation - if (_est_target_vel.length() > .5F) { _target_position_offset = _rot_matrix * _est_target_vel.normalized() * _follow_offset; }