mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
removed D term for rate control for now. It may have been messing things up.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2077 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
9d089920ae
commit
2290deb925
@ -387,7 +387,7 @@
|
||||
# define NAV_WP_I 0.0 // leave 0
|
||||
#endif
|
||||
#ifndef NAV_WP_D
|
||||
# define NAV_WP_D 15 // not sure about at all
|
||||
# define NAV_WP_D 0 // not sure about at all
|
||||
#endif
|
||||
#ifndef NAV_WP_IMAX
|
||||
# define NAV_WP_IMAX 30 // 20 degrees
|
||||
|
@ -154,6 +154,7 @@ void calc_rate_nav()
|
||||
// change to rate error
|
||||
// we want to be going 450cm/s
|
||||
int error = WAYPOINT_SPEED - g_gps->ground_speed;
|
||||
//int error = 450
|
||||
|
||||
// which direction are we moving?
|
||||
long target_error = target_bearing - g_gps->ground_course;
|
||||
@ -163,8 +164,10 @@ void calc_rate_nav()
|
||||
//error = (float)error * cos(radians((float)target_error/100));
|
||||
|
||||
// Scale response by kP
|
||||
long nav_lat = g.pid_nav_wp.kP() * error;
|
||||
int dampening = g.pid_nav_wp.kD() * (g_gps->ground_speed - last_ground_speed);
|
||||
//long nav_lat = g.pid_nav_wp.kP() * error;
|
||||
//int dampening = g.pid_nav_wp.kD() * (g_gps->ground_speed - last_ground_speed);
|
||||
long nav_lat = NAV_WP_P * error;
|
||||
int dampening = NAV_WP_D * (g_gps->ground_speed - last_ground_speed);
|
||||
|
||||
// remember our old speed
|
||||
last_ground_speed = g_gps->ground_speed;
|
||||
|
Loading…
Reference in New Issue
Block a user