FlightTasks safer matrix usage

This commit is contained in:
Daniel Agar
2018-08-27 16:33:38 -04:00
parent 507a872546
commit acff200f0d
2 changed files with 2 additions and 2 deletions
@@ -113,7 +113,7 @@ float StraightLine::getMaxAcc()
Vector3f u_orig_to_target = (_target - _origin).unit_or_zero();
// calculate the maximal horizontal acceleration
float divider = Vector2f(u_orig_to_target.data()).length();
float divider = Vector2f(u_orig_to_target(0), u_orig_to_target(1)).length();
float max_acc_hor = MPC_ACC_HOR_MAX.get();
if (divider > FLT_EPSILON) {