Pixhawk 4 and Ublox NEO-M8N GPS

Hi all, I’m having issues setting up a Pixhawk 4 and an external MAG. Particularly calibrating the compass. I have tried ardupilot and px4 firmware (latest versions), and both QGC and mission planner software and can’t get the compass to calibrate. Doesnt seem to recognise the mags sometimes throwing up a uorb devid error. Thw only glance I’ve seen of a mag working has been through the wizard on the mission planner platform. In the live calibration setting, one mag is showing in the plotting map but it is a small cluster staying on one axis rather than all over the map.
Anyone had any success with this or have any tips? I’m losing my mind!

Cheers,

Joe

Edit: I’ve looked all over different forums and haven’t found any useful information really!

@UnmannedTech
Alex this has your name all over it…

2 Likes

Could you double check that you have connected your external GPS/compass module.correcrly. and during calibration are you ensuring you are away from any sources of magnetic noise. Like large metal objects or power lines?

Lastly can you share a few photos of how your pixhawk/GPS are mounted and also the GPS/compass settings in mission planner. If it’s not interference causing the issue maybe it’s orientation is wrong?

HI Alex,
Thanks for your repsone. I’m not near any sources of magnetic interference or strong electrical currents as far as I can tell. Will check in a different room to make sure.

Connections are correct I think. Its mounted on a box for setup and callibration Here are a few photos and screenshots to help. I find it strange that the callboration page doesn’t have the default options for pixhawk (as I’ve seen in other tutorials and videos). This doesn’t seem to pick up the external gps even with different options.

The screenshots also show the strange mag calibration behaviour on the live calibration wizard. GPS is working correctly.

As a side note, I started playing around with the sensor parameter options on QGC last night, and I could assign IDs to each mag which seemed to do something useful but I couldn’t calibrate them. Have you setup with similar hardware with the latest software versions? I’m very confused!

Cheers,

Joe

Update: after trying all evening again i’ve finally managed to calibrate the internal mag on QGroundControl by installing an older version of PX4 (1.5). I also managed to see the internal mag and external mag, but could not calibrate the external so have had to unplug it. Ideal scenario would be to run the external mag as primary and internal as backup, on the latest version of Pixhawk, so if anyone has any suggestions that would be amazing. It seems like there is an issue with the mags being correctly identified (hence the no uorb devid mag ID error) but I have no idea how to sort it!

Happy to see you made some progress, but you could probably get the external one working if you mount it at least 5cm (ideally over 15cm) away from any other device as the compass is extremely sensitive.

Another thing to check is also the compass orientation:

Checking Compass Orientation

  • Ensure your AHRS_ORIENT parameter is correct. This will ensure that your internal compass’ orientation will be correct
  • When rotating your aircraft through all axes each of the compasses should move in the same direction, and should be of approximately the same values
  • Northern Hemisphere: - Z-component should be positive - when pitching the vehicle down, the X component should increase in value - when rolling the vehicle right, the Y component should increase in value
  • Southern Hemisphere: - Z-component should be negative - when pitching the vehicle down, the X component should decrease in value - when rolling the vehicle right, the Y component should decrease in value
1 Like

Alex you are a legend! Got It working last night by moving the external GPS away from the board. Never imagined they were this sensitive. Managed to get the latest version of ardupilot installed through mission planner too :+1: Looking forward to flying this now. Thanks for your help!

1 Like

Nice, happy to help and hear you got it working :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.