Solar Slidewheel for Celestial Navigatoin
tl;dr:
- Video from 39c3
- Slides (as images)
- Source code for the slide rule and alamanc replacements
- Solar slide rule simulator. Sorry it's super janky -- I don't know how to HTML.
Introduction
You might remember me from previous CCC talks on Thunderstrike or modchips, although
more recently I've been spending time at sea, which, in between boat maintenance projects,
has given me the opportunity to ponder big questions that we've been asking our selves
for all time.
Questions like "Where are we?" and "Why are we here?".
This talk will not even try to answer the second question, but hopefully will give you some ideas about how to answer the first.
![]() |
![]() |
| Wave navigation map | Hawaii canoe |
![]() |
![]() |
| Astrolabes | Viking longship |
People have figured out lots of different ways to navigation the oceans. Some are based on geography, like the Marshall Islands stick charts that represent the prevaling waves created by the Polynesian islands and that they represented by sticks and knots.
Many of the navigation techniques use the stars. The Hawaiians developed a method called the Star Compass that observes when constelations rise and fall to determine the position of their voyaging canoes.
Islamic astronomers produced elaborate astrolabes that allowed them to predict the motion and position of celestial objects, although most of them require a custom plate for each lattitude.
The Vikings are said to have had Iceland spar, also known as Sun Stones, whose polarization properties might have allowed them to navigate when the sun was hidden by overcast skies, a frequent problem here in Northern Europe.
Motion of the Sun
Before we pinpoint our location, let's try to answer an easy question first: Which hemisphere are we in? One way is to watch the sunrise.
If the sun moves up and to the right, you're in the northern hemisphere.
If the sun rises to the left, you're in the southern hemisphere.
And if it goes mostly straight up, you're somewhere in the tropics around the equator.
But you nerds aren't ever going to wake up early enough to see the sunrise, so you can do the same thing with the sunset...
If the sun sets towards the right, this means you're in the northern hemisphere, To the left means the southern hemisphere, and straight down means somewhere in between.
If the sun doesn't set (or doesn't rise) you're probably near the poles, either above the arctic circle or below the antarctic circle.
As a rough guideline, if you see polar bears, you're near the north pole. If you see penguins, you're somewhere futher south. But hopefully you already had a better idea where you were before watching an introductory talk on celestial navigation.
Sundials
If you don't want to wait until sunrise or sunset, you can stand very still and watch your shadow. If it moves to the right, then you're likely in the norther hemisphere. If you put some stones down and you'll have a basic sundial that moves clockwise, which is where we get the word clockwise.
If your shadow moves to the left, then you're probably in the southern hemisphere. Unlike the toilets, sundials in the southern hemisphere really do run backwards.
Since you probably don't want to stand still all day, you can put a stick in the ground, called a gnomon and now you have a fancy sundial.
You'll probably notice that the length of the shadows changes during the day -- we have some intuitive feeling for this with longer shadows in the morning and evenings. During the midday the shadow shortens and if you mark the location on the sundial of the shortest shadow of the day, this is called Local or Solar Noon.
Local Noon occurs when the sun is on the same north/south meridian as you. Typically if you're in the northern hemisphere, the Sun is due south of you at solar noon. And if you're in the southern hemisphere the Sun will be due north.
But if you're in the tropics, the sun is more like overhead and sometimes a little ways north, sometimes a little ways south.
Zero Shadow Day
And sometimes in the tropics, twice during the year, the sun is directly overhead. This is called Lahaina Noon or "zero shadow day". I took this picture as we crossed the equator on the day of the equinox and everyone was amused that I was photographing my feet.
Circumference of the Earth
The greek mathematician Eratosthenes, around 300BC, had heard that the temple in Syene cast no shadow on the solstice. But he knew that the temples in Alexandria a little ways north of there did cast shadows.
Based on his knowledge that the Earth was round (that's how out of date flat earthers are!), and the assumption that the rays of light from the sun are parallel when they reach the earth, he noticed that if measured the angle of the shadow in Alexandria, with a little bit of geometry, that it must be the same angle as the distance between the two towns on the globe.
So he did what any reasonable person would do: hired someone to walk between them while counting their steps. a little bit of 2 π R math and he computed the circumference of the world, within a few percent of the real value even!
Eratosthenes also developed the idea of parallels of latitude and north/south meridians, and used these sorts of measurements to produce a fairly accurate map of Greece and the Med. He also developed a way to find prime numbers, but that's math so we'll skip it in this talk.
Measuring angles
If you want to recreate his experiment, you can find an obelisk and
measure the angle of the shortest shadow at local noon, called the ''zenith'',
which is related to your latitude.
Since it is a challenge to climb to the top of the obelisk to measure the angle, another way is to find out how tall it is and then measure the length of the shadow. Since the base forms a right triangle you can apply the tangent function...
But that's math, so let's instead note that it is easier to measure the bottom angle, which we call the Height, by standing at the base and looking up until the top just blocks the sun.
The zenith is the 90 minus this height angle.
Cross-staff
Unfortunatley at sea you don't always have a handy obelisk, and it might be hard to measure the shadow at sea, so some we've developed more convenient tools over the years.
One older tool is the cross staff, which has a fixed ruler that you hold against your eye and a slider that you can move towards or away. The goal is to position the slider so that the top is touching the sun and the bottom is touching the horizon, and then the height angle is read from the ruler markings.
This has lots of problems, such as the fact that you're staring into the sun and it is hard to see both the sun and the horizon at the same time.
Sextants
On a more modern ship like ISS you could use a sextant.
ESA and NASA tested it as a backup
and both the Gemini and Apollo missions used them. On Apollo 13 it was important since their computers
were not working after the accident.
Back on the sea, the sextant performs the same height measurement as the
cross staff, but with several advantages. There are shades that you can
use to reduce the brightness of the Sun and, through a series of mirrors,
you can see both the sun and the horizon at the same time.
Here's an example of what it looks like when you've "brought the Sun to the horizon"
with a plastic sextant. Once it is there, you swing the sextant side-to-side to ensure
that the sun is as low as possible, which ensures that you're holding the sextant vertically.
For a noon sight you'll wait until the sun stops moving upwards and then you can read out the height angle on the scale quite accurately, with a Vernier scale that allows around one minute of angle.
The way the sextant works is that you look through the eye piece towards
the horizon on the left side of your visor, while the sunlight goes through
the filters and then bounces off a pivoting mirror, then off a fixed mirror,
and finally into your eye.
On this more expensive model you can squeeze the two levers to unlock the arm and freely adjust the pivot angle, and then turn the wheel to make very smooth fine adjustments to the angle.
The angle degrees are read from the arc scale and then minutes plus fractional minutes are read from the wheel's Vernier scale.
Declination
![]() |
![]() |
| Northern Hemisphere | Southern Hemisphere |
Unfortunately this height angle is only one part of measurement of lattitude...
If you were to measure the height of the Sun every day for a year, you'd find that it varies by more than 46 degrees between the solstices in June and December.
If you're in the southern hemisphere the highest and lowest dates are reversed. TODO: Is the analema also reversed?
The reason for this change is that the Earth is tilted about 23 degrees relative
to the orbit around the sun, so the sun seems to move north and south throughout the year.
This axial tilt is the reason for the seasons, not the
distance from the Earth to the Sun.
To visualize that let's draw a diagram of the Earth - Sun system
during northern hemisphere summer when the sun is north of the equator.
For this example let's say it is at 20 degrees of declination,
which means that as the Earth rotates every location on that latitude
would experience a zero shadow day.
From Hamburg as we face south towards the Sun at our local noon, we might measure a sextant height of 57 degrees. This means our zenith angle is 90 - 57, or 33 degrees. This also means that our position is 33 degrees north of the sun's declination.
Since we want our latitude north of the equator, we can see from geometry that it is our Zenith + the Sun's Declination = 53 degrees. Sorry for the little bit of arithmetic; it's unavoidable here, but we'll try to find ways to avoid it later.
Some of you might be looking at this diagram and thinking that by symmetry that there is somewhere else where an observer would also measure the same height?
And you're right! Someone south of the sun's declination would see the sun's height as 57 degrees, although they would be facing north when they looked at it.
If we define their north-facing height measurement as having a negative zenith angle, then the math is exactly the same: their latitude is also Zenith + Declination, -33 + 20 = -13 aka 13 South.
Bowditch Navigation
Since the Sun moves so much during the year, keeping track of its declination is important and one of the best guides is Bowditch's nautical almanac. It is such an epitome of navigation that it is still in print two hundred years later, somewhat updated to include GPS navigation and other topics, but still covering the practical techniques for using sextants and manual calculations of position.
![]() |
![]() |
| Cover page of the 1802 edition | Bowditch's introduction |
Bowditch computed the sun’s declination for every day of years following the publication. He calls out a different nautical alamance whose author had made a mistake of treating 1800 as a leap year, which caused significant errors in position computations resulting in the loss of at least two vessels.
That's how important these tables are (and a reminder to use a calendar library instead of writing your own code).
Unfortunately using the tables in the nautical almanacs is a real pain -- everything is done with
base 60 sexagesimal math with units of degrees, minutes, and seconds math
You have to remember to carry or borrow the sixty and it is a huge pain. I make so many
arithmetic errors that instead I've designed a slide rule to make it easier.
Slide Rules
Slide rules are portable, mechanical calculators that help out with some parts of the computation
by functioning as sort of a lookup table for specific math function. They come in different sizes,
and many are specialized for different applications.
![]() |
![]() |
| Mr Spock holding an e6b | Apollo era circular slide rule |
Some are specialized for navigating your star ships, like the E6B that Spock is holding, and that student pilots still learn to use as part of their PPSEL rating. NASA also handmade some for mission control to help compute re-entry profiles.
Solar Slide Rule
This is one of the inspirations for my circular rule that is specialized
for sextant corrections. The outer dial keeps tracks of the minutes
of your result and has both base 60 and decimal degrees, as well their
complements.
The inner dial allows addition and subtraction of minutes as well as six different specialized lookup tables, which we'll describe later.
There is also a rotating cursor with a hairline that allows you to read out the results or align with the lookup tables. This is an early prototype so the cursor is a piece of paper; in the source tree there is 3D printable cursor with a slot of a thread to make it easier to read.
If we go back to Bowditch's chapter on how "to find the latitude by the meridian of any object",
we can see the steps that he lists for correcting sextant height measurements.
He also has a lookup table for the various factors, but using that
requires too much math so the sliderule helps us with them.
Index Error
The first correction is "Index error" which is a materials or manufacturing issue with the sextant.
If you set the scale to zero and look at the horizon, you'll see that the horizon in the mirror doesn't
always line up with the real horizon. This is especially common with cheap plastic sextants since
everything moves a bit with temperature.
The fix is to use the sextant scale to calibrate itself -- adjust it until the horizon lines up and make note of how far off it is from zero. You don't need to do this every sighting, just occasionally during your voyage to check that it hasn't moved too much.
For this example let's say you found an index error of -1.2' and then measured a sun height
of 12°53.6' on the sextant. To correct this point the zero on the inner scale to the black
53.6' on the outer scale, then swinging the cursor so the hairline is at -1.2' on the inner scale's
red values.
The black outer scale now reads the corrected minutes for the apparent height, 52.4'. In case you wanted to treat this as decmial, you can read 0.874° from the outer outer scale.
Dip
Secondly, your angle to the horizon depends on the height of your eye above the water.
Close to the waves has a very different view than the top of the mast, and this will
affect your measured sextant height.
The sextant height angle measures the angle from our view of the horizon to the sun,
but what we want is the angle between the tangent at the surface of the earth and the sun.
The angle between our view of the horizon and the tangent is called the “dip” and
we subtract this from sextant height to get the apparent altitude.
The solar slide rule has a function to automatically take the height of eye into account, for both feet and meters above sea level. Here it is set to subtract the dip for 4.5m and there is also a bonus function next to it that tells you the distance to the horizon is about 7.6 km.
Refraction
The third error we need to correct for is refraction, which gives us rainbows
as well as making the pencil look bent in the glass of water. This effect was
formalized by the Dutch cartographer Willebrord Snellius who named Snell's law
to measure the amount that light bends when passing through media of different densities.
The amount of refraction that occurs depends on the angle of the measurement
(closer to the horizon causes more refraction) as well as the temperature
(colder causes more) and atmospheric pressure.
The solar slide rule has a compound function that compensates for the angle and temperature -- rotate the cursor to line up where the temperature line and angle line converge to automatically subtract the correct amount from the sextant height.
Semi-diameter
The last error that is handled by the slide rule is to adjust the measurement to be
at the center of the sun, since all of the math is based on the center not the rim.
If you're shooting star sights for stars that are not our sun,
you can skip this step since they are essentially point sources.
I typically prefer “lower limb” measurements where I place the bottom of the sun on the horizon, which require the radius to be added, but sometimes you can’t see the bottom due to clouds so you might use the “upper limb” where the top of the sun just touched the horizon, and then need to subtract this radius.
The radius that needs to be added or subtracted varies during the year as the earth is closer or further, so the slide rule has a lookup table with a small calendar and also automatically adds or subtracts from the sextant height based on the direction you swing the cursor.
Correcting Sextant height to Observed height
Putting it all together:
- First align the slide rule indexes at zero.
- Rotate the black outer ring to the minutes of the sextant height (Hs), 56.3'.
- Move the pointer to correct for index error on the inner, -1.2' (red since it is negative).
- Holding the pointer and outer fixed, rotate the inner to select the height of eye, 4.5m.
- Rotate the pointer to select the current temperature and angle to the horizon.
- Rotate the inner wheel to select the time of year on the calendar, December.
- Finally we set the pointer to zero on the index to read our corrected Height Observed (Ho) minutes.
- Note that the cursor crossed the outer zero so we need to carry a one.
At the end of those steps, our sextant height has been corrected by these four errors.
We can read our observed height minutes 2.9, although since we want the zenith, which is 90 - Height,
we read the complement in red as 57.1’
Consulting the alamanc for today we read the sun’s declination and set the pointer to the inner black 10.7 minutes, which allows us to read our minutes of latitude in red on the outer, 46.4'.
A little arithmetic to add the whole number degrees gives us a position very near Hamburg.
But that’s just our lattitude...
Longitude
I wish we had enough time to go into detail for longitude during this talk.
So this is a very brief overview of how it is computed.
The basic idea is that the earth rotates 360 degrees per day, which is 15 degrees per hour.
To put that in human terms, nearly 1700 km/hour or 463 m/second.
So if we know the exact time of our local noon, which remember is when
the sun is in the same meridian as us, and the time that some other location
had its local noon, then the angle of longitude between the two locations
is the difference in hours from our local noon to their’s,
times 15° per hour.
There are some politics inolved in where that origin is -- France wanted it on the Paris meridian,
but the rest of the world agreed on England, specifically the meridian of the Greenwich observatory.
Time keeping
Typically we use UTC for our time calculations, previously called Greenwich Mean Time,
although since France didn't win the meridian contest, UTC is a compromise
and the acryonym is neither "coordinated universal time" nor "temps universel coordonné".
In the 1700s the British crown offered a prize for the first clock that could keep sufficiently accurate time
aboard ships since pendulum clocks don't handle the heeling motions very well.
John Harrison won with his H1 but continued refining the design for decades, resulting in a pocket
watch sized H5. There's quite a convoluted history of the Longitude Act and
the book Longitude has a good history of the prize.
These days I use a digital watch set to UTC and, while it’s not fancy, it is reliable.
The battery lasts years so it just lives in the sextant case, always ready for the next voyage.
Equation of Time
One additional wrinkle is that solar noon at the Observatory in Greenwich does not always
occur at 12:00 UTC. Due to the eliptical orbit of the planets and Kepler's laws of planetary motion
(which is more math than this talk can handle), sundials will run fast or slow during the year
according to the Equation of Time. Many sundials include a small diagram so that you can
see the offset to add or subtract from the shadow to correct the reading.
When you're computing the time of your local noon, you need to be sure to subtract this value as well so that your UTC measurement doesn't include this error. Accurate values are included in the daily almanac.
Accuracy
Meridian Passage
Let’s talk a little about how accurate this method of determining positoin might be...
During local noon, the sun will seem to slow down in its climb and hang at its zenith for a while. It can be hard to say precisely when it is at its highest, especially if the ship is also rolling a bit.
However, since it is moving so little during this time, even a four minute error on either side of true local noon would only give a slight difference in height.
For the measurements I took in Hamburg it is only a 0.7' change in the sextant height, which is about a 1 km error in the computed latitude.
However....
The sun hasn’t stopped its westerly travel, and that four minute error in declaring noon translates to over 100 km of longitude uncertainty at this lattitude (and almost twice that at the equator). So typicaly the noon sight is only used for determining your lattitude.
Intercept Method
There is a more complicated geometric technique called the Intercept Method that can
produce a much more accurate longitude fix and also allows the use of multiple sights during the day,
not just at noon.
This method requires some large lookup tables, called Pub 249 or difficult trig to compute the arc distance between two points on a sphere.
I'm not a fan of the Zn tables, especially since they require arithmetic based on the
side of the meridian you are on, which hemisphere you're in, and they require separate tables
based on if the sun is in the same hemisphere or opposite hemisphere.
So I've developed my own graphical tool that allows computation of the Zn bearing without these limitations. It also gives you a more intuitive feel of what is being computed since you can see the location of the sun relative to your position and doesn't require additional arithmetic on the result.
TODO: write up more about this.
The back side of the slide rule has a special dial that solves these spherical triangles through coordinate transforms, without even requiring per-latitude tables. It's still under development and needs some tweaks before it's ready to take to sea.
It also turns out that I've recreated the universal astrolabe and I’d love to spend an hour talking about it, but we're already over time.
Resources
You can practice with the solar sliderule simulator
to see how it corrects your Hs to Ho. Sorry it's super janky -- I don't know how to HTML.
The source code is in github.com/osresearch/sunwheel and is all in very hacky Python.























