mavlink move to matrix lib

This commit is contained in:
Daniel Agar
2018-03-22 07:46:16 +01:00
committed by Beat Küng
parent 7830d3503e
commit ad2b96b523
+5 -5
View File
@@ -1808,11 +1808,11 @@ protected:
vmsg.x = vpos.x; vmsg.x = vpos.x;
vmsg.y = vpos.y; vmsg.y = vpos.y;
vmsg.z = vpos.z; vmsg.z = vpos.z;
math::Quaternion q(vatt.q);
math::Vector<3> rpy = q.to_euler(); matrix::Eulerf euler = matrix::Quatf(vatt.q);
vmsg.roll = rpy(0); vmsg.roll = euler.phi();
vmsg.pitch = rpy(1); vmsg.pitch = euler.theta();
vmsg.yaw = rpy(2); vmsg.yaw = euler.psi();
mavlink_msg_vision_position_estimate_send_struct(_mavlink->get_channel(), &vmsg); mavlink_msg_vision_position_estimate_send_struct(_mavlink->get_channel(), &vmsg);
} }