CanaryGC: a browser-based GCS that runs on the vehicle's companion computer (ArduPilot / PX4 / INAV)

I’ve been building CanaryGC, a ground station with a different deployment model than Mission Planner or QGC. It runs on the companion computer (a Raspberry Pi in this case) alongside the autopilot and serves a web UI to any browser on the network. The companion talks MAVLink to the flight controller, so the “ground station” is any phone or laptop with a browser, including over a cellular link.

You might be wondering why one would want a GCS on the drone in the first place (See the repo README for a more detailed explanation). The TL;DR is basically user experience and control. Traditional GCS can be flaky over a VPN and specifically for missions that require extended range like EVLOS and BVLOS. In that case, if there were a network blip or a case of one LTE tower handing off to another, a link loss becomes a GCS failsafe event. With Canary the GCS is always connected to the flight controller so temporary blips don’t create a recovery event but instead represent a temporary loss of observability and because the GCS knows when an operator is connected, the operator can define the failsafe behavior in the event that the GCS loses a link to the operator for too long. And while serving a webpage from the drone is heavier compared to raw telemetry data, that is a cost that is really only paid with the first page load. After that, the page is cached in your browser then the only real network traffic is telemetry data.

On the ArduPilot side it auto-detects ArduPilot vs PX4 and encodes commands accordingly: arm/disarm, mode set, takeoff/land, RTL, GUIDED position nudges, mission upload, DO_SET_SERVO for a gripper/payload, and it writes the return parameters per airframe (RTL_ALT / ALT_HOLD_RTL, RTL_TYPE / RTL_AUTOLAND). Fixed-wing landing: if the plan has no Land item it synthesizes a DO_LAND_START approach placed clear of obstacles, terrain, and restricted airspace, uploads it, and flies it, otherwise it returns and loiters.

Before setting AUTO mode, a pre-flight pass validates the mission against geofence radius, min/max altitude, restricted airspace (hard block), controlled airspace (warn), LAANC ceilings, FAA obstacles, and buildings. Airspace comes from FAA (keyless, US), OpenAIP and Altitude Angel (keyed), plus just added keyless national drone-zone sources for Germany, Switzerland, and France.

There’s also a 3D map view with terrain and buidling heights, a one-click path optimizer that routes legs around hazards, survey, orbit, etc ,generators, QGC .plan and Mission Planner .waypoints import, gamepad MANUAL_CONTROL, ADS-B traffic, spoken callouts, SMTP alert emails, MAVLink signing. INAV flies native waypoint missions over MSP; Betaflight (no waypoint engine) flies by companion guidance from the station.

It runs in Docker on the companion. Repo and setup: GitHub - judahpaul16/canarygc: A web-based ground control station (GCS) for remote autopilot management via the MAVLink protocol. · GitHub . Feedback from this crowd is exactly what I’m after. Criticism welcome.

Very interesting project involving a web-based GCS. Why does the ‘server’ hardware (a Raspberry Pi, in your case) need to be on the aircraft? Wouldn’t it make more sense to have the server on the ground ( and the possibility of using hardware that is heavier and more powerful ?) MAVLINK telemetry with the aircraft would be sufficient.

Rolf

Hey Rolf, appreciate the interest. It really comes down to the link. In a traditional setup the thing that has to survive the distance to the aircraft is the MAVLink connection itself, either radio-to-radio, or MAVLink tunneled from a ground GCS to the autopilot over a VPN, and both can get fragile fast once you go beyond radio range. Putting the GCS on the vehicle means MAVLink never leaves the airframe (Pi to autopilot over serial or USB, rock solid), and the only thing that travels any distance is a normal network connection. So your range ends up bounded by network coverage instead of line-of-sight radio. Raspberry pi are more than enough for what the onboard side actually does so a more powerful box operated from the ground would be overkill in my opinion.

Now when it comes to a companion computer being in the flight stack, it’s not really anything new. The big BVLOS operators (Wing, Zipline, Amazon, and etc) all do it, and there are off the shelf kits like the XBStation 4G LTE BVLOS kit, which is a Raspberry Pi LTE HAT plus their Linux firmware, streaming MAVLink and video over 4G to an intermediary service (PilotApp in XBStation’s case) which you then connect to with your GCS. The difference is those are proprietary and really a transport layer, so you’re still running your actual GCS on the ground end. Canary puts the whole GCS on the aircraft itself. Open source, so you can just install it yourself and open it in a browser over whatever network the aircraft is on. Network traffic is basically only telem data since the first page load is cached in your browser. I’m not a BVLOS or EVLOS expert, I just hadn’t come across a clean, non-hacky approach. This basically gives you unlimited range as long as you have a network connection and it’s pretty much the same hardware but without the need to install an intermediate relay or a desktop GCS. Checkout [this section] of the repo README for a more detailed explanation.

Thank you for your detailed response. I think each option has its pros and cons, which are best evaluated by considering the specific use case. Having flown a lot of fixed-wing and VTOL aircraft using a 4G dongle and a Raspberry Pi, I have found that unfortunately 4G perform poorly in my flight region.

So, with today’s systems, such as the Caddx video system and mLRS as a very reliable bidirectional Mavlink radio link system, I can fly here fixed-wing aircraft and VTOLs over distances of a few kilometres (these systems have significantly greater ranges) more reliably than with 4G-network systems.

My reason for searching a web-based GCS is certainly very selfish — it simply stems from the fact that I want to test the large touchscreen (vivaldi browser) in my car.

Rolf

Interesting! I hadn’t heard of mLRS. Will definitely have to dig deeper into that. 143 km on 433 MHz is actually insane.