mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:33:33 +08:00
adapted to new vehicle attitude message
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user