mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AC_WPNav: Fix calculation of _scurve_jerk_time using radians.
This commit is contained in:
parent
470cf82a53
commit
7852e9d1b0
@ -873,9 +873,9 @@ void AC_WPNav::calc_scurve_jerk_and_jerk_time()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// calculate jerk time
|
// calculate jerk time
|
||||||
// jounce (the rate of change of jerk) uses the attitude control input time constant because multicopters
|
// Jounce (the rate of change of jerk) uses the attitude control input time constant because multicopters
|
||||||
// lean to accelerate meaning the change in angle is equivalent to the change in acceleration
|
// lean to accelerate. This means the change in angle is equivalent to the change in acceleration
|
||||||
const float jounce = MIN(_attitude_control.get_accel_roll_max() * GRAVITY_MSS, _attitude_control.get_accel_pitch_max() * GRAVITY_MSS);
|
const float jounce = MIN(_attitude_control.get_accel_roll_max_radss() * GRAVITY_MSS, _attitude_control.get_accel_pitch_max_radss() * GRAVITY_MSS);
|
||||||
if (is_positive(jounce)) {
|
if (is_positive(jounce)) {
|
||||||
_scurve_jerk_time = MAX(_attitude_control.get_input_tc(), 0.5f * _scurve_jerk * M_PI / jounce);
|
_scurve_jerk_time = MAX(_attitude_control.get_input_tc(), 0.5f * _scurve_jerk * M_PI / jounce);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user