mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 21:49:07 +08:00
PositionControllerStatus: remove unused fields
Remove yaw_acceptance and altitude_acceptance_radius fields as they were only filled by now removed avoidance controller. Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
parent
1f2dba68d2
commit
b34a5eb6f7
@ -487,8 +487,6 @@ FixedwingPositionControl::status_publish()
|
||||
pos_ctrl_status.wp_dist = get_distance_to_next_waypoint(_current_latitude, _current_longitude,
|
||||
_pos_sp_triplet.current.lat, _pos_sp_triplet.current.lon);
|
||||
|
||||
pos_ctrl_status.yaw_acceptance = NAN;
|
||||
|
||||
pos_ctrl_status.timestamp = hrt_absolute_time();
|
||||
|
||||
pos_ctrl_status.type = _position_sp_type;
|
||||
|
||||
@ -1142,17 +1142,11 @@ float Navigator::get_altitude_acceptance_radius()
|
||||
|
||||
} else {
|
||||
float alt_acceptance_radius = _param_nav_mc_alt_rad.get();
|
||||
|
||||
const position_controller_status_s &pos_ctrl_status = _position_controller_status_sub.get();
|
||||
|
||||
const position_setpoint_s &curr_sp = get_position_setpoint_triplet()->current;
|
||||
|
||||
if (PX4_ISFINITE(curr_sp.alt_acceptance_radius) && curr_sp.alt_acceptance_radius > FLT_EPSILON) {
|
||||
alt_acceptance_radius = curr_sp.alt_acceptance_radius;
|
||||
|
||||
} else if ((pos_ctrl_status.timestamp > _pos_sp_triplet.timestamp)
|
||||
&& pos_ctrl_status.altitude_acceptance > alt_acceptance_radius) {
|
||||
alt_acceptance_radius = pos_ctrl_status.altitude_acceptance;
|
||||
}
|
||||
|
||||
return alt_acceptance_radius;
|
||||
@ -1214,14 +1208,6 @@ bool Navigator::get_yaw_to_be_accepted(float mission_item_yaw)
|
||||
{
|
||||
float yaw = mission_item_yaw;
|
||||
|
||||
const position_controller_status_s &pos_ctrl_status = _position_controller_status_sub.get();
|
||||
|
||||
// if yaw_acceptance from position controller is NaN overwrite the mission item yaw such that
|
||||
// the waypoint can be reached from any direction
|
||||
if ((pos_ctrl_status.timestamp > _pos_sp_triplet.timestamp) && !PX4_ISFINITE(pos_ctrl_status.yaw_acceptance)) {
|
||||
yaw = pos_ctrl_status.yaw_acceptance;
|
||||
}
|
||||
|
||||
return PX4_ISFINITE(yaw);
|
||||
}
|
||||
|
||||
|
||||
@ -441,7 +441,6 @@ RoverPositionControl::Run()
|
||||
_pos_sp_triplet.current.lat, _pos_sp_triplet.current.lon);
|
||||
|
||||
pos_ctrl_status.acceptance_radius = turn_distance;
|
||||
pos_ctrl_status.yaw_acceptance = NAN;
|
||||
|
||||
pos_ctrl_status.timestamp = hrt_absolute_time();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user