mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 09:13:33 +08:00
Navigator: rename get_loiter_radius to get_default_loiter_rad
Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
@@ -368,7 +368,7 @@ void Navigator::run()
|
||||
|
||||
|
||||
} else {
|
||||
rep->current.loiter_radius = get_loiter_radius();
|
||||
rep->current.loiter_radius = get_default_loiter_rad();
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(curr->current.loiter_minor_radius) && fabsf(curr->current.loiter_minor_radius) > FLT_EPSILON) {
|
||||
@@ -471,7 +471,7 @@ void Navigator::run()
|
||||
rep->current.loiter_radius = curr->current.loiter_radius;
|
||||
|
||||
} else {
|
||||
rep->current.loiter_radius = get_loiter_radius();
|
||||
rep->current.loiter_radius = get_default_loiter_rad();
|
||||
}
|
||||
|
||||
rep->current.loiter_direction_counter_clockwise = curr->current.loiter_direction_counter_clockwise;
|
||||
@@ -509,7 +509,7 @@ void Navigator::run()
|
||||
if (geofence_allows_position(position_setpoint)) {
|
||||
position_setpoint_triplet_s *rep = get_reposition_triplet();
|
||||
rep->current.type = position_setpoint_s::SETPOINT_TYPE_LOITER;
|
||||
rep->current.loiter_radius = get_loiter_radius();
|
||||
rep->current.loiter_radius = get_default_loiter_rad();
|
||||
rep->current.loiter_direction_counter_clockwise = false;
|
||||
rep->current.loiter_orientation = 0.0f;
|
||||
rep->current.loiter_pattern = position_setpoint_s::LOITER_TYPE_ORBIT;
|
||||
@@ -557,8 +557,8 @@ void Navigator::run()
|
||||
if (geofence_allows_position(position_setpoint)) {
|
||||
position_setpoint_triplet_s *rep = get_reposition_triplet();
|
||||
rep->current.type = position_setpoint_s::SETPOINT_TYPE_LOITER;
|
||||
rep->current.loiter_minor_radius = fabsf(get_loiter_radius());
|
||||
rep->current.loiter_direction_counter_clockwise = get_loiter_radius() < 0;
|
||||
rep->current.loiter_minor_radius = fabsf(get_default_loiter_rad());
|
||||
rep->current.loiter_direction_counter_clockwise = get_default_loiter_rad() < 0;
|
||||
rep->current.loiter_orientation = 0.0f;
|
||||
rep->current.loiter_pattern = position_setpoint_s::LOITER_TYPE_FIGUREEIGHT;
|
||||
rep->current.cruising_speed = get_cruising_speed();
|
||||
@@ -604,7 +604,7 @@ void Navigator::run()
|
||||
rep->previous.lon = get_global_position()->lon;
|
||||
rep->previous.alt = get_global_position()->alt;
|
||||
|
||||
rep->current.loiter_radius = get_loiter_radius();
|
||||
rep->current.loiter_radius = get_default_loiter_rad();
|
||||
rep->current.loiter_direction_counter_clockwise = false;
|
||||
rep->current.type = position_setpoint_s::SETPOINT_TYPE_TAKEOFF;
|
||||
rep->current.cruising_speed = -1.f; // reset to default
|
||||
@@ -941,7 +941,7 @@ void Navigator::geofence_breach_check()
|
||||
vertical_test_point_distance = _gf_breach_avoidance.computeVerticalBrakingDistanceMultirotor();
|
||||
|
||||
} else {
|
||||
test_point_distance = 2.0f * get_loiter_radius();
|
||||
test_point_distance = 2.0f * get_default_loiter_rad();
|
||||
vertical_test_point_distance = 5.0f;
|
||||
|
||||
if (hrt_absolute_time() - pos_ctrl_status.timestamp < 100000 && PX4_ISFINITE(pos_ctrl_status.nav_bearing)) {
|
||||
@@ -1056,7 +1056,7 @@ void Navigator::geofence_breach_check()
|
||||
rep->current.lon = loiter_longitude;
|
||||
rep->current.alt = loiter_altitude_amsl;
|
||||
rep->current.valid = true;
|
||||
rep->current.loiter_radius = get_loiter_radius();
|
||||
rep->current.loiter_radius = get_default_loiter_rad();
|
||||
rep->current.type = position_setpoint_s::SETPOINT_TYPE_LOITER;
|
||||
rep->current.cruising_throttle = get_cruising_throttle();
|
||||
rep->current.acceptance_radius = get_acceptance_radius();
|
||||
@@ -1173,7 +1173,7 @@ void Navigator::reset_position_setpoint(position_setpoint_s &sp)
|
||||
sp.lat = static_cast<double>(NAN);
|
||||
sp.lon = static_cast<double>(NAN);
|
||||
sp.yaw = NAN;
|
||||
sp.loiter_radius = get_loiter_radius();
|
||||
sp.loiter_radius = get_default_loiter_rad();
|
||||
sp.acceptance_radius = get_default_acceptance_radius();
|
||||
sp.cruising_speed = get_cruising_speed();
|
||||
sp.cruising_throttle = get_cruising_throttle();
|
||||
|
||||
Reference in New Issue
Block a user