diff --git a/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.cpp b/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.cpp index 1c3e0f0011..f3765a7ca6 100644 --- a/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.cpp +++ b/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.cpp @@ -225,7 +225,7 @@ bool TargetEstimator::measurement_can_be_fused(const Vector3f ¤t_measureme // return measurement_valid; } -void TargetEstimator::measurement_update(follow_target_s follow_target) +void TargetEstimator::measurement_update(const follow_target_s &follow_target) { _fusion_count++; // Decompose follow_target message into the individual measurements for position and velocity diff --git a/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.hpp b/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.hpp index 4dc22e455a..7886c21977 100644 --- a/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.hpp +++ b/src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/TargetEstimator.hpp @@ -157,7 +157,7 @@ protected: * * @param follow_target GPS data last received from target */ - void measurement_update(follow_target_s follow_target); + void measurement_update(const follow_target_s &follow_target); /** * Perform prediction step based on simple position-velocity-acceleration model of a point mass