Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compass rose orientation #2

Closed
h3ifri opened this issue Apr 26, 2016 · 7 comments
Closed

Compass rose orientation #2

h3ifri opened this issue Apr 26, 2016 · 7 comments

Comments

@h3ifri
Copy link

h3ifri commented Apr 26, 2016

Hi Max!

I think the compass rose is off by 90°, the png points to west and not to north. It can be fixed by either rotate the png by -90° or in code:

@@ -851,3 +851,3 @@ public class Visualizer3D extends JFrame {
             dZ = -Math.atan2(m1.getElement(1, 0), m1.getElement(0, 0)) + Math.toRadians(90.0);
-            affTrans.setToRotation(dZ, halfW, halfW);
+            affTrans.setToRotation(dZ + Math.toRadians(-90.0), halfW, halfW);
             drawg2d.setTransform(affTrans);

Cheers,
Heiko

@mpaperno
Copy link
Owner

Hi Heiko,

Are you saying it's off 90° in the actual HUD? I know the png image is rotated, that's so it doesn't need to be rotated in the code for every draw. The HUD has always looked correct to me...

Cheers,
-Max

@h3ifri
Copy link
Author

h3ifri commented Apr 26, 2016

Hi Max,

the heading indicator in the SIM did not match the heading in QGC. Rotating the rose by -90° fixed it for me. I assume that after an UKF reset, the ground camera should point north?

Cheers,
Heiko

@mpaperno
Copy link
Owner

Heiko, this is not what you see after a reset (or at startup)?

compass-hud

I've never seen what you describe... do the AQ mag inclination/declination settings match what the sim is reporting (besides the inclination being reversed)? It should be shown at the top of the report window.

-Max

@h3ifri
Copy link
Author

h3ifri commented Apr 26, 2016

Hm, thats weird again... ;) This is how it looks for me (without my changes):

compass

I've never seen what you describe... do the AQ mag inclination/declination settings match what the sim is reporting (besides the inclination being reversed)? It should be shown at the top of the report window.

Yep, they match.

Cheers,
Heiko

@mpaperno
Copy link
Owner

Actually I now notice the same thing in Angel's screenshot from the other issue thread. The AQ HUD and the map view show correct heading, but the sim HUD is 90° off. What the heck...? Weird is right!

-Max

@mpaperno
Copy link
Owner

mpaperno commented Apr 26, 2016

Well this turned out to be pretty mundane.... I had committed the wrong image, of course. Funny no one mentioned it before, including everyone trying the PX4 version. :)

I assume this fixes it?

Thanks again Heiko!
-Max

@h3ifri
Copy link
Author

h3ifri commented Apr 26, 2016

Yep,

thank you!

Cheers,
Heiko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants