Skip to content

Commit 9e6a2f8

Browse files
committed
Copter: use radians(0.01f) to convert to radians from cd
1 parent 7be2cfc commit 9e6a2f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ArduCopter/mode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ void Mode::land_run_horizontal_control()
768768
// interpolate for 1m above that
769769
const float attitude_limit_cd = linear_interpolate(700, copter.aparm.angle_max, get_alt_above_ground_cm(),
770770
g2.wp_navalt_min*100U, (g2.wp_navalt_min+1)*100U);
771-
const float thrust_vector_max = sinf(radians(attitude_limit_cd * 0.01f)) * GRAVITY_MSS * 100.0f;
771+
const float thrust_vector_max = sinf(attitude_limit_cd * radians(0.01f)) * GRAVITY_MSS * 100.0f;
772772
const float thrust_vector_mag = thrust_vector.xy().length();
773773
if (thrust_vector_mag > thrust_vector_max) {
774774
float ratio = thrust_vector_max / thrust_vector_mag;

0 commit comments

Comments
 (0)