Joined
Mar 23, 2017
Messages
11
Reaction score
5
Location
Poland
Hi,
I would like to share with you my last investigation about the "compasses inconsistent" problem.

It is due to bad orientation of the external compass (one in the leg). There is another one inside the cube which is correctly oriented however differences between them are too big. The problem is in the wrong parameter COMPASS_ORIENT = 38 (meaning Yaw293Pitch68Roll180). Yaw and Pitch looks pretty good but Roll should be 90 instead of 180.

To fix this you should change those parameters:
COMPASS_AUTO_ROT = 0 {avoiding auto change of orientation after compass calibration}
COMPASS_ORIENT = 101 {this is custom orientation for firmware versions 4.2 and later, otherwise use 100}
CUST_ROT_ENABLE = 1
CUST_ROT1_PITCH = 68
CUST_ROT1_ROLL = 90
CUST_ROT1_YAW = 293

Please make sure that your external compass has COMPASS_PRIO1_ID and internal COMPASS_PRIO2_ID. You can check it in Mission Planner:

1680520633119.png

You can check mx my mz value, should be similar for both compasses:

1680521005370.png

I hope this will help at least one person :)

bajba
 
  • Like
Reactions: 渡口玩飞机
Hi,
I would like to share with you my last investigation about the "compasses inconsistent" problem.

It is due to bad orientation of the external compass (one in the leg). There is another one inside the cube which is correctly oriented however differences between them are too big. The problem is in the wrong parameter COMPASS_ORIENT = 38 (meaning Yaw293Pitch68Roll180). Yaw and Pitch looks pretty good but Roll should be 90 instead of 180.

To fix this you should change those parameters:
COMPASS_AUTO_ROT = 0 {avoiding auto change of orientation after compass calibration}
COMPASS_ORIENT = 101 {this is custom orientation for firmware versions 4.2 and later, otherwise use 100}
CUST_ROT_ENABLE = 1
CUST_ROT1_PITCH = 68
CUST_ROT1_ROLL = 90
CUST_ROT1_YAW = 293

Please make sure that your external compass has COMPASS_PRIO1_ID and internal COMPASS_PRIO2_ID. You can check it in Mission Planner:

View attachment 12016

You can check mx my mz value, should be similar for both compasses:

View attachment 12017

I hope this will help at least one person :)

bajba
38 is the correct orientation for the leg compass when it is installed correctly with the smooth side out. It sounds like yours may be in upsidedown.

I have had an issue where the compass_auto_rot was turned on and kept changing the orientation to 29 when it should be 38. Once I disabled the auto rotate and set 38 my problem went away.
 
38 is the correct orientation for the leg compass when it is installed correctly with the smooth side out. It sounds like yours may be in upsidedown.

I have had an issue where the compass_auto_rot was turned on and kept changing the orientation to 29 when it should be 38. Once I disabled the auto rotate and set 38 my problem went away.
Thanks for the reply :)

As I said before the stock compass definitely has 90° roll angle and there is an error in documentation. I am 100% sure about it. This is why your drone does not recognize 38 as correct orientation and change it to 29. I had the same behavior as yours before.

I have four Solo drones and all of them have a stock compass in the leg. All of them had the same problem but using custom angles all works fine. I can arm all of them just after powering. No need to do compass calibration every one and again.

You can check in your drone differences between mx-mx2, my-my2 and mz-mz2 in Mission Planner using 38 parameters and then change to 101 (custom) and 90° roll. You will see that differences are much smaller.

I am working in 3D so it was easy for me to measure those angles from a 3D model I found on the internet. If you watch the leg you can easily see that there is no 180° but 90°. Even without 3D model and CAD software :D

I mentioned this issue on github. I hope they will fix it for newer versions of ArduPilot:
COMPASS_ORIENT 38 · Issue #23392 · ArduPilot/ardupilot

I use custom rotation and do not have any problem now. Do not care if they fix it but I think it would be very helpful for other users of Solo drones which do not want to deal with parameters ;)

YawPitchRoll.JPG

I will show you on photos difrent position of compass starting from Yaw=0 Pitch=0 Roll=0:
Yaw0Pitch0Roll0.jpg

Yaw=293 Pitch=0 Roll=0:
Yaw293Pitch0Roll0.jpg

Yaw=293 Pitch=68 Roll=0:
Yaw293Pitch68Roll0.jpg

Yaw=293 Pitch=68 Roll=90:
Yaw293Pitch68Roll90.jpg

and finaly Yaw=293 Pitch=68 and Roll=180 what is wron:
Yaw293Pitch69Roll180.jpg

As you can see, ArduPiolot thinks that the compass is in a different position than it is in reality. The difference is not so big (90° haha) this is why the drone lets arm (sometimes) but this is not good setup.

I RECOMMEND all of you who use stock compass to change to custom orientation = 101 and angles Yaw293 Pitch68 and Roll90

Would be good to heare who has/had "Compasses inconsistent" problem? I gues many of you.
 
  • Like
Reactions: 渡口玩飞机
Would be good to hear from someone who uses my recommendation and gets improvement arming the drone. Please write.
 
  • Like
Reactions: 渡口玩飞机
Would be good to hear from someone who uses my recommendation and gets improvement arming the drone. Please write.
All mine work fine with 38 but I'll give it a try. I have a dozen Solos with various firmware versions and mods. If it helps I'll include it in the APJ files I make for the Solex scripts people use. I have already turned off compass_auto_rot among other param changes like in 4.3.x it needs SERIAL1_PROTOCOL 1 for the imx6 to connect.
 
  • Like
Reactions: bajba
Would be good to hear from someone who uses my recommendation and gets improvement arming the drone. Please write.
I just got a Solo new out of the box and updated the firmware to Open Solo 4 with the 4.3.2 version of ArduCopter. Had a problem calibrating the compass and after several tries I tried your fix and was able to successfully calibrate the compass. I wonder if the orientation angles have changed in the later versions. I can change the APJ file that is available in Solex to have these parameters preset.
 

New Posts

Members online

Forum statistics

Threads
13,054
Messages
147,424
Members
15,938
Latest member
AlanGray