PX4 Fixed Wing without GPS


I’m working on controlling a fixed wing with PX4 using external position estimation via vision-based estimation system “SVO” in SITL mode. I have 3 configurations for “EK2_AID_MASK”.

1. Only GPS enabled:
With this most basic configuration, I observe the performance of the SVO compared with local_position accuracy. And I achieved a status which I can follow GPS location closely and verify that visual position estimator is working correctly.

2. GPS + Vision Position Fusion:
This one is a bit tricky to test since GPS suppresses the visual position fusion probably. So I’m not sure if visual position is taking into count in the calculations in the first place or waits for GPS to fail. On top of that, I observed an abnormal outcome; when I takeoff using the GPS and disable it in mid-flight (hoping visual position will take control), fixed wing continued to fly like it still have access to GPS. It was still able to accept new way-points, follow them correctly and loiter around them flawlessly. I don’t know if this was an issue or a feature.

3. Only Visual Position:
This is where I get my problems. As soon as I disable the GPS using QGroundControl, fixed wing refuses to takeoff so I’m unable to fly using only vision position. I tested this configuration using rotary wing model “iris” and managed to fly without GPS since rotary wing can arm and elevate and move directly when switched to offboard mode. But its not the same with fixed wing because I need to call takeoff command between arm and offboard modes to elevate. And when I try to takeoff without GPS, I get “no home position” and “throttle is not zero” errors which I overcome with setting home location and adjusting thrust though mavros but still no takeoff.

So in simple terms, my questions are:

  • How can I configure the parameters to fly using only visual position or use GPS to takeoff and disable it afterwards?
  • GPS fail can occur in real scenarios so what is the fail-safe mechanism for PX4 and can I modify this feature for my purpose for my disabling GPS mid-flight scenario?
  • Is SITL mode GPS handling is different than the real life flights?
  • How did the fixed wing manage to fly after I disable the GPS?
  • What is the “EKF2_AID_MASK” workflow. Do sensors get priority during fusing? Is there a timeout for GPS to get discarded from calculation? Is vision position really fused or waited for other sensors to fail?

I’m aware this is a complicated scenario to use PX4 with fixed wings and the topic has already took a lot, hence I still might not covered all the details.

It would be much appreciated if anyone can at least answers some of my questions or comment their outcomes with similar situations. Hope others who are experiencing similar problems as I am find this topic useful.

Thanks in advance for any help,