Commit 5fbca222 authored by baptistelabat's avatar baptistelabat

Correct order of rotations to get roll, pitch and yaw corresponding to...

Correct order of rotations to get roll, pitch and yaw corresponding to classical aeronautics convention and coherent with Fly view
parent a1a2da9a
......@@ -374,9 +374,10 @@ Pixhawk3DWidget::attitudeChanged(UASInterface* uas,
}
// update system attitude
osg::Quat q(-yaw, osg::Vec3d(0.0f, 0.0f, 1.0f),
pitch, osg::Vec3d(1.0f, 0.0f, 0.0f),
roll, osg::Vec3d(0.0f, 1.0f, 0.0f));
osg::Quat q(roll, osg::Vec3d(0.0f, 1.0f, 0.0f),
pitch, osg::Vec3d(1.0f, 0.0f, 0.0f),
-yaw, osg::Vec3d(0.0f, 0.0f, 1.0f)
);
m3DWidget->systemGroup(systemId)->attitude()->setAttitude(q);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment