May 26, 2006
Hmm, that fall at the game Friday seems to have dislodged a couple entries. Guess the "Brain Farts" title may be accurate after all. Or maybe I just talk out of my ass too much. Anyway...
A couple weeks ago I caught up with the new goings-on over at Bad Astronomy and saw a lot about the two Mars rovers. In order to make the most of the daylight they receive, the rovers operate on "sols" -- the Martian day of about 24 hours and 40 minutes.
It got me to thinking about the rest of the Martian calendar, since as far as I know there's no official one. I set out to change that :)
Once I figured out a leap-year schedule (three every five years, skipping years divisible by 50) I decided to backtrack and find a good starting point for the calendar. I wanted to go a pretty good ways, so anything we're ever written down about the planet would happen in positive years. A not-so-quick back-of-the-envelope calculation places the Martian north winter solstice on the same day as January 1 way back in 1754 BCE, assuming my guess about when the Martian solstices happen is at all accurate.
That became the first day of the first month of Martian Year 0. Yes, on Mars we'll start counting from 0 like sensible people. Moving forward, assuming I did everything right, puts us in the second half of Martian Year 2018. The Viking landings happened sometime in the 1999-2001 range, which seems to fit nicely.
Then I realized that units were going to be a bitch. Human explorers to Mars would probably bring the concept of hours, minutes and seconds with them, but none of these things fit a Martian day particularly well. Since NASA has already started using the term "sol" for a Martian day, I went ahead and made up new names for everything.
- Second(s): The second is an actual unit of measurement, and is too important to screw with.
- Minorum/minora: The Martian equivalent of a minute, it lasts about 61.5 seconds. This is the one case of square-peg-round-hole I allowed myself. Larger units are even from here on out.
- Horum/hora: Martian hours. They last 60 minora, or about 61.5 minutes.
- Sol(s): Martian days. To keep using Earth ratios, there are 24 hora in a sol, which is about 24 hours and 40 minutes here.
- Lune(s): The concept of a month is totally useless in terms of Mars's satellites -- they orbit in a matter of days, and one is close enough to rise in the west and set in the east. Bringing over the concept of 30-ish days from Earth, I was able to make 18 lunes of 37 and 38 sols each. The 1st, 4th, 7th, etc., lunes are the long ones.
- Anno(s): A Martian year of 18 lunes, or 669 sols. Leap-annos are 670 sols long, with the extra sol added to the last lune. I just realized that I don't account for that at all in my marsDate() function. Annos that are evenly divisible by 5, or leave a remainder of 2 or 4 are leap-annos. Annos divisible by 50 are not. If I remember right that gives us a day of error every 20,000 annos or so, or a little less than 40,000 years. I may have shifted a decimal on that one though, so don't quote me on it.
With units figured out it was time to start doing conversions.
Martian datestamps are necessarily 64-bit integers; 32-bit ints only last about 70 (Earth) years. I created marsDate() to convey most of the functionality of PHP's date() function. The only real exception is the removal of twelve-horum time and the AM/PM that goes with it. Twenty-four-horum (military) time only, thanks. If we're going to recreate the clock we might as well do it right. I also created earthTsToMarsTs() to automatically take an Earth datestamp and add the appropriate amount to make it Martian.
As far as naming goes, some was easy and some wasn't. I opted for a seven-sol week and chose names for the sols based on the celestial bodies that are visible in the Martian sky. The week begins on Heliosol. (Helios being Greek for the Sun; at least five of the names are based on the Greek names. Two I'm not sure of.) The work week begins with Deimosol and Phobosol, after Mars's captured asteroids moons. Then on to the planets: Terrasol (Terra -- Earth), Aphrodisol (Aphrodite -- Venus) and Zeusol (Zeus -- Jupiter) even out the work week, and Cronosol (Cronos -- Saturn) begins the weekend. 1/1/0000 was a Heliosol.
Lunes I had a harder time with. The year begins with three people who were important in the study of Mars -- Percival (Lowell, who thought he saw canals), Asaph (Hall, discoverer of the moons) and Giovanni (Schiaparelli, who saw the canali that Lowell mistranslated as "canals".
Then I ran out of steam with only 15 to go. The fourth and fifth lunes are currently named (H.G.) Wells and (Edgar Rice) Burroughs who wrote The War of the Worlds and the Barsoom Series, respectively. I only half-seriously considered naming the thirteenth lune "Smarch" but a scholarly work such as this is no place for Simpsons references :)
Of course, my code is probably full of bugs like off-by-one errors: It's not like I have an actual calendar to check against. But it was a fun exercise. I probably ought to put it up on the site so people can play with it.