Browse Source

AC_PrecLand: remove zero terms from math

master
Jonathan Challinger 9 years ago committed by Randy Mackay
parent
commit
0eac5a5c8f
  1. 6
      libraries/AC_PrecLand/AC_PrecLand.cpp

6
libraries/AC_PrecLand/AC_PrecLand.cpp

@ -155,9 +155,9 @@ void AC_PrecLand::calc_angles_and_pos(float alt_above_terrain_cm)
float sin_theta = sinf(theta); float sin_theta = sinf(theta);
float cos_theta = cosf(theta); float cos_theta = cosf(theta);
target_vec_ned.x = axis.x*axis.z*(1.0f - cos_theta) + axis.y*sin_theta; target_vec_ned.x = axis.y*sin_theta;
target_vec_ned.y = axis.y*axis.z*(1.0f - cos_theta) - axis.x*sin_theta; target_vec_ned.y = -axis.x*sin_theta;
target_vec_ned.z = cos_theta + sq(axis.z)*(1.0f-cos_theta); target_vec_ned.z = cos_theta;
} }
// rotate into NED frame // rotate into NED frame

Loading…
Cancel
Save