It’s Saturday morning and I am on an early flight from Kutaisi to Prague, window seat on the left. About fifteen minutes after takeoff, the sky on the right of my view looked like this:

The blue-grey wedge on the right is the Earth's shadow, cast on its own atmosphere. The sun had just risen for the plane, but the ground below was still dark. From 26,000 ft (about 8 km) you can see the edge of that shadow on the sky.
I took 34 photos over the next hour and a half. Back home I wondered if a simple model of a round Earth can predict where the band is in each photo. Let’s see.
What are we looking at?

At dawn, you sit just on the sunlit side of the day–night line and look into air that is still in the Earth’s shadow. The model calls a direction dark when its point nearest the Earth’s centre lies in that shadow.

- A, between the edge line and the horizon: the point nearest the Earth’s centre is inside the shadow, so the sky is dark. This is the band the model draws.
- B, between eye level and the edge line: the line of sight still reaches the shadow further out, but its point nearest the Earth’s centre is in sunlight, so the sky darkens only gradually towards A.
- C, a thin sliver above eye level, up to where the sky is fully sunlit: the shadow starts about 270 km away and 16 km up, where the thin air is outshone by the sunlit air in front, so C is barely darker. At 03:04 C was dark, and that is where the model breaks.
The physics
The sun is far enough away that its rays are parallel. Call the unit vector towards it . With a spherical Earth of radius , the shadow is the half-cylinder of radius behind the planet along . A point , measured from the Earth’s centre, is in shadow when it is behind the Earth and closer than to the axis through the centre along :

The plane sits at , at height above the ground, so . A line of sight with unit direction is the line ; you look along .
Its point nearest the Earth’s centre, , is the foot of the perpendicular from the centre, where the line is at a right angle to the radius:

Looking down, . If then , the line hits the ground first: you see the ground, not sky, and the model does not apply; is the horizon. Directions at or above eye level are outside the model.
We estimate whether a direction looks dark from alone:
Why only : the sky in a direction is sunlight scattered by the air along it (Rayleigh), in proportion to the air density with scale height km, so the stretch of the line nearest the ground dominates.
In each column of the photo, the edge of the band is the one direction , between the horizon and eye level, whose point nearest the Earth’s centre lies exactly on the surface of the Earth’s shadow, . The model predicts , the angle between and the horizon. It shrinks as the sun rises.

What it ignores: refraction, the sun’s 0.5° disk (penumbra), extinction of the grazing sunlight, and multiple scattering. Together they move the effective shadow surface by about a kilometre, which comes back in the radius section.
The inputs are the sun’s position, from standard solar formulas, and the plane’s position, altitude and heading, from the Flightradar24 track. I was shooting out of the left window, so the camera pointed 90° to the left of the heading; each direction is projected into the photo through a pinhole camera.

Making the band measurable
The band is easy to see but hard to measure: its edge is blurred by about a degree. Colour is easier to work with: sunlit air at dawn is lit by reddened sunlight, while shadowed air gets only bluish light from the rest of the sky. I measure colour as , which ignores exposure and brightness. Let be the position across the photo and the height above the horizon. Going up any column, rises from the blue shadow into the warm sky, and the edge is where it changes fastest:
So the edge is a function: for every it gives one , and that height is . For a soft, even fade it is also the point halfway between the two colours:

Doing that for every column traces the edge across the photo:

Does it work?
At 03:11 UTC, where the edge of the band is sharp enough to trace directly, the model and the photo agree. At the right edge of the frame the model puts it at ; the two photos show 2.4° and 2.1°.

Later in the morning the band gets faint, but its shape keeps matching: flat on the left, then a ramp to the right that starts roughly where the model says (median R² of 0.97 over 14 photos). As the sun climbs, the band sinks towards the horizon and moves out of the frame.

Where it breaks
The first few minutes don’t fit. At 03:04, at the right edge of the frame, the model puts the edge at ; the photo shows 4.8°.
The model only judges directions below eye level, so its band can never be taller than the 3° strip between the horizon and eye level. Above eye level the shadow is still there, further ahead. A line of sight at eye level stays straight while the Earth curves away beneath it, so it gets higher above the ground the further it goes: by about after a distance .
- 03:04: it reaches the shadow after only 30 km and just 70 m higher, still at the plane’s 8 km, in air just as dense, so the sky above eye level is dark too.
- 03:11: it reaches the shadow 270 km out, 5.7 km above the plane’s 10 km, where the air is half as dense, so that part of the sky stays bright.

A crude Eratosthenes
If the model knows the size of the Earth, the photos can be turned around to measure it. I make the one free parameter and fit it to the measured edge in the two sharp photos, 813 points across the frame:
where
- : a column of the photo where the edge was measured;
- : the measured edge in that column, from the colour gradient, in pixels above the horizon;
- : the camera’s focal length in pixels, from the photo width px and the field of view ;
- : the edge direction in column , the direction whose point nearest the Earth’s centre, , lies exactly on the shadow surface;
- : the horizon direction in column , the direction whose point nearest the Earth’s centre lies on the ground, ;
- both directions are computed for a planet of radius , with the plane’s position from the flight track and from the sun’s position at the photo’s time.

The optimum is km, with the model off by 0.09° on average. This assumes the camera pointed exactly 90° to the left of the plane. A few degrees of error, easy with a phone held to a window, lets anything from about 3,000 to 6,500 km fit almost as well. Grazing sunlight bending into the shadow can also put the effective shadow surface up to a kilometre below sea level, which moves the answer to 4,000–7,500 km. The true value is 6,371 km.
The rest of the view
The shadow was gone after half an hour, but I kept taking photos.

I thought this was just before sunrise, but the sun had come up there at about 04:05 UTC, a quarter of an hour earlier. It was only 2° above the horizon, so the flat fields got very little light, while the white turbine towers and the sides of the clouds faced it directly.

These are the Căpățânii Mountains, with their highest summit, Ursu (2,124 m), and the white limestone cliffs of Buila-Vânturarița around Vânturarița Mare (1,885 m). Behind them are the Parâng Mountains, up to Parângul Mare (2,519 m), and fog still lies in the valleys of the Lotru and the Olt. I found the names by rendering a terrain model from the plane’s position and matching the ridges.
If you get a window seat on an early flight, look out of the side facing away from the sunrise. The dark band above the horizon is the Earth’s shadow.
It was the most enjoyable flight I have had. Here are the clouds just before we landed in Prague. Enjoy :)