Longitude: the sky gives you latitude free and charges everything for the other one

I built sight reduction from scratch and recovered a ship to a hundredth of a mile. Then the famous 25% rule about navigational error turned out to be the one point where the shape of your fix does not matter.

Finding out where the sky is, given where you are and what time it is, is the problem I had already built machinery for. This is the inverse: where are you, given only what the sky looks like?

For most of history nobody could answer that at sea in the east-west direction, and it killed people in numbers. In 1707 a British fleet coming home from Gibraltar put itself onto the rocks of the Isles of Scilly in the dark, and the dead ran into the high hundreds or the low thousands depending on whose count you take. Parliament answered in 1714 with a tiered prize: £10,000 for a method good to one degree of longitude, £15,000 for two thirds of a degree, £20,000 for half, to be proven on a voyage to the West Indies.

Two solutions then raced each other for fifty years. Carry the time with you, or read it off the sky.

The gates, and one of them is not the number everyone knows

Before anything, the machinery has to close. My ephemeris reproduces a sky I had independently verified on an earlier night. A body’s geographic position, the point on Earth it stands directly over, checks to one part in 10¹⁶. And the inverse problem itself closes: given perfect sights and a starting guess 280 nautical miles wrong, the sight reduction puts the ship back to 0.00 nautical miles.

Then the one worth pausing on. Longitude is time, and everyone knows the exchange rate is fifteen degrees per hour. For a star sight, it is not.

Stars keep sidereal time. They go round in 23 hours 56 minutes and 4 seconds, so they sweep 15.04107 degrees per hour of ordinary clock time, and my end-to-end fix displaces by exactly that against an exact sidereal rate agreeing to eight decimal places.

The familiar fifteen belongs to the mean Sun, and it is an average by construction. Sampled daily across a year, the Sun’s own rate comes out to 15.00000 degrees per hour on average and ranges from 14.9948 to 15.0037. It is never exactly fifteen on any particular day. That wander is the equation of time, and it is why a sundial disagrees with a clock.

The cocked hat, where my prediction was wrong and the wrongness was the point

Three star sights give three lines of position, and because every sight carries error they never meet at a point. They make a small triangle instead, called the cocked hat, and the received number, printed in the Admiralty Manual of Navigation, is that the true position lies inside it only about 25% of the time.

I wrote down a prediction before any code ran: that the quarter is not universal, that it would be a quarter for widely spread bearings and an eighth for bunched ones, and that the one-line rule was smoothing over a real dependence on geometry. My reasoning was that three lines cut the plane into seven regions, so one of the eight sign-patterns has nowhere to live.

Two panels of three intersecting lines forming a small triangle, one with the bearings widely spread and one with them bunched, with the true position marked.
Three star sights give three lines of position that never meet at a point. The received wisdom is that the truth lies inside the little triangle a quarter of the time, and it does, for every geometry, and only because the errors are as likely to be positive as negative.

It is a quarter for every geometry. Exactly two of the eight sign patterns contain the truth, in all 600 geometries I tested, spread and bunched alike, and the set never changes when the error magnitudes change either.

The reasoning was wrong in a way worth naming, because it is a specific confusion and not just a bad guess. Three lines do cut the plane into seven regions, and one sign-vector describing a point’s position relative to three fixed lines is indeed unrealisable. But that is a different object. Here the eight sign-vectors belong to the errors, and each one produces a different triangle. The question is whether one fixed point lies inside that triangle. I had conflated a partition of the plane with a family of triangles.

What is actually true is forced by a symmetry. Negate all three errors and you reflect the whole configuration through the true position, which maps the triangle onto its own point-reflection, which cannot change whether the point is inside it. So the eight patterns come in four antipodal pairs, containment is constant on each pair, and the count has to be even. Measured, it is always exactly two: one antipodal pair.

Which gives the exact statement. The probability of being inside is the probability of one sign pattern plus the probability of its opposite, for a single pair fixed by the geometry.

And it is a fact about coins, not sextants. Since only the signs are read, the shape of the error distribution is irrelevant. Unbiased Gaussian, Cauchy, uniform and a wildly lopsided mixture with median zero all return the same answer: 0.2495, 0.2477, 0.2513, 0.2533.

Where the geometry actually hides

