May 2009

it's a strange world : the App Store

My text on the App Store reads, in part, "The globe of the earth can be rotated and zoomed by touches and pinches to get a detailed view of, for example, when ISS passes near the observer." But someone seems to have thought "pinches" was a naughty word because on the Store it was changed to "p****es" !!

May20 addendum: now corrected!

two pictures worth 2000 words ?

Before (wide separation) and after (coincident location) using elements derived by 'scraping' the NASA web page:

a long day ...

Version 1.1 of Satellites is the one available on the App Store today. I have submitted v1.1.1 but it may be a few days before it appears. Neither version is satisfying for the Atlantis/Hubble mission underway at the moment. I've spent the day watching NASA TV and revising Satellites for version 1.2.

  • v1.1 doesn't show the Hubble Space Telescope; v1.1.1 does.
  • the orbital elements I use are generated twice a day and may not reach the web site I use for several hours after they are published by NORAD. This doesn't much matter for satellites that are in fixed orbits, but Shuttle maneuvers a lot. The result is a difference between actual and predicted positions that can get quite large. On a docking mission, if the 'catch up' elements stay in effect after docking, the Shuttle appears to overshoot; after today's docking, Satellites showed Atlantis and Hubble on opposite sides of the Indian Ocean!
  • when the Shuttle docks with the Space Station, NORAD stops generating Shuttle elements till it undocks. This caused Satellites to keep using the last published set of elements for the duration of the docked time, much longer that they are valid for. Again the physically connected objects seemed to drift apart. Version 1.1.1 makes an attempt to account for this by not using the Shuttle elements after they are 30 hours old, and then using the elements of what it is docked to.
All this was driving me crazy so today I took a leap of faith. NASA publishes a web page that lists all the maneuvers of the Shuttle for the duration of the mission, so I decided to download that page, parse all the mission element sets, and then use the one that's most recent.

The current mission, STS-125, has 19 element sets from launch to touchdown. When I tested my code a few hours after the rendezvous was over, it found an element set about 4 hours old and, on screen, Hubble and Atlantis were right on top of each other. Hooray!

I expect I'll get v1.2 off to the App Store approval process at the weekend.

Frustrating ...

I need to find a way to get Shuttle data elements faster than via the NORAD sets. I'm sitting watching the Atlantis / Hubble rendezvous and Satellites is way out of sync with what's happening in real time.

There are elements on NASA's Human Spaceflight web pages -- I wonder if I could parse orbital elements out of those pages? It would certainly make
Satellites more fun if it was in touch with recent reality!

oooh, nasty nasty !!

I found a bug that’s probably been present for ever. The satellite element data is parsed with the subroutine sscanf, which is an accident waiting to happen in my opinion. Anyway the scan format was:

"%1d %5ld %1c %8s %2d %12lf %10lf %6lf %2d %7lf %2d %2d %5ld"

That “%6lf” should have been a “%7lf”. The reason that hadn’t caused trouble before is that the field in question is often all zeros (in fact, “.000000”) and sscanf will happily skip over zeros in search of a non zero number. When the field was not zero, the first six characters were scanned leaving the seventh to be picked up by the next field and thus chaos.

The field in question is the second differential of the coefficient of the drag imposed by the residual atmosphere. For the Shuttle, the first orbits are significantly impacted by drag and this value becomes significant. I don't know why this hasn't hit me with other Shuttle flights.

Version 1.1.1 (grrr)

Next week the Space Shuttle Atlantis will launch on the fifth and final Hubble Space Telescope (HST) service mission. As noted in my last entry, I had hoped to have a new version of Satellites ready to cope in a general way with this configuration.

Sadly, it was not to be. However, I have put together a quick and dirty patch to version 1.1 to support this mission. It is version 1.1.1 and I hope Apple can approve it fast so people can get it in time.

  • The HST is displayed on screen along with the ISS.
  • If the Shuttle is flying (when it appears in the NORAD data) and it is aiming to rendezvous with HST (orbital inclination < 30 degrees), the ‘centered’ view will focus on HST
  • If the Shuttle elements become more than 2 days old (as can happen when it docks with another object), Satellites will use the HST or ISS elements for the Shuttle, depending again on orbital inclination.