Commit d78971b2 authored by pixhawk's avatar pixhawk

Fixed wrong pitch visualization

parent 8486dd66
......@@ -405,7 +405,7 @@ void HUD::paintCenterBackground(float roll, float pitch, float yaw)
// Translate in the direction of the rotation based
// on the pitch. On the 777, a pitch of 1 degree = 2 mm
//glTranslatef(0, ((-pitch/M_PI)*180.0f * vPitchPerDeg), 0);
glTranslatef(0.0f, (pitch * vPitchPerDeg * 16.5f), 0.0f);
glTranslatef(0.0f, (-pitch * vPitchPerDeg * 16.5f), 0.0f);
// Ground
glColor3ub(179,102,0);
......@@ -718,7 +718,7 @@ void HUD::paintHUD()
// Rotate view and draw all roll-dependent indicators
painter.rotate((roll/M_PI)* -180.0f);
painter.translate(0, (pitch/M_PI)* -180.0f * refToScreenY(1.8));
painter.translate(0, (-pitch/M_PI)* -180.0f * refToScreenY(1.8));
//qDebug() << "ROLL" << roll << "PITCH" << pitch << "YAW DIFF" << valuesDot.value("roll", 0.0f);
......
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