Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MJKPhysics

MJKPhysics is a six-degree-of-freedom flight dynamics engine for small unmanned aircraft, written in Rust and rendered in the browser. This book is its engineering record. For every physical model it gives the equations, the assumptions behind them, the range where they hold, the sources of every parameter, and how the implementation was checked.

Status: pre-alpha. Milestone M0, the foundations, is complete: the workspace and its layering, CI with the engineering standards enforced, this book, and the error and configuration model. Milestone M1, the math and rigid-body core, is complete: frame-typed math, the SO(3) maps, rigid-body dynamics, the integrators including the Lie-group method, the world loop, determinism and replay, gravity and the standard atmosphere, the analytic validation suite and the command-line tool. Milestone M2, the multirotor, is under way: the airframe format and the motor and ESC model are done, and the battery model (#20) is next. The book grows with the roadmap; pages for models that don’t exist yet are listed with the issue that will add them.

How the book is organized

  • Foundations. Conventions and notation fixes frames, rotation conventions, signs, units and symbols; everything else uses them. Architecture describes the crates, their layering and the rules the engine follows.
  • Physics. Models has one page per physical model. Validation collects the evidence that each model is implemented correctly. Airframes documents the four modeled aircraft and the source of every parameter.
  • Project. Decision records explain significant design choices and the alternatives that were rejected. Engineering standards gives the rules the code follows, how CI enforces each one, and how the tests themselves are tested. Writing documentation covers the house style for pages, equations and citations.

Equations and citations

Display equations carry stable IDs such as (CONV-3), and each one has an anchor: this book links to it as conventions.html#eq-CONV-3. Code cites equations in comments as // Eq. (CONV-3), and cargo xtask equations fails if a citation points to an equation that doesn’t exist, or if two equations share an ID.

Building the book locally

cargo install mdbook --version 0.5.4 --locked
mdbook serve docs --open