Browse Source

Merge pull request #1301 from baptistelabat/master

Correct order of rotations to get roll, pitch and yaw corresponding to c...
QGC4.4
Lorenz Meier 10 years ago
parent
commit
a255b8d9ee
  1. 7
      src/ui/map3D/Pixhawk3DWidget.cc

7
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),
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);
}

Loading…
Cancel
Save