attitude setpoint topic: cleanup of matrix class usage

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2016-10-18 20:46:08 +02:00
committed by Lorenz Meier
parent ee314d2f50
commit 3faaeb06d1
10 changed files with 31 additions and 44 deletions
@@ -64,10 +64,9 @@ int BlockLocalPositionEstimator::flowMeasure(Vector<float, n_y_flow> &y)
return -1;
}
matrix::Quaternion<float> q(&_sub_att.get().q[0]);
matrix::Euler<float> euler(q);
matrix::Eulerf euler = matrix::Quatf(_sub_att.get().q);
float d = agl() * cosf(euler(0)) * cosf(euler(1));
float d = agl() * cosf(euler.phi()) * cosf(euler.theta());
// optical flow in x, y axis
// TODO consider making flow scale a states of the kalman filter