Some sanity questions

Sorry to bother. I’ve been a short to middle term user of Ardupilot. I must say it is quite robust. Though sometimes I don’t really understand the fine details of everything. As a result I’m probably making some wrong assumption. Therefore I opened this topic in order to get some more details and understand how ardupilot works a little bit better. The questions are in specific about IMU/Compass and ekf. Don’t worry about answering all questions. One answer will already help me understanding it better.

  1. Only recently I understood that IMU and compass are different concepts for Ardupilot. I assumed the compass contained all IMU too. Does that mean the compass is actually only the “Magnetometer” and that the IMU is the Gyrometer and Accelerometer. Is that correct?

  2. I know that for the compass it is better to have it external. Is that the same for IMU? Seems it is only possible to use the internal ones. Wouldn’t it also better to use an external one?

  3. Now you can have 3 IMUS enabled. IIUC this creates up to 3 EKF instances. One per IMU. This means only the IMU is different per EKF? Every EKF uses the same magnetometer and gps values?

  4. Some hardcore question: When you set EK2_IMU_MASK to 3 it will create two instances one with IMU1 and one with IMU2. What is IMU1 and IMU2? Is that INS_GYR_ID/INS_ACC_ID and INS_GYR2_ID2/INS_ACC2_ID? Or is that the first and second enabled IMU (INS_USEX == 1)

  5. Along those lines. What happens if all INS_USE=0 INS_USE2=0 INS_USE3=0 ? I tried this and I didn’t notice a difference. Will it just take a disabled IMU?

  6. Similar questions about EK2_IMU_MASK. What if there is only one IMU enabled. I saw we still have two EKF instances. What IMU is used for the second ekf2?

If anybody knows an answer on any of those questions. That would help me a lot in understanding Ardupilot better. Thanks!

  1. Yes
  2. No.
  3. There is apparently 22 or so EKF’s running, anyone correct me if I’m wrong. They are individual to the sensors.
  4. ?? not sure here haven’t read up on it.
    1. Sounds like your messing with the internals for the sake of it. If you find out please share,
  1. According to the code it will take IMU0 if all INS_USE are 0