Flight stack

On this page 7

Everything from a planned route to a landed aircraft with a matching log.

ArduPilot or PX4

Both are mature, both fly agricultural multirotors every day, and the choice is mostly a licence decision.

ArduPilotPX4
LicenceGPL-3.0BSD-3
ConsequenceModifications shipped with the aircraft must be published. Unmodified use is finePermissive, including modifications you keep
Agricultural featuresSprayer support, mission tooling, precision landing, very matureModern architecture, strong companion computer integration
CommunityLarge, agricultural and survey heavyLarge, industry and research heavy

Pick PX4 if you expect to modify the flight code and keep it. Pick ArduPilot if you will run it unmodified, which most builds should. Do not fork either one to add a feature you can implement on the companion computer.

The layers

LayerWhat runsWhere
Flight controlArduPilot or PX4Pixhawk or Cube
CompanionMAVSDK or pymavlink over MAVLink 2Pi or Jetson
Ground controlQGroundControl, Mission Planner, or your ownLaptop or tablet
LinkMAVLink over 868 MHz telemetry, plus LTE for the record

MAVSDK (BSD) is the sane companion API: mission upload, telemetry subscription, offboard control, camera actions. Use it rather than parsing MAVLink by hand.

Mission planning per capability

The generic survey grid is only right for field mapping. Each capability wants a different pattern, and turning those into templates is the first real piece of in-house flight software.

CapabilityPatternNotes
Field mappingDouble grid, 75/65 overlap, terrain followingThe base layer
Weed controlSingle grid, low altitude, 60/40 overlap6 to 12 ha per battery
Disease, fertilisationSingle grid, 70/60, fixed heading and time of dayRepeatability beats coverage
PestThe same waypoints every flightComparability is the product
IrrigationGrid at solar noon, RGB alongside thermal for alignment
WildlifeSearch lanes, 20% side overlap, before sunriseCoverage proof matters more than image quality
YieldTransects at very low altitude, or obliques both sides of a row
LivestockFence line perimeter plus block sweep
SeedingTerrain-following swaths from the calibrated spread pattern

Terrain following is not optional on rolling ground. A constant barometric altitude over a 20 m slope changes ground resolution by a fifth across the field, which quietly breaks every per-square-metre count.

The pilot app

Whatever the ground station, an operator needs five things per flight, and they belong in your software rather than in a notebook:

  1. Preflight checklist, recorded and timestamped.
  2. Airspace and consent check, with the result stored.
  3. The mission, from the capability's template.
  4. The log, uploaded on landing, matched to the Mission row.
  5. The exceptions: aborted flights, weather calls, incidents.

That record is what the flight report and the coverage proof are built from, and it is what an authority or an insurer asks for after an incident.

Weather gating

InputSourceUse
ForecastDWD open data, ICON-D2Planning the day
NowcastDWD radarThe next two hours
On siteThe dock's own station, or a handheld anemometerThe go decision
Wind at altitudeModel output, and the aircraft's own estimateHigher than at head height, always

Gate on wind gust rather than mean, and record the figure with the decision. A missed flight report that says "weather cancelled, gust 12.4 m/s at 06:12" is a report a customer trusts.

Data offload

StepWhy
Card in, checksum, copy twiceA card that fails after the flight has lost the field
Match the flight log to the framesTrigger events to file names
Verify frame count against trigger countThe cheapest possible integrity check, and it catches a surprising number of problems
Only then wipe the card

Automate this. A script that ingests a card, verifies it, files it by farm, field and date, and creates the Mission row is an afternoon of work that prevents an entire category of lost mornings.

What not to build

  • A flight controller. ArduPilot and PX4 are a decade ahead of anything a small team will write, and they fly.
  • A MAVLink implementation. MAVSDK exists.
  • Your own RTK correction protocol. NTRIP is standard, universally supported, and free at the client end.
  • A ground control station, at first. QGroundControl covers everything until your routes become capability-specific templates, which is exactly the point where a small custom planner earns its place.