Compass calibration - custom orientation

Newb here trying to calibrate my compass:

Hardware:

  • TBS Lucid H7
  • BZ 251 GPS/Mag

My GPS is mounted on a 30mm mast above my drone, and it’s pitched up around 30 degrees. When I do the compass calibration and set Compass_Auto_Rot to enabled, I am assuming it’s trying to fit my orientation into a default configuration like 45 degrees or 180 degrees, etc.

My compass calibrates successfully, but my yaw looks off in the HUD, and the yaw constantly drifts for 5 minutes after each movement like it’s confused and keeps trying to reconcile what I just did. Ultimately the yaw settles after 5 min or so, but it’s usually off by ~30 degrees. So, I’m thinking my pitch isn’t being accounted for…

So, I plan to change COMPASS_ORIENT to 101 so I can set custom pitch. My questions:

  • If I do this, do I also need to set CUST_ROT_ENABLE to 1? If so, why (isn’t this a duplicate step from setting orient of 101)? Shouldn’t setting the orient to 1 allow the customs to be set? If no, then what does setting CUST_ROT_ENABLE to 1” actually do?
  • Do I also need to turn off COMPASS_AUTO_ROT? If I don’t turn this off, will this just override any custom rotations I enter?
  • The instrucitons under COMPASS_ORIENT say to enter custom values under CUST_1_ROLL, but I can’t find this parameter anywhere. The closest I see is CUST_ROT1_ROLL. Is this the correct field?
  • If I enable and set a custom orientation to set my pitch to 30 degrees, do I need to re-orient the entire mag chip? For example, I’m assuming when the compass chip type is detected it assumes some default orientation like upside down and yawed 90 degrees as most GPS boards solder it on in this way. Will I lose this default assumption and need to reorient the entire chip, or will it apply the pitch 30 degrees on top of what it knows about how this chip is normally oriented on a typical GPS unit?

Appreciate the help with this as I try and pin down why my yaw is acting wonky!

Hi @geminifailedme,

  1. yes, set CUST_ROT_ENABLE = 1
  2. yes, set COMPASS_AUTO_ROT = 0
  3. the wiki’s down at this exact moment so I can’t see the instructions re CUST_1_ROLL vs CUST_ROT1_ROLL but it’s likely just out-of-date docs. CUST_ROT1_PITCH/ROLL/YAW is what I see in 4.8 (and probably earlier)
  4. no need to re-orient the entire mag chip. the custom orientation is built on-top of the default.

best of luck!

2 Likes

Thank you! I used these settings and still had yawing issues, until I realized my custom pitch is 18 degrees and not 30 degrees like I thought. Measure twice input once, eh?

After adjusting for the pitch, it worked great and is ready for its first test-flight. Thanks!

2 Likes