You'd need some kind of giro for the z-axis. Right now the iphone can only tell if it's facing uyp or facing down, but can't tell by what degree. Maybe in later edititons they will make the z-axis giro like the others. Alternatively, you could make a device you can attach to the iphone that tells it its position along the median plane.