M500 Magnetometer Issues
-
Hi everyone,
I'm having trouble getting some new M500s' magnetometers configured/calibrated correctly. There are 10 brand new M500s. The GPS is a Taoglas CGGBP.18.4.A.02.
In summary, heading is consistently incorrect when on the ground, even after compass calibration. The GPS itself is housed in a 3D printed GPS antenna boom. This 3D print has an arrow indicating front of the vehicle. However, the GPS itself is mounted 270 degrees (90 degrees CCW) within this print. Initially, I thought I just needed to configure the compass's orientation in QGC to solve the issue. I then realized that when I spun the GPS module independently of the vehicle, the indicated heading did not change, indicating that the vehicle is using the internal mag instead. I was unable to get the vehicle to recognize and use the external mag.
I then took a HolyBro M8N GPS module from our older M500s and mounted that on the new vehicle to see if it improved its performance, with little to no success. However, when spinning this module independently of the vehicle, indicated heading on QGC did change, indicating that the external compass is being used only with the HolyBro module.
The only way I've been able to achieve steady flight in position hold is to arm and takeoff in stabilized, fly around to shake out the compass, wait for the heading to correct itself, and then switch to pos hold. However, on landing, the heading would reorient back to the incorrect heading and often throw messages like "Stopping compass use", "strong magnetic interference", etc.
I am not sure if this is an interference issue that some shielding may help, but I do not see a clear reason for this as our old M500s do not have this issue, with the only clear differences being a different GPS module, older PX4 firmware, and soft mounted flight stacks (The new vehicles' flight stacks are hard mounted to the frame.) -
@spitkowsky The heading will not necessarily change with just rotation of the GPS / magnetometer unit. It also needs to detect movement with the IMU on the flight controller. Regardless, if you take an older M500 with a Holybro unit it works fine in the same location but the new M500 does not? Even when you take the Holybro unit from the older M500 and mount it on the newer one you see the same issue? What SDK is loaded on the older M500s? And which one is on the newer M500s?
-
@Eric-Katzfey Noted about the heading. I did notice the datasheet for the taoglas gps unit does not mention a magnetometer. Is it possible that this unit does not have a magnetometer?
Additionally, I noticed that qvio is enabled and running. In the past, we have had very poor results with M500s running qvio outdoors. I am not sure that the EKF is using VIO, but could this be an/the issue?
Yes, the older M500s all work fine in the same location. When putting the Holybro unit from the older M500 onto the newer one, the same issue is present.The vehicle starts on the ground with incorrect heading. I take off in stabilized and fly/yaw around until the heading corrects itself. I can then fly in a reliable position hold. When I land, heading may stay correct, but I receive a PX4 message "Stopping compass use" and the vehicle cannot arm again.
I only have newer M500s with me until next week so I can get back to you about SDK versions once I have an older one in hand. How do I check the SDK version?
-
@spitkowsky Taoglas is just the antenna that is on the GPS unit. The actual unit is from mRobotics. It has a uBlox M10 GPS and magnetometer.
-
@spitkowsky To check SDK version use the command
voxl-version
. -
@Eric-Katzfey Understood. Thanks for the info on the mag. The SDKs are as follows:
Newer M500s:
system-image: 4.0.0
kernel: #1 SMP PREEMPT Thu Oct 13 17:57:05 UTC 2022 3.18.71-perfhw platform: VOXL
mach.var: 1.0voxl-suite: 1.2.0
Packages:
Repo: http://voxl-packages.modalai.com/dists/apq8096/sdk-1.2/binary-arm64/Older M500s:
system-image: 4.0.0
kernel: #1 SMP PREEMPT Thu Oct 13 17:57:05 UTC 2022 3.18.71-perfhw version: VOXL
voxl-suite: 0.9.5
Packages:
Repo: http://voxl-packages.modalai.com/dists/apq8096/sdk-0.9/binary-arm64/ -
@spitkowsky For others who are seeing similar issues, the magnetometer rotation isn't being specified correctly in the newer SDK. The rotation should be set to the value 10. If you are seeing these issues try setting the CAL_MAG0_ROT parameter to 10.