FlightTasks: small rebase naming and typo fixes

This commit is contained in:
MaEtUgR
2018-06-21 20:05:10 +02:00
committed by Lorenz Meier
parent e51e1bbe74
commit efed766919
7 changed files with 11 additions and 6 deletions
+4 -1
View File
@@ -93,13 +93,16 @@ bool FlightTask::_evaluateVehicleLocalPosition()
// yaw
_yaw = _sub_vehicle_local_position->get().yaw;
// distance to bottome
// distance to bottom
_dist_to_bottom = NAN;
if (_sub_vehicle_local_position->get().dist_bottom_valid) {
_dist_to_bottom = _sub_vehicle_local_position->get().dist_bottom;
}
// estimator specified vehicle limits
// We don't check here if states are valid or not.
// Validity checks are done in the sub-classes.
return true;
+2 -2
View File
@@ -155,7 +155,8 @@ protected:
/* Current vehicle state */
matrix::Vector3f _position; /**< current vehicle position */
matrix::Vector3f _velocity; /**< current vehicle velocity */
float _yaw = 0.f;
float _yaw = 0.f; /**< current vehicle yaw heading */
float _dist_to_bottom; /**< current height above ground level */
/**
* Setpoints which the position controller has to execute.
@@ -171,7 +172,6 @@ protected:
matrix::Vector3f _thrust_setpoint;
float _yaw_setpoint;
float _yawspeed_setpoint;
float _dist_to_bottom;
/**
* Vehicle constraints.
@@ -360,7 +360,7 @@ void FlightTaskAutoLine::_generateXYsetpoints()
float yaw_diff = 0.0f;
if (PX4_ISFINITE(_yaw_setpoint)) {
yaw_diff = _wrap_pi(_yaw_setpoint - _yaw);
yaw_diff = wrap_pi(_yaw_setpoint - _yaw);
}
// If yaw offset is large, only accelerate with 0.5 m/s^2.
@@ -37,6 +37,7 @@
* Flight task for manual controlled altitude.
*/
#pragma once
#include "FlightTaskManualAltitude.hpp"
#include "Utility/ManualSmoothingZ.hpp"
@@ -99,7 +99,7 @@ void FlightTaskManualPosition::_scaleSticks()
// raise the limit at a constant rate up to the user specified value
if (_velocity_scale < _constraints.speed_xy) {
_velocity_scale += _deltatime * MPC_ACC_HOR_FLOW.get();
_velocity_scale += _deltatime * MPC_ACC_HOR_ESTM.get();
} else {
_velocity_scale = _constraints.speed_xy;
@@ -60,7 +60,7 @@ protected:
(ParamFloat<px4::params::MPC_VEL_MANUAL>) MPC_VEL_MANUAL,
(ParamFloat<px4::params::MPC_ACC_HOR_MAX>) MPC_ACC_HOR_MAX,
(ParamFloat<px4::params::MPC_HOLD_MAX_XY>) MPC_HOLD_MAX_XY,
(ParamFloat<px4::params::MPC_ACC_HOR_FLOW>) MPC_ACC_HOR_FLOW
(ParamFloat<px4::params::MPC_ACC_HOR_ESTM>) MPC_ACC_HOR_ESTM
)
private:
float _velocity_scale; //scales the stick input to velocity
@@ -37,6 +37,7 @@
* Flight task for smooth manual controlled position.
*/
#pragma once
#include "FlightTaskManualPosition.hpp"
#include "Utility/ManualSmoothingXY.hpp"