Flight Mechanics & Aircraft Structures — Installation
What You're Setting Up
Overview's restoring-moment calculation (τ = r × F) is closed-form and hand-calculable. This section sets up a Python environment for stability-moment and static-margin calculations, plus OpenVSP — NASA's free, open-source parametric aircraft design tool, whose VSPAERO analysis module computes real stability derivatives for an actual 3D aircraft geometry, going well beyond this guide's simplified scalar-torque examples.
Install Python
Verify Your Setup — Recompute Overview's Restoring Moment
This reproduces Overview's worked example (F = 400 N extra tail force, r = 6 m moment arm) in Python.
A Second Check — Static Margin
A genuinely new calculation: static margin is the standard way real aircraft stability is quantified — the distance between the CG and the neutral point, expressed as a fraction (or percentage) of the mean aerodynamic chord (MAC).
Install OpenVSP for Real Aircraft Stability Analysis
OpenVSP is NASA's open-source parametric aircraft geometry tool; its VSPAERO module runs vortex-lattice/panel-method aerodynamic analysis and outputs real stability derivatives for an actual 3D aircraft model, rather than the simplified scalar-force examples used throughout this guide.
(needs verification — recheck against current source: OpenVSP release/build details change; confirm current download and build instructions directly at github.com/nasa/OpenVSP before relying on a specific version or install path.)
Verify Everything Works
Common Setup Issues
Static margin comes out negative when a stable design was expected
Double-check whether the neutral point and CG fractions are being subtracted in the right order — static margin is neutral-point-fraction MINUS CG-fraction (x_np - x_cg), not the reverse; swapping the order flips the sign and can make a genuinely stable configuration appear unstable in the calculation, even though the underlying design is fine.
OpenVSP's VSPAERO analysis fails to converge or produces unrealistic stability derivatives
Confirm the aircraft geometry model doesn't have obvious modeling errors first (disconnected surfaces, degenerate geometry) — VSPAERO's panel-method solver is sensitive to clean input geometry, and a convergence failure is more often a geometry problem than a genuine physical instability in the design being modeled.
What's Set Up
Next Steps
Go to the Fundamentals section to continue building on the static-stability framework established here.

