Rover: use WP_SPEED instead of CRUISE_SPEED to set loiter's maximum speed

This commit is contained in:
Arjun Vinod 2019-05-15 11:33:19 -04:00 committed by Randy Mackay
parent 4f153f06b3
commit 14cb042e89
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ void ModeLoiter::update()
} else { } else {
// P controller with hard-coded gain to convert distance to desired speed // P controller with hard-coded gain to convert distance to desired speed
// To-Do: make gain configurable or calculate from attitude controller's maximum accelearation // To-Do: make gain configurable or calculate from attitude controller's maximum accelearation
_desired_speed = MIN((_distance_to_destination - g2.loit_radius) * 0.5f, g.speed_cruise); _desired_speed = MIN((_distance_to_destination - g2.loit_radius) * 0.5f, g2.wp_nav.get_default_speed());
// calculate bearing to destination // calculate bearing to destination
_desired_yaw_cd = rover.current_loc.get_bearing_to(_destination); _desired_yaw_cd = rover.current_loc.get_bearing_to(_destination);