The same run turned up something I had not predicted either, and it is better than what I was looking for.

Give all three sights one common bias instead of independent errors, which is exactly what a sextant index error or a wrong height of eye produces, and containment becomes 1.0000 for spread bearings and 0.0000 for bunched ones. Total geometry dependence, and a switch rather than a trend.

Two hundred and sixty fixes of the same ship, same stars, same size of error. The only difference is whether the three sights err independently or all in the same direction.

Those have to be one fact at two values of one parameter. Let each sight’s error be positive with probability p, independently, and let the containing pattern have k plus signs in it. Then the probability of being inside is

p^k (1−p)^(3−k) + p^(3−k) (1−p)^k

which is a quarter at p = 1/2 for every value of k, and which diverges the instant p leaves a half, in a way that depends entirely on k. So k is where the geometry lives, and it classifies perfectly: spread bearings give k = 3, in 300 of 300 cases; bunched bearings give k = 2, in 300 of 300. Monte Carlo against the closed form across the whole range of p has a worst deviation of 0.0066.

The spread-versus-bunched split is not a category I invented, either. Sweeping one bearing while the other two stay fixed, k flips at exactly the two places where the largest gap between bearings crosses 180 degrees, measured at 180.25 and 280.25 on a quarter-degree grid. And the exactly-two result survives geometries where two bearings are a hundredth of a degree apart, across a thousand near-degenerate cases, with no exceptions.

So the famous 25% is the single point on a whole family of curves where the shape of your fix does not matter. Take a modest real bias, errors positive 70% of the time rather than 50%, and spread bearings put you inside 0.370 of the time against 0.210 for bunched, a factor of 1.76. And real sights are biased: index error, dip, refraction from tables that are never exactly right. The navigator’s intuition that bearing spread ought to matter was correct all along. It is invisible at precisely the one point the textbook quotes.

The Moon as a clock

The rival method needed no clock at all. The Moon moves against the fixed stars at about half a degree an hour, roughly its own diameter, so the angle between the Moon and a star is a clock face that every ship already carries. Measure that angle, look up when the angle had that value at Greenwich, and you know the time in Greenwich without owning a watch.

The whole character of the method is one number: how much a shaky hand costs in miles.

And there is a number this folder deliberately does not report. The obvious summary is the worst amplification a star ever reaches, and it is meaningless. The Moon-star distance is a smooth periodic function of time, so it has a maximum and a minimum, and at both of those the rate passes through zero. The clock stops, twice a sidereal month, for every star in the sky, and the amplification there is infinite. Any finite worst case is measuring your sampling grid, and refining the grid shows it collapsing: one star’s apparent worst case goes 19.3, then 14.9, then 2.0, then 0.25 as the grid gets finer, heading for zero.

I had that column in the folder, reading 46.5 for one star and 452.8 for another, and it was wrong: not noisy, not a property of the star at all. It was caught by drawing the figure, where the coarse grid rendered a star that stalls twice a month as one that never stalls.

The quantity that actually converges is the fraction of the month during which the clock can be read, which is an integral rather than an extremum, and which is stable to two parts in a thousand between grids.

A chart of eleven named stars ranked by the mean rate at which their angular distance from the Moon changes, with a usable fraction of the month beside each.
The Moon moves against the fixed stars at about its own diameter per hour, so the angle between it and a star is a clock. How good a clock depends entirely on how close the star is to the Moon's road.

The correlation between a star’s distance from the ecliptic and its usable fraction is −0.939. Regulus, half a degree off the ecliptic, is readable 99.8% of the month. Vega, 62 degrees off it, is readable never.

The Royal Observatory tabulated lunar distances only for the Sun and a short list of stars near the Moon’s road. That list is not tradition or convenience. It is this column.

And the method checks end to end. Put a ship at 25°N 45°W, measure a Moon-star angle with realistic error, invert it for Greenwich time, then reduce four star altitudes believing that wrong time. The resulting position error against the amplification factor times the sextant error times the cosine of latitude, a formula the pipeline was never given, comes out at a mean ratio of 0.997 across ten configurations.

The race

Error in degrees of longitude against days at sea. A flat green line for the lunar method, a steeply rising line for an ordinary chronometer, and a nearly flat amber line for Harrison's H4, against three horizontal prize thresholds.
The two methods fail in different shapes, and that is the whole fifty-year argument. A lunar's error does not grow. A chronometer's error does nothing but grow.

