- From: Rich Tibbett <richt@opera.com>
- Date: Mon, 25 Jun 2012 12:08:20 +0200
- To: public-geolocation@w3.org
I've been investigating the calibration of deviceorientation events [1]
in a number of different mobile user agents. To accomplish this, I
devised a simple test, split in to three well-defined reference planes,
that can be used to benchmark the orientation data returned by any user
agent implementing this specification. The details of this test are
included below.
Currently each user agent I've tested (though the list of UAs tested is
by no means complete) is returning differing and conflicting
deviceorientation values for alpha, beta and gamma as they travel
through the points defined in each of the reference planes defined
herein. I believe this is making it impossible for developers to build
mobile web apps that require consistent and well-known 3-axis device
orientation data irrespective to which user agent is being used.
The starting question here is: what is the correct, normative device
orientation calibration to use in the three reference planes provided
below? IIUC the specification does not yet provide enough information to
answer this question and so I'd like to propose the following changes.
The specification should be updated to include the three reference
planes provided herein along with the reference photographs provided of
the expected device orientation in Euclidean space (i.e. my desk :). The
spec should then also include three radar charts [2] describing the
normative orientation values expected as a device moves around the
points in each of the defined reference planes (along the lines of the
test result diagrams shown below).
It may also be of interest to incorporate these tests in to a manual
calibration test suite for this specification to avoid this issue
recurring in future implementations. Alternatively, I've implemented a
3-dimensional compass [3] utilising all 3-axis of deviceorientation that
could be used to visually evaluate the calibration of the alpha, beta
and gamma values provided by deviceorientation events. Currently [3] is
implemented according to the deviceorientation calibration provided in
Opera Mobile 12. The compass will be updated to use any normative
calibration that comes out of this discussion (+ have fallback to 2d
canvas for browsers that do not yet render WebGL content).
Does anyone have any preference/evidence for any of the calibrations
tested below to adopt a normative calibration?
Many thanks,
Rich
[1] http://dev.w3.org/geo/api/spec-source-orientation.html
[2] http://en.wikipedia.org/wiki/Radar_chart
[3] https://github.com/richtr/Marine-Compass
******
******
If text-spacing is incorrect below you can read this message with the
original fixed-width formatting intact @
http://lists.w3.org/Archives/Public/public-geolocation/2012Jun/0000.html
******
******
A simple test page has been created to simply display the raw alpha,
beta and gamma values provided by the current user agent. This page is
available at:
http://people.opera.com/richt/release/tests/orientation/compare.html
This page is used to manually obtain the orientation values as the
device travels around each reference plane documented below.
Note: All Android-based test results shown below were obtained from a
HTC One X running Android 4.0. All iOS-based test results were obtained
from an Apple iPad running iOS 5.1.
deviceorientation calibration: alpha
------------------------------------
------------------------------------
Reference Plane
----------------
Alpha:
North [A1]
(deg)
|
|
West [A4] ---|--- East [A2]
(deg) | (deg)
|
South [A3]
(deg)
Reference photos:
[A1]
http://people.opera.com/richt/release/tests/orientation/calibration/alpha_A1.jpg
(pointing due north)
[A2]
http://people.opera.com/richt/release/tests/orientation/calibration/alpha_A2.jpg
(pointing due east)
[A3]
http://people.opera.com/richt/release/tests/orientation/calibration/alpha_A3.jpg
(pointing due south)
[A4]
http://people.opera.com/richt/release/tests/orientation/calibration/alpha_A4.jpg
(pointing due west)
Q: What are the normative expected values for each of the points defined
in the reference plane above?
Browser for Android,
Chrome Beta for Android
-----------------------
Alpha:
270
|
360 / | \
----|---- 180
0 \ | /
|
90
Firefox Mobile for Android
--------------------------
Alpha:
360 0
|
/ | \
270 ----|---- 90
\ | /
|
180
Opera Mobile 12 for Android
---------------------------
Alpha:
0 360
|
/ | \
90 ----|---- 270
\ | /
|
180
Safari for iOS
--------------
Alpha:
90
|
/ | \ 0
180 ----|----
\ | / 360
|
270
deviceorientation calibration: beta
------------------------------------
------------------------------------
Reference Plane
----------------
Beta:
Horizontal [B1]
(Face Up)
|
|
Vertical [B4] ---|--- Vertical [B2]
(Face | (Face
Backward | Forward)
+ Upside Horizontal [B3]
Down) (Face Down)
[B1]
http://people.opera.com/richt/release/tests/orientation/calibration/beta_B1.jpg
[B2]
http://people.opera.com/richt/release/tests/orientation/calibration/beta_B2.jpg
[B3]
http://people.opera.com/richt/release/tests/orientation/calibration/beta_B3.jpg
[B4]
http://people.opera.com/richt/release/tests/orientation/calibration/beta_B4.jpg
Q: What are the normative expected values for each of the points defined
in the reference plane above?
Browser for Android,
Chrome Beta for Android
-----------------------
Beta:
0
|
|
-90 ----|---- 90
|
|
0
Firefox Mobile for Android
--------------------------
Beta:
0
|
/ | \
-90 ----|---- 90
\ | /
|
-180 180
Opera Mobile 12 for Android
---------------------------
Beta:
0
|
/ | \
-90 ----|---- 90
\ | /
|
-180 180
Safari for iOS
--------------
Beta:
0
|
/ | \
-90 ----|---- 90
\ | /
|
0
deviceorientation calibration: gamma
------------------------------------
------------------------------------
Reference Plane
----------------
Gamma:
To start, we must rotate the device 90 degrees clockwise as it sits on a
table.
Horizontal [G1]
(Face Up)
|
|
Vertical [G4] ---|--- Vertical [G2]
(Face | (Face
Backward | Forward)
+ Upside Horizontal [G3]
Down) (Face Down)
[G1]
http://people.opera.com/richt/release/tests/orientation/calibration/gamma_G1.jpg
[G2]
http://people.opera.com/richt/release/tests/orientation/calibration/gamma_G2.jpg
[G3]
http://people.opera.com/richt/release/tests/orientation/calibration/gamma_G3.jpg
[G4]
http://people.opera.com/richt/release/tests/orientation/calibration/gamma_G4.jpg
Q: What are the normative expected values for each of the points defined
in the reference plane above?
Browser for Android,
Chrome Beta for Android
-----------------------
Gamma:
0
|
-90 / | \
----|---- 90
270 \ | /
|
180
Firefox Mobile for Android
--------------------------
Gamma:
0
|
/ | \
-90 ----|---- 90
\ | /
|
0
Opera Mobile 12 for Android
---------------------------
Gamma:
0
|
/ | \
-90 ----|---- 90
\ | /
|
0
Safari for iOS
--------------
Gamma:
0
|
/ | \
-90 ----|---- 90
\ | /
|
-180 180
Received on Monday, 25 June 2012 10:09:00 UTC