Skip to content

About

Readable Python for the physics behind RotorLab's Builder: hover, propulsion, fixed wing, balance, link budget.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

rotorlab-design-math: the hover, endurance, range and link-budget equations behind RotorLab's Builder, as readable Python

RotorLab design math

Version 1.0.0 License: Apache 2.0 Python 3.8+ Dependencies: none

The hover, endurance, range and link-budget equations behind RotorLab's aircraft Builder, as readable Python you can run, check and teach from.

  • Every equation named. Each function gives its equation, units, assumptions and source, from momentum theory to the two-ray radio model.
  • Agrees with RotorLab's public math page. Run on that page's worked inputs, it prints the figures the page shows.
  • Standard library only. Python 3.8 or newer, no account, no network, nothing to configure.
  • Worked examples you can run. A 5 inch quad, a fixed wing in cruise and a link budget at 2 km, each with a walkthrough and its real output.
  • Honest about its limits. First-order sizing estimates: a thrust stand and a flight test decide.

It covers multirotor, VTOL and fixed-wing sizing, propeller and motor performance, balance and center of gravity, and the radio link budget, for engineers who want to check a number, students who want to see a derivation run, and educators who want a reference implementation to teach from.

RotorLab's public math page writes out the equations behind its hover, endurance, range and radio-link figures and re-derives each one in the visitor's browser. This package implements those equations as a small Python library.

Get started: quick start | equations reference | guide | examples

Quick start

git clone https://github.com/RotorLabApp/rotorlab-design-math.git
cd rotorlab-design-math
python examples/quad_5inch_hover.py

The first lines it prints:

Air density                                 1.142 kg/m^3
All-up weight                                 610 g
Disc loading                                118.1 N/m^2
Ideal hover power                              43 W
Hover shaft power (FM 0.60)                 71.67 W
Hover electrical power                        101 W
Power loading                               6.043 g/W
Hover voltage under sag                     14.59 V
Hover current                               6.918 A
Motor current in hover                       4.86 A
ESC load in hover                           13.88 %
Pack energy                                  22.2 Wh
Hover endurance                             10.41 min

On Windows PowerShell the commands are the same, with Set-Location rotorlab-design-math in place of cd.

How it relates to the RotorLab Builder

This package is the math. The Builder adds what a single library cannot:

  • parts to build from: pick a frame, motors, propellers, a battery and a payload, or start from the guided wizard;
  • calibration from the aircraft's own hover, which replaces the assumed figure of merit and static thrust with values fitted to your airframe (needs the Live Telemetry add-on; included in Studio and the 14-day trial);
  • records: the design becomes the first page of the aircraft's record, with a frozen baseline and a dossier you can hand to a client.

This package gives you the equations. The Builder adds the parts, calibration from your aircraft's own hover, and the record that follows the aircraft. Estimates stay estimates: measured thrust-stand and flight data win.

Limits and assumptions

Read these before you rely on a number.

  • These are first-order, sizing-grade models. They are estimates, suited to sizing and planning. They are never a substitute for a thrust stand or a flight test, and measured thrust-stand and flight data always win.
  • RotorLab never certifies an aircraft. Neither this package nor the Builder approves, clears or certifies a design or a flight. A green number is not permission to fly.
  • Hover uses momentum theory with a figure of merit, not blade-element analysis. Forward flight holds the profile power constant and lumps body drag into one flat-plate area.
  • The static thrust coefficient is RotorLab's own empirical fit to published propeller data. It is an estimate; enter a measured thrust where you have one.
  • The assumed loaded RPM (77 percent of no-load) applies only when the motor's winding resistance is unknown. The bench data behind it does not include pack sag.
  • Endurance assumes still air and the pack's rated energy at nominal voltage.
  • Radio range excludes terrain, interference and multipath.
  • Inputs must be finite numbers; the main entry points refuse NaN and infinity with a ValueError.
  • The worked examples' inputs are illustrations. Replace them with your own build's measured figures.

See it in RotorLab

The same equations, re-derived in your browser on RotorLab's public math page. Each card prints its equation, the worked line and whether the engine agrees:

One card from RotorLab's public math page: temperature, pressure and density, with the standard-atmosphere equations, their constants, the worked line giving 1.1689 kg/m3 and a badge saying it matches the engine, and its reference

In the Builder, the same figures size a real aircraft. This is the Builder's summary for a fictional demo quad on a local test install:

