bridgejs/bridgejs — pull request #1 by sdklee (2012-03-14 05:28:18+00:00)
Title: Request: Add Compass Plugin Support

The compass plugin is done and has a test written for it.

You can call:
bridge.orientation.getCurrentOrientation().

This function returns an object with the following 4 items

ob.azimuth
ob.pitch
ob.roll
ob.timestamp

azimuth, pitch, and roll are the terms that android uses for their directions, so I decided to stay with them for the sake of consistency. Azimuth is your typical 360 degree 2-dimensional orientation. Roll has to do with tilting your phone left or right, and pitch with tilting it upwards or downwards.

Hope you guys enjoy,

Steven Klee