Friday, May 13, 2016

JOrrery -- A Free Gift for You!

So, I had this thought the other day: I wonder what the solar system looks like right now?

I don't mean what it looks like in the night sky; I mean the view from afar. The big picture. What the Vogon invasion fleet would be seeing as they crossed the heliopause or the tropopause or whatever the pause is called. I don't really grok all the hip astrolingo, which is why it took me all weekend to stumble across what I was looking for in Google: An orrery.

An orrery is a model of the solar system (not to be confused with ephemeris, which describes how to find stuff using a telescope, presumably from Earth but I guess it could be from Mars if you're Matt Damon). In old timey days, this was a mechanical model -- gears and levers and wind-up springs and whatnot. Museum quality specimens still exist and are quite something to behold. Modern efforts have largely turned to software, albeit the commitment to detail no less committed. Examples one finds on the web include a great deal of detail indeed. Planets and moons, oort clouds and eccentricities, accurate masses and orbital radii, implemented at many sites using exotic HTML my browser refuses to parse.

Fun fact: The orrery is named after the fourth Earl of Orrery, for whom the first orrery was constructed. See? We're learning already!



I'm not saying the current selection of on-line orrery doesn't offer some impressive nerdcraft; it's just more than I want. I just want the solar system. No bells, no whistles, and without a popup nagging me to buy something. I shouldn't have to read about the latest trick doctors hate or which celebrity can burp the alphabet just because I want to watch the planets go 'round. Ergo: JOrrery. A simplified orrery written in Javascript showing the positions of the planets as they appear for any calendar date, present, past, or future, at least to some reasonable approximation given the various and sundry approximations I had to accept. If you're expecting a solution of the eight body problem or relativistic corrections to the precession of Mercury, you, Sir or Madam, have a chamber up in the moon.

The sizes and orbits of the inner planets are drawn to scale, but Jupiter, Saturn, Uranus, and Neptune presented some difficulties. The orbit of Neptune is >30 times larger than the orbit of Earth, and drawing it to scale would have smushed the orbits of all the inner planets into an indistinguishable blob. Also, the gas giants are >10 times larger than Earth, and drawing them to scale would make the rocky planets imperceptible dots. As such, the radii of the four outer planets are scaled down by a factor of three, and their orbits are pure fantasy (3, 4, 5, and 6 AU, respectively -- the actual values are more like 5, 10, 20, and 30). I assumed all orbits are circular and concentric and co-planar, which is not a too-terrible assumption for a project of this sort but it will probably offend someone. Lastly, I omitted Pluto. Sorry, spacewonks, but I lost interest sometime around the third reclassification feud. Fool me once...

Over in the reality plus column, the planet positions are calculated using data from JPL, who were kind enough to make some of the numbers they use to plan real actual spacecraft trajectories available to us ordinary citizens, although now that I think about it us ordinary citizens did technically pay for those numbers. Pecunia non olet, I guess. (Also, dudes: Telnet? Are you kidding me? Some of the smartest cats on the planet work at JPL and your website still uses TELNET?)

The default JOrrery view defaults to viewing now, whatever now that might be. However, you can select another date to view, perhaps a date that means something special like your birthday or World Eigenvalue Day. You can enter any date you like, but my JPL data is technically only accurate between 1800 and 2050. Enter it in the proper format (mm-dd-yyyy) -- be sure to include leading zeros (e.g., "01" not "1") and the dashes; the string must be 10 characters long -- then click the update view button to update the view. There's rudimentary syntax checking of the string you enter, but you can prolly flummox my parser with mild tomfoolery, so don't do that.

Finally, the entire raison d'être of an orrery is to demonstrate motion and JOrrery is no exception. There's a start button to start the animation and a stop button to stop it. Time slips into the future from today (or the last date you entered), one day at a time. Note the animation just increments each planet's position by 1/the planet's orbital period in each frame rather than recalculating everything from the JPL tables de novo. As such, the positions will slowly become less accurate as the animation proceeds, but I figured that was worth giving your CPU a break.

The sun is at center (not shown), providing heat and light and gravity. If you need a refresher, the eight planets go: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, in order of increasing orbit radius. Earth, of course, is the pale blue dot.

UPDATE: For improved user experience making doing, JSOrrery is now its own website! Go to jsorrery.blogspot.com.

As usual, please email me any bugs you happen to find.

Orrery!

1 comment: