Back the trailer onto the dock. The wheel does the opposite of what you want
about half the time, and somewhere in the middle of the manoeuvre there is an
angle past which turning the wheel all the way to the stop — in the correct
direction, held there — makes the angle worse. That angle is not a
difficulty setting. It is arcsin-something of four measurements of the truck.
The one line it all comes from
A tractor on the bicycle model with one trailer hung off it. Write γ for the
articulation angle — how far the trailer is rotated relative to the cab — and
the whole model is one scalar ODE, per metre of travel:
γ̇ = v · [ (tan δ / L1) · (1 + (h/L2)·cos γ) − sin γ / L2 ]
^ what the steering box supplies ^ the jackknife
L1 is the wheelbase, L2 the coupling-to-trailer-axle length, h the
coupling’s overhang behind the rear axle (negative for a semi, whose fifth
wheel sits ahead of the drive axle), δ the steer angle, v signed speed.
It falls out in three lines: the coupling is a point rigidly attached to the
tractor, so its velocity is the rear axle’s plus ω × r; the trailer axle
cannot slide sideways, so only the component of the coupling’s velocity normal
to the drawbar rotates the trailer. Project, divide by L2, subtract from
θ̇1.
I did not trust the h term — the sign of it decides the whole piece — so
scripts/measure.mjs checks the closed form against a positional
integration that shares none of its algebra: move the coupling along its exact
arc, slide the trailer axle along its own heading by the projection of that
motion, re-read the angle off the drawbar. Over three to four metres of travel
they agree to about 1e-4 degrees, on every rig, forwards and back.
The second term has no steering in it
That is the whole thing. sin γ / L2 carries no δ, and when v < 0 it
carries the sign that grows. Reversing dead straight is not a stable state;
it is a state you are falling out of. Linearise about any equilibrium and
∂γ̇/∂γ = cos γ / L2 + (tan δ / L1)·(h/L2)·sin γ > 0 below 90°
— positive everywhere, so every balance point in reverse is a knife edge.
The reciprocal is a length: the distance of reversing in which an error
multiplies by e. In the straight-back limit it collapses to exactly 1/L2.
The length scale over which a trailer amplifies your mistakes is its own length. A 2.1 m drawbar doubles whatever you are carrying every 1.46 m.
| rig | reverse radius | steer | holds γ | error e-folds every | L2 |
|---|---|---|---|---|---|
| utility | 8 m | 23.0° | 23.24° | 2.15 m | 2.1 |
| utility | 20 m | 9.6° | 9.31° | 2.11 m | 2.1 |
| utility | 40 m | 4.9° | 4.65° | 2.10 m | 2.1 |
| boat | 20 m | 9.6° | 16.57° | 4.72 m | 4.6 |
| boat | 40 m | 4.9° | 8.25° | 4.63 m | 4.6 |
| semi | 8 m | — | no balance point | — | 8.2 |
| semi | 20 m | 11.0° | 22.62° | 8.99 m | 8.2 |
| semi | 40 m | 5.6° | 11.04° | 8.38 m | 8.2 |
Notice how little the radius matters and how much the trailer does. That is the honest answer to “why is the little one so much harder” — not the boundary angle, which comes next. The clock.
The number the piece is named after
Set γ̇ = 0 and ask what the wheel would have to do. Reversing, full opposite
lock reduces γ only while
sin γ / (1 + (h/L2)·cos γ) < L2 · tan δmax / L1
^ what the geometry demands ^ everything the steering box has
The left side climbs with γ. The right side is a constant. So either
they cross — and the crossing is a point of no return that no input can undo —
or they never do, and the rig is recoverable from any angle short of folded.
| rig | L1 | L2 | h | δmax | supply | γcrit | folds at |
|---|---|---|---|---|---|---|---|
| utility trailer | 3.4 | 2.1 | +1.15 | 35° | 0.432 | 38.212° | 90°, folded |
| boat trailer | 3.4 | 4.6 | +1.15 | 35° | 0.947 | 80.521° | 90°, folded |
| 48-ft semi | 3.9 | 8.2 | −0.55 | 32° | 1.314 | none | 74.6°, cab |
Closed form against a scan of the simulation itself: they agree to 7e-10
degrees. The semi’s supply is 1.314 and the demand never exceeds 1, so the
inequality simply never binds — a 48-ft trailer can be steered back from
anything, and the only thing that ends it is the trailer reaching the sleeper,
which the rectangles say happens at 74.6° (1.15 m of kingpin-to-cab clearance,
a 1.31 m swing radius — measured off the bodies, not declared).
The pickup rigs never reach their cab at all: a 1.5 m box swings straight past a 2.0 m tailgate and ends up alongside the truck, so their limit is the 90° fold, where the drawbar comes abeam of the trailer axle and the rig is finished whether or not any metal has touched.
The tiny trailer everybody owns has a quarter of the semi’s margin. The one you are trusted with after a written test.
Where runs actually end, which is not at 38.2°
Being inside the boundary is not the same as being able to afford it. Here is what “recoverable” costs on the utility trailer — reversing at full lock until the angle is back under 5°:
| from | reverse travel | cab heading swings |
|---|---|---|
| 10° | 0.34 m | 4° |
| 20° | 1.27 m | 15° |
| 30° | 2.99 m | 35° |
| 34° | 4.46 m | 53° |
| 36° | 5.90 m | 70° |
| 37° | 7.25 m | 86° |
| 38° | 11.17 m | 132° |
| 38.2° | 17.68 m | 209° |
| 38.3° | never |
It does not go off a cliff at the boundary; it goes off a cliff several degrees
before it, because the cost diverges. At 37° the maths says recoverable and
the answer is seven metres of reversing and the cab swinging through 86° — a
quarter turn of the whole rig, in a yard that may not have seven metres left
behind the trailer. So the demo puts the two numbers side by side, unwind at lock and clear behind, and turns them amber when the first exceeds the
second. That pair, not the boundary, is what ends runs.
The other consequence of the same sign flip: forward motion is stable, so pulling forward straightens the thing for free, always, at any angle.
| rig | from 20° | from 40° | from 70° |
|---|---|---|---|
| utility | 2.93 m | 4.45 m | 5.83 m |
| boat | 6.42 m | 9.75 m | 12.76 m |
| semi | 11.45 m | 17.39 m | 22.75 m |
How long you have before any of this is your problem
Reversing straight with 3° of articulation you have not noticed yet, wheel centred, no input at all:
| rig | runs out at | distance | at reverse speed | with only 6 m of yard behind |
|---|---|---|---|---|
| utility | 38.2°, steering | 5.43 m | 3.2 s | 5.30 m (3.1 s) |
| boat | 80.5°, steering | 16.00 m | 9.4 s | 13.35 m (7.9 s) |
| semi | 74.6°, cab | 27.65 m | 18.4 s | 21.54 m (14.4 s) |
Three seconds, on a trailer you can lift the tongue of by hand. Nothing looks wrong for the first two of them, because 3° looks like zero and 20° looks like a trailer that is following you.
The autopilot, and the move that separates the rigs
dockPilot() in src/ is pure pursuit onto the bay centreline, run on the
trailer and in the direction the trailer is actually travelling — which when
reversing is against its own heading. A trailer’s path curvature is
−tan γ / L2, straight out of the same ODE, so a demanded curvature converts
into a demanded articulation with no tuning in between. The inner loop is the
part worth reading: the steer command is holdSteer(γ) — the balance point for
the angle it is actually at — plus a correction. Feedforward on an unstable
equilibrium is not a refinement, it is the only way to sit anywhere but zero.
Forty runs per rig from a jittered staging position, identical gains:
| pilot | utility | boat | semi |
|---|---|---|---|
| reversing only, never pulls forward | 24/40 (20.9 m) | 40/40 (31.1 m) | 40/40 (60.9 m) |
| allowed to pull forward when wedged | 40/40 (22.9 m) | 40/40 | 40/40 |
One extra move, available at all times, costing on average two metres of extra reversing and half a pull-forward per run, takes the small trailer from 60% to 100% and does nothing whatever for the other two — because they were never the ones that needed it. The cheapest thing in the yard is the move that admits you were wrong, and it is only cheap on the rig where it is mandatory.
The gauge is the rig
The arc is drawn on the coupling at the drawbar’s own radius: green across every articulation full lock can still undo, red past the boundary, and the drawbar is the needle. Nothing to read off to one side and map back onto the thing you are steering. There is a second mark, in blue — the angle your current wheel position holds — and the whole feel of reversing a trailer is in the fact that the needle is repelled by it and never drawn to it.
What is physics here and what isn’t
- Derived: the ODE, both terms, and the sign of the overhang term;
γcrit; the instability of every reverse equilibrium; the1/L2e-fold; the unwind and straighten distances; the trailer-path curvature the autopilot inverts; the fold angles, scanned off the actual rectangles. The staging position and both yard dimensions are derived too — the turn walks the trailer one radius west and the same north, andmeasure.mjsasserts the inequalities that follow. - A modelling choice: no tyre slip, no load transfer, no jackknife under braking, which is a friction phenomenon and a different piece entirely. This is the kinematic model — rolling without slipping, which at yard speeds is what actually happens.
- A game, not a claim: the wheel’s rate (93°/s, hand-over-hand), the acceleration, and the fact that hitting a wall stops you instead of ending the run.
- Deliberately not self-centring: the wheel stays where you put it. A wheel that crept back to centre would be inventing a difficulty the geometry already has plenty of.
Reuse
src/full-lock.mjs is framework-free and has no canvas in it. createRig()
gives you step(dt, {steer, throttle}, blocked), bodies(), axle(),
recoverable() and unwind(); criticalAngle(), holdAngle(),
holdSteer(), efoldLength(), unwindDistance(), straightenDistance() and
foldAngle() are the analysis, all pure functions of a rig spec. buildYard()
and docked() are the scenario, and dockPilot() drives it. Integration is
RK4 on (θ1, γ) substepped every 5 cm — the articulation e-folds over a couple
of metres, so a per-frame step at full lock is visibly wrong — with the tractor
position advanced along its exact arc and the trailer’s pose derived from the
linkage rather than integrated, so it cannot drift.
The demo is demo/index.html with its own copy of the module (ADR-0002),
keyboard and a drag-stick both, and a window.__demo hook the screenshot rig
drives. node scripts/measure.mjs prints every table above and fails if any of
them stops being true; node scripts/screenshot-demo.mjs regenerates the thumb
and media and doubles as the smoke test — it checks in a real browser that
reversing with the wheel left swings the trailer left and the cab right,
that full lock past 38.2° makes the angle worse, that full lock inside it makes
it better, and that all three rigs still dock under their own autopilot.