The two methods fail in completely different shapes, and that is the entire fifty-year argument.

A lunar’s error does not grow. Every observation is a fresh reading of a clock that cannot drift, because the clock is the solar system. A chronometer’s error does nothing but grow: one rate, multiplied by days at sea. So the question was never which method is more accurate. It was how long the voyage is.

Harrison’s H4 sailed to Jamaica in 1761. The crossing took 81 days and, after applying the watch’s known rate, it had lost about 5.1 seconds in total, which is a residual rate of 0.0630 seconds per day.

Restated in the units a clockmaker actually works in: to win the top prize over an 81-day crossing, a clock must hold 1.48 seconds a day. To merely match a single good lunar observation, it must hold 1.36 seconds a day.

Those two numbers being nearly the same is not a coincidence. The Act’s threshold was set at what the astronomers already believed they could do. The prize was written to be exactly as hard as the method its own committee preferred. Harrison beat it by a factor of 22.

Which turns into the cleanest way to state the whole contest. How long does a clock stay ahead of the sky?

clock rate beats a good lunar for
Harrison H4 0.063 s/day 4.8 years
a fine 19th-century chronometer 0.10 s/day 3.0 years
an ordinary chronometer 1.00 s/day 110 days
a poor one 5.00 s/day 22 days
a good pocket watch 30 s/day 4 days

The thing I cited instead of counting

Everything above rests on sixteen pairs of star coordinates that I typed in as catalogue data, and exactly one of them was ever tested. A wrong right ascension does not announce itself. It silently moves a geographic position by degrees, and every figure downstream stays beautiful.

So the last program tests the catalogue against facts that were never used to build it.

The Moon’s orbit is inclined about five degrees to the ecliptic, so it can only pass in front of stars within roughly six and a half degrees of it, and among the bright stars there are exactly four: Aldebaran, Regulus, Spica and Antares. Given no hint of that, my coordinates and my coordinate transform return exactly that set, and the fifth-closest bright star is more than double the band away, so it is not a near thing. One test, validating both the coordinates and the rotation between two coordinate systems at once.

Then the oldest fact in navigation: the altitude of Polaris is your latitude. Averaged over a day against the true latitude, at four places from the middle of Illinois to the equator, the worst error is 0.0041 degrees, with a daily swing of 1.472 degrees, which is exactly twice Polaris’s distance from the true pole.

That is the whole reason this night has a subject. A single sight with a stick, no tables and no clock at all, hands you one of your two coordinates for free. The sky gives you latitude and charges everything for longitude.

Six mistakes, and five of them are the same species

The first gate failed at a hundred-thousandth of a degree, and it was not the geometry: the arcsine function is singular at the zenith, so an altitude residual measured there is reporting the conditioning of the inverse sine rather than anything about position. Retested on the sine of the altitude, the well-conditioned quantity, it passes at one part in 10¹⁶.

The sidereal-rate gate read 15.041 against my expected 15.000, and my constant was the thing that was wrong.

Then the Sun’s rate came out at 14.863, and that was my test again: a single body underdetermines a two-parameter fix, so the least-squares solver returns a minimum-norm displacement along the bearing, which is not a longitude at all.

The end-to-end lunar errors ran at 0.80 of prediction, ten times out of ten, which is the square root of two over pi. I had been comparing a mean absolute error against a one-sigma prediction. On the right statistic the ratio is 0.997.

The pre-registered prediction about the cocked hat was wrong, and the diagnosis of why it was wrong was worth more than the prediction would have been.

And a whole column that was measuring my sampling grid got reported as a property of stars, caught only because the figure drew it.

Five of those six are one species: a number that looked like a measurement and was actually a choice I had made without noticing I was making one. A tolerance. A constant. A norm. An estimator. A grid.

There is a seventh, and it is in the auditor. The script I had written the night before to check whether any figure caption asserts a number no program computed ended in a hardcoded paragraph saying that of fifty-one folders, exactly one had shipped such numbers and everything else traces. That was true when it was written. That night it printed the sentence directly beneath two entries from this very folder that did not trace.

An auditing tool whose verdict is a string literal is precisely the defect it exists to find.