AC_AttitudeControl: constify some local variables
This commit is contained in:
parent
9e7a0e6267
commit
25fff17e48
@ -259,7 +259,7 @@ void AC_AttitudeControl::input_euler_angle_roll_pitch_euler_rate_yaw(float euler
|
|||||||
|
|
||||||
if (_rate_bf_ff_enabled) {
|
if (_rate_bf_ff_enabled) {
|
||||||
// translate the roll pitch and yaw acceleration limits to the euler axis
|
// translate the roll pitch and yaw acceleration limits to the euler axis
|
||||||
Vector3f euler_accel = euler_accel_limit(_attitude_target_euler_angle, Vector3f(get_accel_roll_max_radss(), get_accel_pitch_max_radss(), get_accel_yaw_max_radss()));
|
const Vector3f euler_accel = euler_accel_limit(_attitude_target_euler_angle, Vector3f(get_accel_roll_max_radss(), get_accel_pitch_max_radss(), get_accel_yaw_max_radss()));
|
||||||
|
|
||||||
// When acceleration limiting and feedforward are enabled, the sqrt controller is used to compute an euler
|
// When acceleration limiting and feedforward are enabled, the sqrt controller is used to compute an euler
|
||||||
// angular velocity that will cause the euler angle to smoothly stop at the input angle with limited deceleration
|
// angular velocity that will cause the euler angle to smoothly stop at the input angle with limited deceleration
|
||||||
@ -310,7 +310,7 @@ void AC_AttitudeControl::input_euler_angle_roll_pitch_yaw(float euler_roll_angle
|
|||||||
|
|
||||||
if (_rate_bf_ff_enabled) {
|
if (_rate_bf_ff_enabled) {
|
||||||
// translate the roll pitch and yaw acceleration limits to the euler axis
|
// translate the roll pitch and yaw acceleration limits to the euler axis
|
||||||
Vector3f euler_accel = euler_accel_limit(_attitude_target_euler_angle, Vector3f(get_accel_roll_max_radss(), get_accel_pitch_max_radss(), get_accel_yaw_max_radss()));
|
const Vector3f euler_accel = euler_accel_limit(_attitude_target_euler_angle, Vector3f(get_accel_roll_max_radss(), get_accel_pitch_max_radss(), get_accel_yaw_max_radss()));
|
||||||
|
|
||||||
// When acceleration limiting and feedforward are enabled, the sqrt controller is used to compute an euler
|
// When acceleration limiting and feedforward are enabled, the sqrt controller is used to compute an euler
|
||||||
// angular velocity that will cause the euler angle to smoothly stop at the input angle with limited deceleration
|
// angular velocity that will cause the euler angle to smoothly stop at the input angle with limited deceleration
|
||||||
@ -365,7 +365,7 @@ void AC_AttitudeControl::input_euler_rate_roll_pitch_yaw(float euler_roll_rate_c
|
|||||||
|
|
||||||
if (_rate_bf_ff_enabled) {
|
if (_rate_bf_ff_enabled) {
|
||||||
// translate the roll pitch and yaw acceleration limits to the euler axis
|
// translate the roll pitch and yaw acceleration limits to the euler axis
|
||||||
Vector3f euler_accel = euler_accel_limit(_attitude_target_euler_angle, Vector3f(get_accel_roll_max_radss(), get_accel_pitch_max_radss(), get_accel_yaw_max_radss()));
|
const Vector3f euler_accel = euler_accel_limit(_attitude_target_euler_angle, Vector3f(get_accel_roll_max_radss(), get_accel_pitch_max_radss(), get_accel_yaw_max_radss()));
|
||||||
|
|
||||||
// When acceleration limiting is enabled, the input shaper constrains angular acceleration, slewing
|
// When acceleration limiting is enabled, the input shaper constrains angular acceleration, slewing
|
||||||
// the output rate towards the input rate.
|
// the output rate towards the input rate.
|
||||||
|
Loading…
Reference in New Issue
Block a user