iPhone 3Gs Embeds Heading (Not Orientation) in EXIF Metadata
Further to last night's post and based on some carefully aligned photos, I am a little disappointed to conclude that the EXIF value GPSDirectionRef that the iPhone 3Gs inserts is (only) the camera's magnetic heading expressed as a rational number and not (as I'd hoped) the camera's 3D orientation in space.
No sure conclusion on why it's expressed as a rational and why the denominator varies, but my guess remains that it's precision.
A review of other EXIF data doesn't show any other data indicating orientation of the camera (i.e., no tilt or raw accelerometer numbers).
Implications for hackers: You can probably guess what the camera was aimed at by simply casting a cone out from the geocode and the heading (update: Hah! And the orientation! If the camera is in landscape mode, the heading is still the short-side of the rectangle. But note that the iPhone seems to set tiff:orientation EXIF value to '1' regardless of mode.). But I don't see any way to put Godzilla's feet on the ground. (Of course, additional EXIF metadata is a simple thing for Apple to add in a firmware update, so as the augmented reality wave rolls in, look for it in updates.)
Pedantic trivia: The 'heading' of an object is the direction in which it is pointed. The 'bearing' is the position of an object relative to your location. GPSImageDirection clearly ought to be the bearing of the photograph, but is, with the iPhone, the heading (the direction in which the top of the iPhone is pointed).