How it works
The course becomes a multi-phase optimal control problem, one phase per leg: minimise the flight time (plus a comfort term as you move the slider) subject to the aircraft's dynamics, its bank, thrust, speed and climb limits, every no-fly zone, and passing through each ring in order.
It is transcribed by direct collocation into a sparse nonlinear program with a few thousand variables and solved with Ipopt, using exact derivatives from automatic differentiation, in our own toolchain ParestOCP. The aircraft here is a generic helicopter model; in our engineering work the same toolchain runs on flight-identified models.
Flight physics simplified. Coloured segments show where a limit is active: that is where the optimum is pressing against the aircraft's envelope.