-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Free Mag alignment with cli not possible #5405
Comments
I also have this problem with magnetometer. I want to mount it on a quadcopter. Angled backwards so when I fly the GPS looks directly up. It allows the unit to see more satelites constantly. When the GPS+Compass unit (BN-880) is flat, it works perfectly. When it's tilted backwards, after calibration the heading readings are messy. I tried setting align_mag_pitch to -300, 300 (for 30* angle that I have), calibrating after every change. Also i tried replicating the "CW270Flip" setting, in case that it's ignored when using the pitch angle cli command. Nothing works. I tried current firmware and also INAV 2.2.0 I was calibrating on a 2m cable, so no interference during calibration, also no interference from the quad, because when mounted flat in the same spot mag works perfectly. The tilt is the problem. |
Hello, just wanna say. I found this in the betaflight Code. set mag_align_pitch = 1800 Means for 30degree backwards tilted, reduce roll at value -300 set mag_align_roll = -300 Because Roll Axis of Magnetometer is in relative to pitch axis of FC and vice versa Also use: #define CUSTOM_ALIGN_CW0_DEG ((sensorAlignment_t){ .values = { .roll = 0, .pitch = 0, .yaw = 0 }}) void buildRotationMatrixFromAlignment(const sensorAlignment_t* alignment, fp_rotationMatrix_t* rm); |
Maybe this short hint can be added to the inav Wiki? Can be closed |
Hello everyone! |
And what value is wrong? |
align_mag_roll As a rookie, I am a little confused. @@! |
Im confused too because These cli variables at betaflight are correct. So it seems inav use the variables as you describe. Why i didnt notice that? I Look about that tomorrow. |
Should be correct now |
Since a few Days, multiple Problems occured in Inav Facebook Group.
Problem: Users who mounting Magnetometer with Compass on a 30degree Tilt Angle Backwards, are not able to get this working with set mag_align_tilt = 300 or -300.
Or Simply cannot calibrate it if it's mounted flat anyway.
Lot of them build a dozen quads with inav and tiltet/flat mount mag/gps. And now got it only working with a flat mount magnetometer. (EG bn880 with cw270 flip and mag_align_pitch = -300
Or mean this:
// on-board mag alignment. Ignored if externally aligned via *DeciDegrees.
That cw270flip would be ignore and you need to set
Mag_align_pitch = -300
mag_align_roll = 1800
mag_align_yaw = 2700
Or if mag is mounted with cw270 flip
Flip is now roll and values are mean sensor axis itself?
shellixyz@1f8d73c
The text was updated successfully, but these errors were encountered: