VTOL Compass Issues

Hi all,

I have a question about some compass issues that we are experiencing with the Foxtech GreatShark VTOL 330. This VTOL system is running the CUBEorange and the HERE+ GNSS system. The Flight Controller is located in the tail section of the airframe.

The issue we are seeing is an EKF alignment offset of anywhere up to 180 degrees after ~2mins of ground time. We have done multiple compass calibrations and moved to fewer magnetic fields for testing. Weirdly though if we power on the unit and take off before ~2mins the compass does not drift at all and the unit acts perfectly.

We have tried many things to mitigate this including disabling the internal or external compass and only using one source. The same issue persists.

Logs attached of one of the flights conducted with the drifting compass attached.

https://airsight.box.com/s/yfd7kg7bzj73davlc7awnqqexojq4f7r

I haven’t looked at the log files, but I can give you some hints. First of all, disable all compasses, except the external one in the GPS puck.

We have noticed that when you leave the internal compass enabled, and you start to draw some current, either on the multi rotor or fixed wing motor, most of the times, the power cables are too close to the pixhawk and they give you a lot of trouble.

So we mount the GPS puck with the compass inside as far away from the power cables as possible, only enable this compass and all is fine.

1 Like

Hi Tom,

Welcome to the APM VTOL forum!

Anthony posted some good advice so be sure to check your setup for proper isolation from the power lines. I also use just a single GPS and Compass but I see that your current setup also does that.

I looked at the logs and there is so much going on that I must first question why the plane didn’t follow the mission plan? Were you changing modes so the flight was exiting AUTO mode? There seemed to be alot of mode changing going one.

In this first image below, the EKF Yaw reset here is normal after the IMU starts using GPS. This happens when you get enough satellites…usually on the ground.

The second yaw alignment was after you transitioned to forward flight. I don’t see any issue here. Depending on the settings, it can transition from using the compass to the GPS.

In the third image, I’m not sure why we keep getting yaw alignments. Is something drifting? Is it normal? Does it have something to do with not tracking the mission plan?

Finally, we have the mission plan (shown in grey with a white border) and the plane just seems to be flying manually (by pilot?) or trying to follow the mission but not succeeding.

So perhaps you can add some details about what was going on and if the yaw alignment messages were causing an issue or were they a result of an issue?

Cheers!

Hi Anthony,

Thanks for taking the time to respond. Agreed, we were worried about the internal (cube) compass being affected by the power electronic, especially the flight motor as this is close by. Unfortunately, the manufacturer has also placed the HERE+ module above the wiring powering the lift motors.

We have tried running the compasses in isolation and they perform roughly the same.

Our big problem is that this YAW misalignment occurs on the ground before the system is ARMED and any significant current passes to the motors. We often can’t arm the VTOL due to yaw misaliment.

Any thoughts on how this occurs?

Cheers,

Hi Greg,

Thanks for taking the time to look into this issue.

The system roughly follows the intended mission. The mission is developed using a surveying mission plan in Mission planner. This is just an ideal grid mission (grey with white borders). Our VTOL airframe is quite large at 330cm wingspan with a stall speed of around 23m/s. This causes a huge amount of overshoot from the intended mission. We flew this using AUTO from the start, I believe that we switched back to manual quad mode once we lost confidence in the tracking of the vehicle.

What gets me is the difference in the MAGZ direction between the two magnetometers. I believe that this is feeding into the EKF even when one of these is disabled.

I have the same issue, EKF Yaw drifts if its sitting on the ground for more than a few minutes. I then have to reboot the aircraft to get rid of the error an ARM. If i takeoff within a few minutes it works fine. I also have the issue with only GPS 1, Puck, enabled.

1 Like

Ok, it was probably just how it is displayed on Google Earth. I didn’t load the t-log into Mission Planner.

Is one of the compass locations lower than the other? It could be picking up more motor interference than the higher one. Compass height is your friend on a VTOL or Copter.

I’m probably using older firmware which is why I don’t see the issue. I am always very reluctant to update my firmware once I have a VTOL working well. You might try asking your question in the Arduplane 4.0 thread and see if others are having a similar issue. Perhaps it has been fixed on the latest version or you could try loading a slightly older firmware.

Good luck to you and Kyle!

We fly gas pipeline inspection missions and therefor need to change our take off and landing positions frequently. We noticed a strange phenomena at one of the locations which is almost what you described.

We guessed there must be iron in the ground, or maybe an old metal dump area, or anything else that could cause the misalignment.

The funny thing was that it only happened at that specific place.

Also, when we do our compass calibration, we make sure we are at least 15 to 20 meters away from any metals, buildings, etc to make sure the calibration is correct.

Greg is very good in interpreting log files and his observations and recommendations are very valuable.