WPNav: reduce loiter speed used to correct pos error

Contributed by Leonard Hall
This should reduce the aggressiveness of the response when we experience
a GPS glitch
This commit is contained in:
Randy Mackay 2013-07-10 15:34:15 +09:00
parent f459d35e3e
commit 5d23d5aaa7
2 changed files with 2 additions and 1 deletions

View File

@ -271,7 +271,7 @@ void AC_WPNav::update_loiter()
translate_loiter_target_movements(dt);
// run loiter position controller
get_loiter_position_to_velocity(dt, _loiter_speed_cms);
get_loiter_position_to_velocity(dt, WPNAV_LOITER_SPEED_MAX_TO_CORRECT_ERROR);
}
/// calculate_loiter_leash_length - calculates the maximum distance in cm that the target position may be from the current location

View File

@ -20,6 +20,7 @@
#define WPNAV_LOITER_SPEED 500.0f // maximum default loiter speed in cm/s
#define WPNAV_LOITER_ACCEL_MAX 250.0f // maximum acceleration in loiter mode
#define WPNAV_LOITER_ACCEL_MIN 25.0f // minimum acceleration in loiter mode
#define WPNAV_LOITER_SPEED_MAX_TO_CORRECT_ERROR 200.0f // maximum speed used to correct position error (i.e. not including feed forward)
#define MAX_LEAN_ANGLE 4500 // default maximum lean angle