The RotorLab Builder summary for a demo quad: all-up weight 5.24 lb, hover thrust-to-weight 2.21 marked comfortable, hover endurance 25.4 min and power loading 0.20 oz/W, above the bus current, full-throttle current, top speed, disc loading, pack energy, hover throttle and air density

What the examples show

Hover power against all-up weight for the 5 inch quad: ideal, shaft and electrical power Total static thrust against throttle for the 5 inch quad, crossing its weight near 40 percent throttle
Shaft power required against airspeed for the fixed wing, with its induced and parasite parts Link margin against distance for the 2.4 GHz link, 17.4 dB at 2 km

The figures are drawn from the package itself by docs/make_figures.py.

Install

Python 3.8 or newer, standard library only. From a clone:

pip install .

or use it in place by putting the repository root on your path.

Modules

Module What it covers
atmosphere ISA pressure, density at a measured temperature (density altitude), speed of sound
hover Actuator-disc momentum theory, figure of merit, coaxial penalty and thrust share, disc and power loading, prop clearance, calibration by inversion
propeller Static C_T and C_P, static thrust, pitch speed, tip Mach, thrust lapse with airspeed
motor Drela's first-order DC motor, drive losses, the full-throttle operating point with pack sag
battery Pack energy, voltage under load, endurance with internal heating, full-throttle sag, regulated rails
multirotor Thrust-to-weight, throttle, full-throttle power, the forward-flight power curve, lean into wind
fixedwing Wing and drag polar, stall, cruise speeds, top speed, rate of climb, VTOL transition
balance Center of gravity, what a CG offset costs in hover, CG as a percentage of mean chord
rflink Link budget, Friis free-space loss, two-ray ground reflection, horizon, Fresnel zone

A first look

from rotorlab_design_math import atmosphere, hover

rho = atmosphere.air_density(altitude_m=250, temp_c=20)       # 1.1689 kg/m^3
weight_n = 1.930 * 9.80665                                    # a 1,930 g quad
p_ideal = hover.ideal_power(weight_n, rho, hover.disc_area(7.0), 4)
p_shaft = hover.shaft_power(p_ideal, figure_of_merit=0.65)
print(round(p_ideal, 1), round(p_shaft, 1))                   # 170.9 262.9

Examples

Each example is a script that prints its results, with a walkthrough that derives each step.

Script Walkthrough What it shows
examples/quad_5inch_hover.py 5 inch quad hover Hover power, endurance, full throttle, forward flight
examples/fixed_wing_cruise.py Fixed-wing cruise Stall, best endurance and range, top speed, climb, CG on the wing
examples/link_budget_2km.py Link budget at 2 km Margin at a distance, usable range and what limits it
examples/validation_page_quad.py Math page quad The multirotor worked example from RotorLab's public math page, line by line
python examples/quad_5inch_hover.py

Tests

python -m unittest discover -s tests -t .
$ python -m unittest discover -s tests -t .
............................................................................
----------------------------------------------------------------------
Ran 76 tests in 0.013s

OK

Each test checks a function against a value worked by hand (or against an identity the equation must satisfy). pytest also runs them. Release 1.0.0 was tested on Python 3.14 and 3.13 on Windows 11; see the compatibility table.

References

  1. Leishman, J. G. Principles of Helicopter Aerodynamics, 2nd ed. Cambridge University Press, 2006. Momentum theory for hover and forward flight.
  2. U.S. Standard Atmosphere, 1976. NOAA, NASA and USAF.
  3. Anderson, J. D. Fundamentals of Aerodynamics. McGraw-Hill. Lift, the drag polar, stall, power required and rate of climb.
  4. McCormick, B. W. Aerodynamics, Aeronautics, and Flight Mechanics. Propeller thrust and power coefficient forms.
  5. Brandt, J. B. and Selig, M. S. UIUC Propeller Data Site, volume 1. Static and advance-ratio propeller tests.
  6. DJI, E800 tuned propulsion system specifications.
  7. T-Motor published propeller and motor bench tests.
  8. Cameron et al., Journal of Aircraft, DOI 10.2514/1.C033442. Coaxial rotor interference.
  9. Drela, M. First-Order DC Electric Motor Model. MIT, 2007.

Documentation

License

Apache License 2.0. See LICENSE and NOTICE. Copyright 2026 RotorLab, Inc.


RotorLab | Design | Education | Academy | Docs | Contact | Security

RotorLab, Inc., Dubuque, Iowa. Licensed under the Apache License 2.0. RotorLab records, reminds and warns; it never authorizes a flight.

About

Readable Python for the physics behind RotorLab's Builder: hover, propulsion, fixed wing, balance, link budget.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages