Android Question Phone Sensor Orientation x starting point

emexes

Well-Known Member
Licensed User
Are Tablets Accelerometer different then Phone?
I don't know, but it would not surprise me if (some) tablets regarded landscape orientation as normal, and the accelerometer axes were oriented accordingly.

And if you're running an emulator, all bets are off ;-)

On a related note: in my bang-it-up-fast code, I used orientation values 8,9,6,3,2,1,4,7 arranged as per numeric keypad, but in retrospect, would be better just using degrees (or multiples of 45 or 90 degrees).
 

emexes

Well-Known Member
Licensed User
Righto, step one is these measurements, where the angle is clockwise (like a compass) ie negative = tilted left, positive = tilted right, with 0 degrees being phone upright aka portrait:
Updated to include Onix AT9-014 tablet running Android 4.4.2 (locked to portrait mode, ironically).

B4X:
device   phone      tablet
angle   x    y      x    y

-135    7   -7      7    7
 -90   10    0      0   10     landscape, tilted to left (anticlockwise)
 -45    7    7     -7    7
   0    0   10    -10    0     portrait
  45   -7    7     -7   -7
  90  -10    0      0  -10     landscape, tilted to right (clockwise)
 135   -7   -7      7   -7
Accelerations in metres-per-second-per-second, where earth's gravity is (close enough to) 10. Hallelujah! One small step in the long journey of dragging youse Yanks towards the glorious coherence of SI ;-)[/QUOTE]
 
Last edited:

emexes

Well-Known Member
Licensed User
Speaking of ironic, yesterday happened upon this map.

"At this time, only three countries—Burma, Liberia, and the US—have not adopted the International System of Units (SI, or metric system) as their official system of weights and measures."

The "Axis of Medieval" reference was kinda funny (although that might just be my weird humour, juxtaposing it with George W Bush and his Axis of Evil).

 
Top