Mark,
Thanks for trying to clean up the docs, I’m sure it’ll be helpful for many.
Some more answers below..
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Hamish Willee
Sent: 1-Oct-15 9:47 AM
To: drones-discuss
Subject: Re: [drones-discuss] Compass documentation
Hi Mark
Sounds excellent. I have tried to improve the inconsistency in naming today - replacing "magnetometer" with "compass" or "compass (magnetometer)" where appropriate. There are a few places that I didn't change it - for example when referring to a product name and in the generated-from-code parameters (e.g. Rover Parameters).
You're right that there are lots of inconsistencies - for example in arming plane we see "Compass checks. All compasses must be configured and calibrated, and need to be consistent with each other (if you have more than one compass)" which does not seem to agree with Randy's point.
You obviously have a good understanding of the problems and good ideas around the solutions. Please let me know if I can be of assistance when you come to update.
Regards
Hamish
On Wednesday, 30 September 2015 23:30:21 UTC+10, Mark Jacobsen wrote:
Randy (or others),
I have a few follow-up questions.
1. In answer #3 you write, "[ArduPilot] uses the COMPASS_PRIMARY compass unless it's unhealthy in which case it uses the first healthy compass." But in answer #8 you write, "If the compass fails for some reason, ardupilot does not fall back to the next healthy compass. This is done on purpose because we've seen a few situations where the internal compass values are not good." Those two statements seem contradictory. Am I missing something? And if ArduPilot does not fall back to the next healthy compass, then is there any reason to have multiple compasses on board?
>>> the internal compass cannot be removed and the external compass tends to have less interference from the motors and power wires. Having multiple compasses allows us to catch incorrect orientations by checking that they’re consistent.
2. Does the statement about internal compass values not being good imply that we should advise users to never use the internal compass?
>>> it depends upon the vehicle. For most vehicles an external compass does better but for a small percentage an internal compass is enough. It would be strange to fit an external compass but then use the internal compass.
2. This might be a question for Paul, but I'm wondering if I could get a layman's explanation of how compass data can be inconsistent with accelerometers and gyros. I see how you could use/integrate data from those sensors to estimate a heading relative to a previous heading, but wouldn't that previous heading only be able to come from the compass? I can see how you could get inconsistency if the compass and gyros seem to be turning at different rates. But I can't see how "compass variance" would appear when a plane is powered up sitting on the ground, which many users have reported trouble with recently.
>>> it is more of a question for Paul but you can imagine that if you integrated the gyros’ reported rotation rate but the compass heading wasn’t changing then the EKF would know that either the gyros or the compass was bad and a variance would appear.
>>> I don’t know about Plane but in copter we’ve seen cases where there is a spike in the reported compass values for the first 20 seconds. Once that’s settled down the compass values return to more sensible values but the change has caused the EKF to report a compass variance. It’s impossible to say if this is what you’re seeing but if you have dataflash logs, especially with the LOG_BITMASK set to logging-while-disarmed we can have a peek.
3. If the compass fails, does ArduPilot fall back to a GPS heading? Is this different with plane/copter?
>>> Paul will know best but for copter it can’t simply fall back to the GPS heading because the GPS reports the direction of movement of the vehicle, not it’s heading. I think the EKF can figure out the heading using a combination of the GPS’s implied accelerations and the IMU’s accelerations. If it’s heading estimate is correct those accelerations will be in the same direction.
Thanks for helping to clarify this confusing subject.
https://github.com/diydrones/MissionPlanner/pull/1021
Mark,
Looks pretty good. Definitely nice to have more controls and information on the setup screen.
A couple of suggestions:
· I think it’s save to remove the “Enable compasses” checkbox at least for Copter (we can ask Tridge about Plane). I was thinking of completely removing the MAG_ENABLE parameter from copter for the next release because flying completely without a compass (at least for copter) is not a supported configuration anyway.
· There are COMPASS_ORIENT2 and COMPASS_ORIENT3 parameters so there could be orientation drops downs for compasses 2 and 3 as well.
· I wonder if we should try and put the compass-mot calibration on that page too.
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Mark Jacobsen
Sent: 4-Oct-15 1:51 PM
To: drones-discuss
Subject: Re: [drones-discuss] Compass documentation
--
--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/t5ggAuweWVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.
With people mostly using external compasses at least on mid to large copters, I think compassmot is much less used than it used to be. Personally I never use it anymore.
I think Tridge and I are probably against changing the indexing to start from “1”. I think we try to keep the documentation, parameters and coding consistent and because C++ does it’s array indexing from “0” I think it would add confusion to start number from “1”. Better to instead handle it in the GCS with labels.
Copter-3.3’s EKF actually learns compass offsets but it always does it and there’s no way to turn it off. We should rationalise that COMPASS_LEARN parameter so that it turns on/off learning for both DCM and EKF.