adapted to new vehicle attitude message

This commit is contained in:
tumbili
2016-10-18 20:46:08 +02:00
committed by Lorenz Meier
parent 215bfaa377
commit 5e0e522903
16 changed files with 142 additions and 94 deletions
@@ -87,11 +87,13 @@ void MulticopterAttitudeControlBase::control_attitude(float dt)
/* construct attitude setpoint rotation matrix */
math::Matrix<3, 3> R_sp;
R_sp.set(_v_att_sp->data().R_body);
matrix::Quaternion<float> q_sp(&_v_att_sp->data().q_d[0]);
R_sp.set(&q_sp._data[0][0]);
/* rotation matrix for current state */
math::Matrix<3, 3> R;
R.set(_v_att->data().R);
matrix::Quaternion<float> q(&_v_att->data().q[0]);
R.set(&q._data[0][0]);
/* all input data is ready, run controller itself */