workshop private

← all creations

Full Lock

mechanics · created 2026-09-23

Reversing a trailer, where the wheel on the stop stops being a fix at 38.2° on a 7-foot box and never stops being one on a 48-ft semi — same driver, same hands, and the difference is four numbers about the rig that nobody is allowed to change mid-manoeuvre.

physicsgame-feelsimulationcanvas

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.

rigreverse radiussteerholds γerror e-folds everyL2
utility8 m23.0°23.24°2.15 m2.1
utility20 m9.6°9.31°2.11 m2.1
utility40 m4.9°4.65°2.10 m2.1
boat20 m9.6°16.57°4.72 m4.6
boat40 m4.9°8.25°4.63 m4.6
semi8 mno balance point8.2
semi20 m11.0°22.62°8.99 m8.2
semi40 m5.6°11.04°8.38 m8.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.

rigL1L2hδmaxsupplyγcritfolds at
utility trailer3.42.1+1.1535°0.43238.212°90°, folded
boat trailer3.44.6+1.1535°0.94780.521°90°, folded
48-ft semi3.98.2−0.5532°1.314none74.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°:

fromreverse travelcab heading swings
10°0.34 m
20°1.27 m15°
30°2.99 m35°
34°4.46 m53°
36°5.90 m70°
37°7.25 m86°
38°11.17 m132°
38.2°17.68 m209°
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.

rigfrom 20°from 40°from 70°
utility2.93 m4.45 m5.83 m
boat6.42 m9.75 m12.76 m
semi11.45 m17.39 m22.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:

rigruns out atdistanceat reverse speedwith only 6 m of yard behind
utility38.2°, steering5.43 m3.2 s5.30 m (3.1 s)
boat80.5°, steering16.00 m9.4 s13.35 m (7.9 s)
semi74.6°, cab27.65 m18.4 s21.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:

pilotutilityboatsemi
reversing only, never pulls forward24/40 (20.9 m)40/40 (31.1 m)40/40 (60.9 m)
allowed to pull forward when wedged40/40 (22.9 m)40/4040/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

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.