Thanks @cvp
I gave it a try. Here is a simple comparison of UIDevice.orientation to motion.get_attitude:
facedown.py

The 6 only comes up when completely upside down. The transition from flat to "vertical" happens near a pitch or roll of 30deg. Still not as reliable as the gravity term and ui.WebView