mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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
@ -7,6 +7,4 @@ float32 target_bearing # Bearing angle from aircraft to current target [rad]
|
|||||||
float32 xtrack_error # Signed track error [m]
|
float32 xtrack_error # Signed track error [m]
|
||||||
float32 wp_dist # Distance to active (next) waypoint [m]
|
float32 wp_dist # Distance to active (next) waypoint [m]
|
||||||
float32 acceptance_radius # Current horizontal acceptance radius [m]
|
float32 acceptance_radius # Current horizontal acceptance radius [m]
|
||||||
float32 yaw_acceptance # Yaw acceptance error[rad]
|
|
||||||
float32 altitude_acceptance # Current vertical acceptance error [m]
|
|
||||||
uint8 type # Current (applied) position setpoint type (see PositionSetpoint.msg)
|
uint8 type # Current (applied) position setpoint type (see PositionSetpoint.msg)
|
||||||
|
|||||||
@ -487,8 +487,6 @@ FixedwingPositionControl::status_publish()
|
|||||||
pos_ctrl_status.wp_dist = get_distance_to_next_waypoint(_current_latitude, _current_longitude,
|
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_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.timestamp = hrt_absolute_time();
|
||||||
|
|
||||||
pos_ctrl_status.type = _position_sp_type;
|
pos_ctrl_status.type = _position_sp_type;
|
||||||
|
|||||||
@ -1142,17 +1142,11 @@ float Navigator::get_altitude_acceptance_radius()
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
float alt_acceptance_radius = _param_nav_mc_alt_rad.get();
|
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;
|
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) {
|
if (PX4_ISFINITE(curr_sp.alt_acceptance_radius) && curr_sp.alt_acceptance_radius > FLT_EPSILON) {
|
||||||
alt_acceptance_radius = curr_sp.alt_acceptance_radius;
|
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;
|
return alt_acceptance_radius;
|
||||||
@ -1214,14 +1208,6 @@ bool Navigator::get_yaw_to_be_accepted(float mission_item_yaw)
|
|||||||
{
|
{
|
||||||
float yaw = 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);
|
return PX4_ISFINITE(yaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -441,7 +441,6 @@ RoverPositionControl::Run()
|
|||||||
_pos_sp_triplet.current.lat, _pos_sp_triplet.current.lon);
|
_pos_sp_triplet.current.lat, _pos_sp_triplet.current.lon);
|
||||||
|
|
||||||
pos_ctrl_status.acceptance_radius = turn_distance;
|
pos_ctrl_status.acceptance_radius = turn_distance;
|
||||||
pos_ctrl_status.yaw_acceptance = NAN;
|
|
||||||
|
|
||||||
pos_ctrl_status.timestamp = hrt_absolute_time();
|
pos_ctrl_status.timestamp = hrt_absolute_time();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user