diff --git a/src/modules/navigator/follow_target.h b/src/modules/navigator/follow_target.h index a653563937..b018bc58ee 100644 --- a/src/modules/navigator/follow_target.h +++ b/src/modules/navigator/follow_target.h @@ -51,50 +51,50 @@ class FollowTarget : public MissionBlock { public: - FollowTarget(Navigator *navigator, const char *name); - ~FollowTarget(); + FollowTarget(Navigator *navigator, const char *name); + ~FollowTarget(); - void on_inactive() override; - void on_activation() override; - void on_active() override; + void on_inactive() override; + void on_activation() override; + void on_active() override; private: - static constexpr int TARGET_TIMEOUT_S = 5; - static constexpr int TARGET_ACCEPTANCE_RADIUS_M = 5; - static constexpr int INTERPOLATION_PNTS = 20; - static constexpr float FF_K = .15f; + static constexpr int TARGET_TIMEOUT_S = 5; + static constexpr int TARGET_ACCEPTANCE_RADIUS_M = 5; + static constexpr int INTERPOLATION_PNTS = 20; + static constexpr float FF_K = .15f; - enum FollowTargetState { - TRACK_POSITION, - TRACK_VELOCITY, - WAIT_FOR_TARGET_POSITION - }; + enum FollowTargetState { + TRACK_POSITION, + TRACK_VELOCITY, + WAIT_FOR_TARGET_POSITION + }; - Navigator *_navigator; - control::BlockParamFloat _param_min_alt; - FollowTargetState _follow_target_state; - int _follow_target_sub; - float _step_time_in_ms; + Navigator *_navigator; + control::BlockParamFloat _param_min_alt; + FollowTargetState _follow_target_state; + int _follow_target_sub; + float _step_time_in_ms; - uint64_t _target_updates; + uint64_t _target_updates; - uint64_t _last_update_time; + uint64_t _last_update_time; - math::Vector<3> _current_vel; - math::Vector<3> _step_vel; - math::Vector<3> _target_vel; - math::Vector<3> _target_distance; + math::Vector<3> _current_vel; + math::Vector<3> _step_vel; + math::Vector<3> _target_vel; + math::Vector<3> _target_distance; - follow_target_s _current_target_motion; - follow_target_s _previous_target_motion; + follow_target_s _current_target_motion; + follow_target_s _previous_target_motion; - void track_target_position(); - void track_target_velocity(); - bool target_velocity_valid(); - bool target_position_valid(); - void reset_target_validity(); - void update_position_sp(bool velocity_valid, bool position_valid); - void update_target_motion(); - void update_target_velocity(); + void track_target_position(); + void track_target_velocity(); + bool target_velocity_valid(); + bool target_position_valid(); + void reset_target_validity(); + void update_position_sp(bool velocity_valid, bool position_valid); + void update_target_motion(); + void update_target_velocity(); };