Browse Source

AR_AttitudeControl: remove constraint on steering output

mission-4.1.18
Randy Mackay 7 years ago
parent
commit
5e7b37f0b2
  1. 2
      libraries/APM_Control/AR_AttitudeControl.cpp
  2. 11
      libraries/APM_Control/AR_AttitudeControl.h

2
libraries/APM_Control/AR_AttitudeControl.cpp

@ -285,7 +285,7 @@ float AR_AttitudeControl::get_steering_out_rate(float desired_rate, bool motor_l
const float d = _steer_rate_pid.get_d(); const float d = _steer_rate_pid.get_d();
// constrain and return final output // constrain and return final output
return constrain_float(ff + p + i + d, -1.0f, 1.0f); return (ff + p + i + d);
} }
// get latest desired turn rate in rad/sec (recorded during calls to get_steering_out_rate) // get latest desired turn rate in rad/sec (recorded during calls to get_steering_out_rate)

11
libraries/APM_Control/AR_AttitudeControl.h

@ -43,15 +43,18 @@ public:
// steering controller // steering controller
// //
// return a steering servo output from -1.0 to +1.0 given a desired lateral acceleration rate in m/s/s. // return a steering servo output given a desired lateral acceleration rate in m/s/s.
// positive lateral acceleration is to the right. dt should normally be the main loop rate. // positive lateral acceleration is to the right. dt should normally be the main loop rate.
// return value is normally in range -1.0 to +1.0 but can be higher or lower
float get_steering_out_lat_accel(float desired_accel, bool motor_limit_left, bool motor_limit_right, float dt); float get_steering_out_lat_accel(float desired_accel, bool motor_limit_left, bool motor_limit_right, float dt);
// return a steering servo output from -1 to +1 given a heading in radians // return a steering servo output given a heading in radians
// return value is normally in range -1.0 to +1.0 but can be higher or lower
float get_steering_out_heading(float heading_rad, float rate_max, bool motor_limit_left, bool motor_limit_right, float dt); float get_steering_out_heading(float heading_rad, float rate_max, bool motor_limit_left, bool motor_limit_right, float dt);
// return a steering servo output from -1 to +1 given a // return a steering servo output given a desired yaw rate in radians/sec.
// desired yaw rate in radians/sec. Positive yaw is to the right. // positive yaw is to the right
// return value is normally in range -1.0 to +1.0 but can be higher or lower
float get_steering_out_rate(float desired_rate, bool motor_limit_left, bool motor_limit_right, float dt); float get_steering_out_rate(float desired_rate, bool motor_limit_left, bool motor_limit_right, float dt);
// get latest desired turn rate in rad/sec recorded during calls to get_steering_out_rate. For reporting purposes only // get latest desired turn rate in rad/sec recorded during calls to get_steering_out_rate. For reporting purposes only

Loading…
Cancel
Save