Made wpspeed governor run per second so 1hz gps doesn't fail. Gave a 1m/s minimum. Increased WPspeed max to 4.0m/s
This commit is contained in:
parent
c3b93d70df
commit
3c51ce6a5f
@ -451,7 +451,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef WAYPOINT_SPEED_MAX
|
||||
# define WAYPOINT_SPEED_MAX 300 // for 6m/s error = 13mph
|
||||
# define WAYPOINT_SPEED_MAX 400 // for 6m/s error = 13mph
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -115,7 +115,12 @@ static void calc_nav_rate(int max_speed)
|
||||
|
||||
// limit the ramp up of the speed
|
||||
if(waypoint_speed_gov < max_speed){
|
||||
waypoint_speed_gov += 10;
|
||||
|
||||
waypoint_speed_gov += (int)(150.0 * dTnav); // increase at 1.5/ms
|
||||
|
||||
// go at least 1m/s
|
||||
max_speed = max(100, waypoint_speed_gov);
|
||||
// limit with governer
|
||||
max_speed = min(max_speed, waypoint_speed_gov);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user