In the last post, I linked to a Windows application that generates KML for orbits of satellites. Somehow, this wasn’t satisfactory — it’s a Windows application, so this means it won’t be of use to me when I eventually get to run Google Earth on my Mac.
I came up with another solution, and it involves sitting on the shoulders of Tom Mangan, who created this excellent Google Maps mashup with the positions of both the Space Shuttle and ISS. He wrote some code that periodically scrapes NASA websites for the live coordinates. He was kind enough to lend it to me.
I used PHP to parse the results of Tom’s servlet and wrap it inside valid KML, on the fly. I tweaked the KML so that a line extrudes from the surface of the Earth to the spaceship itself. This gives a good sense of how far up the spaceship is, especially if you’re looking at it from afar. The positions are automatically updated once a minute.
Here is the network link as a KMZ file, ready to launch with Google Earth.
Unfortunately, I did not figure out a way to get Google Earth to fly along with the spaceships, so you’ll have to do some manual maneuvering. Also, if you ask Google to swoosh in on a placemarker suspended 300km above Earth, it instead zooms in on the spot directly beneath it. I suspect this is a bug, as that is the effect I would expect if the placemarker were located on the surface of the Earth, rather than above it.
Then again, I might be wrong, as I am checking this via VirtualPC on my Mac, where the refresh rate of the image is about half a hertz. (Then again, it’s not like I’m trying to play Halo2).