diff --git a/src/lib/collision_prevention/CollisionPrevention.cpp b/src/lib/collision_prevention/CollisionPrevention.cpp index 3d102beac9b9..7c663f667ae9 100644 --- a/src/lib/collision_prevention/CollisionPrevention.cpp +++ b/src/lib/collision_prevention/CollisionPrevention.cpp @@ -358,8 +358,8 @@ CollisionPrevention::_checkSetpointDirectionFeasability() for (int i = 0; i < BIN_COUNT; i++) { // check if our setpoint is either pointing in a direction where data exists, or if not, wether we are allowed to go where there is no data - if ((_obstacle_map_body_frame.distances[i] == UINT16_MAX && i == _setpoint_index) && (!_param_cp_go_nodata.get() - || (_param_cp_go_nodata.get() && _data_fov[i]))) { + if ((_obstacle_map_body_frame.distances[i] == UINT16_MAX && i == _setpoint_index) && (!_param_cp_go_no_data.get() + || (_param_cp_go_no_data.get() && _data_fov[i]))) { setpoint_feasible = false; } @@ -605,7 +605,7 @@ void CollisionPrevention::_getVelocityCompensationAcceleration(const float vehic const float max_vel = math::trajectory::computeMaxSpeedFromDistance(_param_mpc_jerk_max.get(), _param_mpc_acc_hor.get(), stop_distance, 0.f); - const float curr_acc_vel_constraint = _param_mpc_vel_p_acc.get() * math::min((max_vel - curr_vel_parallel), 0.f); + const float curr_acc_vel_constraint = _param_mpc_xy_vel_p_acc.get() * math::min((max_vel - curr_vel_parallel), 0.f); if (curr_acc_vel_constraint < vel_comp_accel) { vel_comp_accel = curr_acc_vel_constraint; diff --git a/src/lib/collision_prevention/CollisionPrevention.hpp b/src/lib/collision_prevention/CollisionPrevention.hpp index 176bcf46cda6..8fcc7c28f3ec 100644 --- a/src/lib/collision_prevention/CollisionPrevention.hpp +++ b/src/lib/collision_prevention/CollisionPrevention.hpp @@ -196,11 +196,11 @@ class CollisionPrevention : public ModuleParams (ParamFloat) _param_cp_dist, /**< collision prevention keep minimum distance */ (ParamFloat) _param_cp_delay, /**< delay of the range measurement data*/ (ParamFloat) _param_cp_guide_ang, /**< collision prevention change setpoint angle */ - (ParamBool) _param_cp_go_nodata, /**< movement allowed where no data*/ + (ParamBool) _param_cp_go_no_data, /**< movement allowed where no data*/ (ParamFloat) _param_mpc_xy_p, /**< p gain from position controller*/ (ParamFloat) _param_mpc_jerk_max, /**< vehicle maximum jerk*/ (ParamFloat) _param_mpc_acc_hor, /**< vehicle maximum horizontal acceleration*/ - (ParamFloat) _param_mpc_vel_p_acc, /**< p gain from velocity controller*/ + (ParamFloat) _param_mpc_xy_vel_p_acc, /**< p gain from velocity controller*/ (ParamFloat) _param_mpc_vel_manual /**< maximum velocity in manual flight mode*/ )