Compass issues, again and again and again

No need for a discussion, magnetometer setup sucks big time in my opinion, i wrote here what i think it should look like. Nothing is going to change about it? Than great, as i said i’ll be happy with the new, super, duper, latest implementation of chibios on a 20 dollars puxracer clone and be done with it

2 Likes

As @fnoop say I think QGC does this already, mission planner also but is is less intuitive. You can find the device ID of each of your attached compasses in the parameters here.

I think the improvement your suggesting would be to display the device ID from the parameters on the compass setup page in the ground control software?

1 Like

If you attach 2 external compasses and have 2 internal (cube 2.1), there is no way to have the second external picked up, no matter what (uavcan). Worst thing is that you don’t even know if the system sees it or not.

There is really no point in continuing telling me it is fine as it is. If it was there wouldn’t be tons of mag problem on the forum again and again.

regards,

Corrado

p.s. In the end as said 100 times is my only opinion, if it is ok as it is than fine with me.

Just my two cents, there are other flight boards out there, maybe give them a try. The one downside I see to that is that there is not nearly as much support out there if you do decide to switch to another flight controller. Agreed it could be a bit easier to setup compasses in MP but still not bad, I haven’t had many compass issues as of late after moving mine around to find the best spot on the airframe for it, each person’s setup is going to be different and some investigating is needed to find the best location.

I’m trying to understand your problem so we can fix it.

I have had a look at the code, the DEV ID parameter seems to be a number that denotes the compasses type and the protocol its connected over. So if we published a key, or better yet coded this into ground control software you would be able to tell which compass it which.

Alternatively we could do a message on boot as for GPS, probably just for external compasses. That provided the compass type and number. This would probably the easier solution and would, I think, solve your issue?

In this case the external compasses are detected first (compass 1 and 2) so you will be left with only one internal (compass 3) as Ardupilot supports a maximum of three.

1 Like

As already said, if you don’t see the problem than is probably me too dumb for arducopter and barely smart enough for dji

Regards,

Corrado

Did you try to connect 2 uavcan external compasses? Try to have the system recognize them as 1st and 2nd, good luck…you’ll be really lucky if you understand wich one of the two was picked up by the system…best thing is that it doesn’t pick up the same one each time and guess what, normal user with no phd in programming is stuck, but as said it is wonderful as it is and we have all the leds working on the latest 20 dollars pixracer, isn’t that wonderful??
And do not give me the bs that dev do their work and we do nothong, because we risk our machines daily to give feedback as best as we can on any new release.

1 Like

Some time ago Randy posted a link to a Python script that decodes the device ID. It might be helpful. Attached and used as follows:
“decode_comp.py -C xxxx” where the xxxx is the device ID.
decode_comp.zip (990 Bytes)

2 Likes

Corrado, you’re correct that there are a lot of posts about compasses. Mounting location, orientation, interference, calibration, etc, can all be difficult, and different for every copter. I’ve got at least a few posts around the web asking for help w/ magnetometers.
But, your specific issue might not be a common one. I doubt a lot of people have your exact flight controller and two uavcan compasses.
You could try qgroundcontrol, as fnoop mentioned. See if that shows the same issue w/ randomly displaying different compasses as 1,2,3. External are supposed to be first. Also be sure everything physical is OK. No intermittent connections or loose wires, etc. Then if it’s still not working, make a post w/ detailed info about compass types, device ID’s, how they’re connected, etc, and maybe you can help the developers find the issue.
Otherwise, I think it’s unfair to say not enough work is being done w/ the magnetometers.
It’s always getting better. Mounting location and ability to handle interference has gotten better over the years. Automatic orientation detection was recently added, and now the in flight learning. Those are huge improvements.
Plus, to your comment about supporting other boards, the people adding support for new FC’s are generally not the same people doing the core development on things like the magnetometers. Adding support for new FC’s is not slowing the development of anything else. If anything it will eventually lead to faster development as more people are interested in using and contributing to the project.

2 Likes

I’m sure there’s more that we can do to make the compass setup better/easier. I’m also sure that it’s one of the major issues that users face.

I have 2 things in mind that I hope to get to in the near-ish future:

  • add the individual compass device ids to the parameter descriptions so that a user can look at the COMPASS_DEVID parameter and instead of just seeing a number, they can see a description of the device and bus that it’s ok
  • document the procedure for connecting two external compasses (like two Hex HERE GPSs).

There is a 3rd item I’d like to do involving an EKF enhancement to make it better able to estimate the vehicle’s heading after takeoff. I think with this we could possibly relax some of our compass checks because we could deal with a bad compass better. This project will require some signficant funding however to get done (about $30k). I’m hoping that we can convince a partner (or two or three) to fund this but I haven’t managed to convince them yet. I’m sure it’ll get done eventually it’s just a matter of when…

3 Likes

As i said i don’t think it needs a big work on to make it a lot better and don’t give the user the sensation of being blind.
I think if the system could show all mag attached and let user just check what they want to use, in a clear way with no guessing.

Corrado

Tried the new bitmask and loaded only uavcan and the driver for the mag chip on the zubaxx datasheet (LIS3MDL) and i get a “bad compass health”.

Than i loaded all the drivers as it was previously (curiously by default LIS3MDL was the only one not loaded) and all worked again, but system said i needed a compass calibration.

Obviously i have never been able to see the 2 external compasses, that, in theory, should show up and be detected as first and second.

The more i dig into this the less i understand the incredible logic behind it, it is just a mess.

It is my strong convincement that the magnetometer, being one of the fundamental sensor, should be way way way easier to setup and more understandable!!!

Really really do not understand why this stuff is not on top priority list, really puzzles me.

are your two external mags the same? Maybe they have the same address so the code cant tell the difference between them.

Most compass setups are fairly painless, so long as its mounted far enough from interference, especially with the new auto orientation feature. I think its far to say using dual CAN compass is very unusual. Out of interest why do you need two external compasses?

edit: the cube has two can bus’s i think, have you tried each compass on separate bus?

I have tried everything. Address of the 2 compasses are obviously different.

Probably you are right about painless compass setup, so it is almost incredible it is one of the most discussed argument. They must be all dumbs like me.

Just to point it out, it is not a matter of pain or not but is a feeling of complete confusion on how it works. If something goes wrong it becomes an hocus pocus kind of thing, but again, it is probably me and compass stuff is GREAT as is.

Your not giving us much to work with here, not much we can do to help you with your issue.

Maybe I am the ‘dumb’ but I really don’t see the ‘incredible’ amount of of issues about compasses.

Perhaps this would have been better posted in the Rants and Raves section.

Is there a Setup your compass for dummy’s somewhere. I nearly gave up on Pixhawks and Arducopter because of compass problems and they are prevalent in the various forums on the internet.

Over time I have been able to resolve them through grit and determination. But I confess if there was a document out there for us none technical users that explained how to set it up and what the main settings do, how to use them. Perhaps that would be helpful. A lot of time I read the Wiki and my eyes glaze over.

That said, I am sticking with Arudcopter…but goodness. Sometimes its hard

Ok Peter, IT IS GREAT AS IS.

Maybe supporting 3-4 different magnetometer chips and have them working well and easy would be better than load 20 different drivers and drive people crazy. But that is how it is, there is a run to bell and whistless while important things are ages behind…

  • One still has to tell the system in which orientation your compass is? If so, this could be automated.
  • Is autocalibration now working on Ardupilot?
  • and, as noted above, call them internal and external, not 1 and 2

If you want to have real fun try to have 2 external uavcan compass working…but all is good…