mirror of https://github.com/ArduPilot/ardupilot
tweaked WP speed so long distances wont blow up equation.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2871 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
b8f1fbe2fc
commit
01a8cec348
|
@ -149,8 +149,9 @@ void calc_rate_nav()
|
||||||
|
|
||||||
// Reduce speed on RTL
|
// Reduce speed on RTL
|
||||||
//if(control_mode == RTL){
|
//if(control_mode == RTL){
|
||||||
waypoint_speed = min((wp_distance * 100), g.waypoint_speed_max.get());
|
int tmp = min(wp_distance, 50) * 100;
|
||||||
waypoint_speed = max(waypoint_speed, 80);
|
waypoint_speed = min(tmp, g.waypoint_speed_max.get());
|
||||||
|
waypoint_speed = max(waypoint_speed, 80);
|
||||||
//}else{
|
//}else{
|
||||||
// waypoint_speed = g.waypoint_speed_max.get();
|
// waypoint_speed = g.waypoint_speed_max.get();
|
||||||
//}
|
//}
|
||||||
|
|
Loading…
Reference in New Issue