Loading…
CLICK
…
temporary · drag to taste · click anywhere to fire click effect
layout · text + zoom
GLOBAL · whole page
…
Luc Desautels
// RESEARCH · MATH AA IA · INTERACTIVE MODEL

The search spiral.

A maritime rescue drone has to search the most likely water first, while the water itself drifts, the wind pushes it sideways, and the battery counts down. This is the model from my Math IA — an Archimedean spiral re-parametrised so the drone holds a constant airspeed — running live. Drag sliders, pick a scenario, scrub the timeline.

The math ↓
STANDBY On the pad
T+00:00
HDG000
BANK 0° PITCH 0° CRAB 0°
100%
reserveRTH needsearch budget
Flight left
—
RTH needs
—
Search left
—
Lands with
—
Still to cover
—
AS
—
GS
—
TRK
—
POD
—
ALT
—
WIND H/X
—
HOME
—
DATUM
—
SEARCHED
—
Drag ⌂ home or ◇ LKP to move them · scroll to zoom · drag to pan · double-click to reset
00:00 / 00:00
Standby Intercept Spiral search Return to home
// THE MODEL, IN FIVE LINES

From a spiral to a flight plan

01

An Archimedean spiral, pitched by the camera

Arms 2Rs apart leave no gaps and no overlap, so the pitch is fixed by the scan radius.

r(θ)=r0+Rsπθ
02

Centred on a drifting datum

The survivor moves with the water, so the spiral does too.

P(t)=C0+vct+r(θ)[cosθsinθ]
03

Hold the airspeed constant

The drone's speed through the air is fixed, whatever the wind and current are doing.

‖θ′w(θ)+veff‖=U,veff=vc−vwind
04

…which is a quadratic in θ′

Take the + root. Because |veff| < U makes AC < 0, √Δ > |B|: it is always the positive one.

θ′=−B+B2−4AC2A A=r2+b2,B=2w·veff,C=‖veff‖2−U2
05

Straight legs: intercept & return

Out to the moving spiral start S(t) and back home, each at airspeed U. Smallest positive τ of:

‖D+vrelτ‖=Uτ⇒τ=D·vrel+(D·vrel)2+(U2−‖vrel‖2)‖D‖2U2−‖vrel‖2
06

The battery decides when the spiral ends

Rather than solving T = (t₁ − tdelay) + (t₂ − t₁) + (t₃ − t₂) for θ(t₂) after the fact, the simulation checks it live: the drone leaves the spiral the instant elapsed flight time + RTH time from here reaches the usable endurance. That's exactly an autopilot's battery “bingo” — and it lands with the reserve you set, to the second.

Refinements since the submitted paper
  • Straight legs. The paper wrote the intercept and return times as a vector divided by a vector, (C₀ + vct₁ − H)/(vair + vwind). Here each leg is the interception quadratic above (closed form), which also gives the heading to hold.
  • Aim point. The intercept targets the spiral's first point C(t₁) + (r₀, 0), not the datum itself — it only matters when r₀ ≠ 0.
  • Root choice. Choosing the + root isn't just “realistic”: whenever |veff| < U it is provably the only positive root. When |veff| ≥ U no constant-airspeed spiral exists — the model now says so.
  • Autonomous ODE. θ′ depends on θ alone, so t(θ) is a plain integral ∫dθ/θ′(θ). No special ODE solver is needed; RK4 is used here only for even time-sampling.
  • Appendix code. The Streamlit prototype integrated θ′ = U/√(r² + b²) (the still-air formula) with the current bolted on afterwards, so its airspeed wasn't actually constant; its spiral was also centred vc·t₁ behind the datum. This page integrates the full quadratic.
  • w(θ). In §4.2 the line w(θ) = r′(θ)² + r(θ)·θ′ is a typo for the vector w(θ) = [r′cosθ − r sinθ, r′sinθ + r cosθ], with ‖w‖² = r² + r′². A(θ) was already right.