Skip to content

Commit

Permalink
FlighTasks: remove FlightTaskSport
Browse files Browse the repository at this point in the history
This mode was just kept as an example after
its usage in a single case. It's basically untested
and doesn't make much sense anymore since it's
incompatible with the jerk limited trajectory
implementations. It's implementation only switched
hte configuration parameter of the velocity resulting
from maximum stick deflection to be
MPC_XY_VEL_MAX instead of MPC_VEL_MANUAL.
This is according to todays understanding undesired
because when hitting that limit the position
controller has no room for corrections anymore.

Also it saves some flash space on omnibus to remove
the task at this point and makes romm for the
acceleration feed-forward.
  • Loading branch information
MaEtUgR committed Mar 4, 2020
1 parent cd09e13 commit 5f0a4a0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 114 deletions.
1 change: 0 additions & 1 deletion src/lib/flight_tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ list(APPEND flight_tasks_all
ManualPosition
ManualPositionSmooth
ManualPositionSmoothVel
Sport
AutoLineSmoothVel
AutoFollowMe
Offboard
Expand Down
43 changes: 0 additions & 43 deletions src/lib/flight_tasks/tasks/Sport/CMakeLists.txt

This file was deleted.

64 changes: 0 additions & 64 deletions src/lib/flight_tasks/tasks/Sport/FlightTaskSport.hpp

This file was deleted.

6 changes: 2 additions & 4 deletions src/modules/mc_pos_control/mc_pos_control_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <lib/flight_tasks/FlightTasks.hpp>
#include <lib/hysteresis/hysteresis.h>
#include <lib/mathlib/mathlib.h>
#include <lib/matrix/matrix/math.hpp>
#include <lib/perf/perf_counter.h>
#include <lib/systemlib/mavlink_log.h>
#include <lib/weather_vane/WeatherVane.hpp>
Expand Down Expand Up @@ -74,6 +75,7 @@
#include <float.h>

using namespace time_literals;
using namespace matrix;

/**
* Multicopter position control app start / stop handling function
Expand Down Expand Up @@ -822,10 +824,6 @@ MulticopterPositionControl::start_flight_task()
error = _flight_tasks.switchTask(FlightTaskIndex::ManualPositionSmooth);
break;

case 2:
error = _flight_tasks.switchTask(FlightTaskIndex::Sport);
break;

case 3:
error = _flight_tasks.switchTask(FlightTaskIndex::ManualPositionSmoothVel);
break;
Expand Down
3 changes: 1 addition & 2 deletions src/modules/mc_pos_control/mc_pos_control_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ PARAM_DEFINE_FLOAT(MPC_VELD_LP, 5.0f);
/**
* Maximum horizontal acceleration for auto mode and for manual mode
*
* Maximum deceleration for MPC_POS_MODE 1 and 2. Maximum acceleration and deceleration for MPC_POS_MODE 3.
* Maximum deceleration for MPC_POS_MODE 1. Maximum acceleration and deceleration for MPC_POS_MODE 3.
*
* @unit m/s/s
* @min 2.0
Expand Down Expand Up @@ -708,7 +708,6 @@ PARAM_DEFINE_FLOAT(MPC_TKO_RAMP_T, 3.0f);
*
* @value 0 Default position control
* @value 1 Smooth position control
* @value 2 Sport position control
* @value 3 Smooth position control (Velocity)
* @group Multicopter Position Control
*/
Expand Down

0 comments on commit 5f0a4a0

Please sign in to comment.