Skip to content

Commit

Permalink
mavlink move to matrix lib
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored and bkueng committed Mar 22, 2018
1 parent 7830d35 commit ad2b96b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/mavlink/mavlink_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1808,11 +1808,11 @@ class MavlinkStreamVisionPositionEstimate : public MavlinkStream
vmsg.x = vpos.x;
vmsg.y = vpos.y;
vmsg.z = vpos.z;
math::Quaternion q(vatt.q);
math::Vector<3> rpy = q.to_euler();
vmsg.roll = rpy(0);
vmsg.pitch = rpy(1);
vmsg.yaw = rpy(2);

matrix::Eulerf euler = matrix::Quatf(vatt.q);
vmsg.roll = euler.phi();
vmsg.pitch = euler.theta();
vmsg.yaw = euler.psi();

mavlink_msg_vision_position_estimate_send_struct(_mavlink->get_channel(), &vmsg);
}
Expand Down

0 comments on commit ad2b96b

Please sign in to comment.