Software · Aerospace

DBF flight tools

Three single-file tools I wrote for our UAV: autopilot setup for the Pixhawk, a mass and balance solver, and a wiring diagram editor. Each opens by double-clicking, with no install and no internet.

Why tools and not spreadsheets

The aircraft has a V-tail, a Pixhawk autopilot and a battery that slides in the nose. Every one of those needs the same few calculations again whenever the design changes.

So the calculations live in tools that read the numbers from the CAD, show where each number comes from, and leave a field empty when nothing is known. Nothing is guessed.

Autopilot setup

Turns the V-tail geometry and the servo linkage into ArduPilot parameters you can load in Mission Planner.

Autopilot setup tool: V-tail geometry, servo linkage, Pixhawk outputs and the generated parameter text
The autopilot setup tool. Blue fields come from the CAD.
Maths
V-tail mixing

Panel angle from the CAD (34.7°), pitch and yaw authority, and the left and right panel deflection for any pitch and yaw command.

Output
A .param file

Servo functions, directions and PWM limits are written as a file for Mission Planner. A loaded Pixhawk parameter file can be checked against it.

Safety
ArduPilot mixes, not the radio

The tool warns that the V-tail mix is done in ArduPilot (functions 79 and 80), so the transmitter must not mix as well, and to bench test with the propeller off.

Mass and balance

Works out whether the aircraft balances, and where each movable part is allowed to sit.

Every part has a mass and a front-edge position. The tool gives the centre of gravity loaded and empty against the allowed range from the neutral point, and draws a side view of the fuselage with the door and hatch openings.

Mass and balance tool with a parts table, a result check and a fuselage side view
Parts table, result check and the fuselage side view with the door openings.
Solver
Tries every order

For the movable parts it tries all 720 orders in the fuselage and lists the best five by margin, checking that each part also fits through its access opening.

Checks
Ballast and the real aircraft

It says how much ballast is needed and where if the layout does not fit, and compares the result with the measured balance point of the finished aircraft.

Honest
Warns, does not hide

When data is missing or no layout fits, it says so in red instead of showing a good-looking number.

Wiring diagram editor

A schematic editor for the aircraft wiring, with parts, wires and a mass budget.

Click one pin and then another to run a wire. It draws the sheet, builds the wire list and bill of materials on a second sheet, and checks the total mass against the 4 kg budget. The aircraft diagram holds 16 parts and 21 wires, at 1306 g of a 1500 g mass budget.

Wiring editor showing the schematic of the UAV: battery, power module, ESC, motor, Pixhawk, receiver and servos
The wiring editor with the aircraft diagram, revision C: power chain, Pixhawk, receiver, GPS and the four servos.
Sheets
Schematic and wire list

Sheet 1 is the schematic. Sheet 2 is the wire list with gauge and length, and the bill of materials.

Export
SVG, PNG, PDF, CSV

Prints a two-sheet PDF with a title block, and exports the wires and parts as CSV or the drawing as an image.

Checks
Mass and errors

Totals the mass of parts and estimated wire against the budget and flags errors and warnings as you draw.

How they are built

Each tool is one HTML file with the maths in plain JavaScript, so it works offline at the airfield.

The autopilot tool also has a Python version with the same formulas and tests that compare them against hand calculations. The CAD numbers come from a script that reads the aircraft assembly. A hub page opens all three tools in tabs.

The aircraft
UAV detail design
View project →
Next project
Master dashboard
View project →