FlightTaskAuto/Line: make params protected and add NAC_ACC_RAD and MPC_YAW_MODE

This commit is contained in:
Dennis Mannhart
2018-08-03 08:24:34 +02:00
parent 27812ad7ac
commit f0282bcd8f
+4 -4
View File
@@ -92,7 +92,6 @@ protected:
WaypointType _type{WaypointType::idle}; /**< Type of current target triplet. */
uORB::Subscription<home_position_s> *_sub_home_position{nullptr};
State _current_state{State::none};
float _speed_at_target = 0.0f; /**< Desired velocity at target. */
@@ -100,9 +99,9 @@ protected:
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask,
(ParamFloat<px4::params::MPC_XY_CRUISE>) MPC_XY_CRUISE,
(ParamFloat<px4::params::MPC_CRUISE_90>) MPC_CRUISE_90, // speed at corner when angle is 90 degrees move to line
(ParamFloat<px4::params::NAV_ACC_RAD>) NAV_ACC_RAD // acceptance radius at which waypoints are updated move to line
); /**< Default mc cruise speed.*/
(ParamFloat<px4::params::NAV_ACC_RAD>) NAV_ACC_RAD, // acceptance radius at which waypoints are updated move to line
(ParamInt<px4::params::MPC_YAW_MODE>) MPC_YAW_MODE // defines how heading is executed
);
private:
matrix::Vector2f _lock_position_xy{NAN, NAN}; /**< if no valid triplet is received, lock positition to current position */
@@ -126,4 +125,5 @@ private:
bool _evaluateGlobalReference(); /**< Check is global reference is available. */
float _getVelocityFromAngle(const float angle); /**< Computes the speed at target depending on angle. */
State _getCurrentState(); /**< Computes the current vehicle state based on the vehicle position and navigator triplets. */
void _set_heading_from_mode(); /**< @see MPC_YAW_MODE */
};