-
Notifications
You must be signed in to change notification settings - Fork 327
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
fixed aligment tool #2025
fixed aligment tool #2025
Conversation
@RomanLut Thanks for your work on this. Although the compass orientation preset is only based around I have written more information on the subject of Orientation Preset and GNSS units like the M181. To provide a more in depth explanation. https://github.com/iNavFlight/inav/wiki/GPS-and-Compass-setup#setting-up-the-compass-alignment |
many thanks for your gps/magneto wiki i have a big doubt about orientation, and i do not know how to clear that doubt. |
It looks to be the same layout as the Walksnail M181. If it had an arrow. It would be like this. |
Y and Y marking on this picture is incorrect. There a is dot marking pin 1 of the chip. X axis is along pins 1,2,3,4 You also can see this on qmc5883 module: Y axis on matek module should point down. |
I did make a mistake in the wiki.. But I added this image to help explain it better.
I agree, that image in not perfect. Although the main issue is caused by the manufacturer mounting the mag chip any direction they want. With respect to the plug being at the rear. And lately not even providing a reference arrow. Because manufactures like Walksnail and HGLRC are not following the default orientation preset of CW270FLIP. We require that function to work independently of the PRY magnetometer alignment sliders. Please don't take my statements as criticism. I very much respect your work and efforts towards this complex issue. |
@RomanLut This may help you visualize the issue withe the M181. These are the only settings I could find to make this plane work correctly. And its now had over 50 flights.
This is the aircrafts layout. With the FC's arrow facing rearward. And the compass plug facing forward, based on the magnetometer chips orientation. And this is what the tool shows with this PR.. The FC arrow is correct, But the mag arrow is off by 90.. The plug should be facing forward (and the arrow backwards if this unit provided one). |
That's a lot of extra work for you Roman.. And there is nothing stopping other manufactures releasing a combine module that has the mag chip set in a different position. To make it easier for you. Another option could be to use the PLUG as the The only prerequisites for that will be.
Then once the For your reference I wrote a list of combine modules from better known manufactures, and their AxisFlying - This is only a small portion of the modules on the market. But you get the idea of the non uniform mounting of the magnetometer chip. Which is why |
I have a working proof of concept which dispenses with all of this. That makes it so we don't care which model GPS/ mag, or how the sensor is oriented relative to the board.. It has the user point the aircraft roughly north, then roughly east. From those two readings we can compute the orientation. Similarly for FC / accelerometer orientation. While the aircraft is roughly flat (and pointing north for compass, whichever direction reads about 1G is the side that's pointing down. It all works and makes it easy for the user. The one challenge remaining is translating the new mag orientation based on what the new FC orientation will be. A little bit of quaternion math that I'm not particularly comfortable with. |
@sensei-hacker It would make it easier in theory.. Provided the magnetic bearing is not influenced in the slightest by weak magnetic fields emanating from something on the craft.. Otherwise that magnetic deviation would render the derived compass orientation erroneous. The benefit of having an orientation preset that is based on physical parameters. Means its one less thing to guess about if the compass calibration is not correct. Or magnetic deviation does occur inflight from something on the copter. Arducopter uses something like this. And its proven not to be totally reliable. |
You still set the compass orientation once, on the bench, using one of the presets. Not continuously in flight. Nothing changes about in-flight behavior. I only changed the UI in Configurator. You choose the preset on the bench, not in flight. In order to choose the right preset, you simply have the user point the aircraft north, then east, and round to the nearest 90°* to choose which preset matches . You don't ask the user which preset - they don't know. Instead you check the sensor reading and you can see which preset matches. If it reads 3° while pointed north, and reads 267° while pointed east, we know it needs 180° rotation on the lateral axis. I simply automated the exact procedure I've used dozens of times helping people on Discord. No changes to INAV itself. We don't look for markings on the board, we look at the sensor readings. It hasn't failed yet.
|
Added magnetometer chips and some GNSS modules: |
Fixes #1955