Holy moly, if you want to see a great post you should read Ethan's post on the solar analemma. If you photograph the sun in the sky at the same time each day, it won't be in the same spot. The orbital motion of the earth, your location on the curve of the earth, and the tilt of the earth's axis causes the sun to appear in slightly different locations each day and the path it traces out is sort of a figure-8 called an analemma.
Is it just a mathematical curiosity? Well, mostly yes other than to astronomers. But this was not always so. If you were an 17th century sailor plying your trade across the Atlantic ocean it's pretty important to know where the heck you are. GPS wasn't even a gleam in an engineer's eye, so if you're a pirate in the Sargasso...
...you can use this predictable solar pattern to find out where you are. Sort of. We can try a simplified version itself. Grab a dowel rod or other straight stick of known length and stick it in the ground. As the sun moves across the sky, the end of the shadow will move across the ground. The end of the shadow will trace out a vaguely parabolic shape, and at some point the length of the shadow will reach a minimum. This will happen when the sun has reached its highest point in that day's circle. This will be sometime around noon, though there's a huge amount of variance due both to the whole analemma thing and to civil corrections like daylight savings time.
Let's say you find that minimum shadow length and measure it. The angle that describes the altitude of the sun will be:
The angle of the sun at that moment in comparison to your latitude is relatively easy to calculate or look up in a table. It's called the solar declination, and in degrees it's 0 at the equinoxes and either 26.433 or -26.433 at the solstices. The solar declination is really a measure of the seasonal tilt of the earth with respect to the sun, and so the angle of the sun in the sky when it's at its highest is 90 degrees plus the solar declination minus your latitude. A little mind-bending, but you can see how it works by thinking about a picture of the scenario, here from Wikipedia:
Rearrange the relationship we talked about and you'll see that your latitude = 90 degrees plus the solar declination minus the sun's altitude (theta). With some accuracy and care, it's relatively easy to get your latitude to within a fraction of a degree, which is the same as determining your north-south position to a few miles.
Your longitude is much more difficult. If you know the exact time of day you can use a method similar to this one, but before accurate clocks this was out of the question. Navigators at sea thus had a very difficult time finding east-west position with any precision. John Harrison was the man who more or less put this problem to bed, and in fact it's a distant descendant of his method of extremely accurate timekeeping that GPS uses today.
How does this work if the Earth is flat as Yahweh made it?
To get your location to within a few miles, you'll have to stick your dowel vertically (to within small fractions of a degree) into ground horizontal (also to within small fractions of a degree).
You can avoid the arctan table by marking the L_shadow scale with the angles and come up with something like an astrolabe, quadrant, cross-staff, backstaff, or sextant, each of which help with keeping track of the angle to the horizon. You can also build the declination table with minimal calculation by making this observation for a whole year at a fixed location. So, if you can divide a circle into regular parts, you can do the whole process without matlab or the internet.
As Dave #2 points out, the north-south error aboard a ship was a bit bigger than a few miles. I've heard a claim that the typical error was more like plus or minus 15 miles.
The uncertainties in navigation had a major impact on early US history. Contrary to what you might have been taught, the Pilgrims didn't end up at Cape Cod by mistake. They were aiming for it because it was a recognizable landmark they could be reasonably certain of finding--the north-south portion of the Cape is about 30 miles long, coincidentally the error bar in their latitude calculation. The idea was that once they spotted Cape Cod, they could follow the coastline to their intended destination. Three reasons why they didn't follow that plan after reaching Cape Cod: (1) it was November, (2) they encountered a storm which almost left them shipwrecked, and most importantly (3) they were running out of beer.
Not just for sailors, but airplane pilots too after they figured out how to use a bubble level to create an artificial horizon. They either had a window in the roof of the cockpit or a periscope device.
I thought solar declination was 23.45 degrees (and really easy to remember.)
I live on a north-south road off a east-west major highway. From about the first of December to the end of January, I don't come from town (driving west) near sundown, because the sun sets behind the overhead traffic lights at my turnoff and it is thus very difficult to see them.
It also was simpler if you took your reading at the local apparent noon. Even today many ships keep the "noon navigational fix" as part of their routine.
Many ships also used to run the line of latitude. They would sail north or south as need to reach the correct latitude before turning east or west.
excellent use of the venture brothers