Browse Source

Correct order of rotations to get roll, pitch and yaw corresponding to classical aeronautics convention and coherent with Fly view

QGC4.4
baptistelabat 10 years ago
parent
commit
5fbca22266
  1. 5
      src/ui/map3D/Pixhawk3DWidget.cc

5
src/ui/map3D/Pixhawk3DWidget.cc

@ -374,9 +374,10 @@ Pixhawk3DWidget::attitudeChanged(UASInterface* uas, @@ -374,9 +374,10 @@ Pixhawk3DWidget::attitudeChanged(UASInterface* uas,
}
// update system attitude
osg::Quat q(-yaw, osg::Vec3d(0.0f, 0.0f, 1.0f),
osg::Quat q(roll, osg::Vec3d(0.0f, 1.0f, 0.0f),
pitch, osg::Vec3d(1.0f, 0.0f, 0.0f),
roll, osg::Vec3d(0.0f, 1.0f, 0.0f));
-yaw, osg::Vec3d(0.0f, 0.0f, 1.0f)
);
m3DWidget->systemGroup(systemId)->attitude()->setAttitude(q);
}

Loading…
Cancel
Save