W3C home > Mailing lists > Public > public-geolocation@w3.org > August 2014

Re: Proposal to add unit quaternion representation to the Device Orientation event.

From: Rich Tibbett <richt@opera.com>
Date: Thu, 28 Aug 2014 12:07:25 +0200
Message-ID: <CAAsrAZBMfw86dxmj0q35yRBMc+kSH7VB=enAhMymtWo5wOAO9w@mail.gmail.com>
To: "Mandyam, Giridhar" <mandyam@quicinc.com>
Cc: Mounir Lamouri <mounir@lamouri.fr>, Tim Volodine <timvolodine@google.com>, public-geolocation <public-geolocation@w3.org>, Rob Manson <roBman@buildar.com>
On Sun, Aug 3, 2014 at 9:53 PM, Mandyam, Giridhar <mandyam@quicinc.com> wrote:
> Having heard no objections, I am going to ask Tim/Rich in their capacity as Editors of the DeviceOrientation spec to create an ED with the quarternion proposal incorporated.
>
> Note that Mounir has posted to the public-fx list a suggestion to incorporate this into the Geometry specification:  see http://lists.w3.org/Archives/Public/public-fx/2014JulSep/0076.html.  Thanks for Mounir for doing this.  If this feature is incorporated into the Geometry spec, the editors can adjust the DeviceOrientation specification accordingly.

While I think is a good addition it does not solve the underlying
issue of getting DeviceOrientation to work when a device's display
rotates away from its default orientation. In addition, this is
already a solvable problem for web developers. We have provided code
examples to transform the provided 'alpha', 'beta' and 'gamma'
attributes to a Unit Quaternion (and a Rotation Matrix) in the
"Alternate device orientation representations" annex within the latest
editor's draft @
https://w3c.github.io/deviceorientation/spec-source-orientation.html#worked-example-2.

My concern here is that giving web developers a Quaternion
representation of the device orientation still relies on them to
correctly transform that Quaternion relative to screen orientation
angle changes in order for their applications to work in any screen
orientation. Given that we still require web developers to apply their
own screen orientation transform to this fixed device frame quaternion
I wonder if this only partially solves the problems web developers are
having.

I would rather we provided screen-adjusted device orientation values
on DeviceOrientation Event objects and let web developers construct
their own Quaternions and/or Rotation Matrices in JavaScript for now.
This issue has been discussed on public-webapps@ starting at
http://lists.w3.org/Archives/Public/public-webapps/2014JulSep/0203.html
and on the W3C DeviceOrientation Github issue tracker at
https://github.com/w3c/deviceorientation/issues/4. Currently we have
seen tentative support from Mozilla (and Opera) for this approach.
What do other browser implementers feel about prioritizing this
addition above and perhaps instead of adding a Quaternion
representation to the spec?

I have made a pull request for adding 'screenAlpha', 'screenBeta' and
'screenGamma' attributes to the DeviceOrientationEvent interface at
https://github.com/w3c/deviceorientation/pull/10. I also currently
have a tentative Chromium patch ready to add these attributes pending
general consensus on this mailing list.

- Rich

>
> Thanks,
>
> -Giri
>
> -----Original Message-----
> From: Mandyam, Giridhar [mailto:mandyam@quicinc.com]
> Sent: Thursday, July 24, 2014 8:40 AM
> To: Mounir Lamouri; Tim Volodine; public-geolocation
> Cc: Rich Tibbett; Rob Manson
> Subject: RE: Proposal to add unit quaternion representation to the Device Orientation event.
>
> Hi Mounir,
> It just went to Last Call:  http://www.w3.org/TR/2014/WD-geometry-1-20140626/.  I wonder if we bring this in at this point.
>
> One possibility is to suggest this as a change to the Geometry I/F Module Level 1 spec prior to the August 7 deadline for LC comments, and go ahead and list the quaternion interface in DeviceOrientation until it is adopted in the Geometry I/F.
>
> Does anyone else have opinions on Mounir's suggestion?
>
> -Giri
>
> -----Original Message-----
> From: Mounir Lamouri [mailto:mounir@lamouri.fr]
> Sent: Thursday, July 24, 2014 8:30 AM
> To: Mandyam, Giridhar; Tim Volodine; public-geolocation
> Cc: Rich Tibbett; Rob Manson
> Subject: Re: Proposal to add unit quaternion representation to the Device Orientation event.
>
> Giri, should we investigate adding this to http://dev.w3.org/fxtf/geometry/ ?
>
> -- Mounir
>
> On Thu, 24 Jul 2014, at 22:43, Mandyam, Giridhar wrote:
>> If there are no objections to this proposal provided to the mailing
>> list by 5 PM US Pacific Time, August 1, 2014, then I will request the
>> editors (Tim and Rich) to include this proposal in the DeviceOrientation spec.
>>
>> Thanks,
>>
>> -Giri
>>
>> -----Original Message-----
>> From: Mounir Lamouri [mailto:mounir@lamouri.fr]
>> Sent: Thursday, July 17, 2014 3:05 AM
>> To: Tim Volodine; public-geolocation
>> Cc: Rich Tibbett; Rob Manson; Mandyam, Giridhar
>> Subject: Re: Proposal to add unit quaternion representation to the
>> Device Orientation event.
>>
>> On Thu, 17 Jul 2014, at 00:29, Tim Volodine wrote:
>> > Proposed interface changes:
>> >
>> > [Callback, NoInterfaceObject]
>> > interface OrientationQuaternion {
>> >   readonly attribute double x;
>> >   readonly attribute double y;
>> >   readonly attribute double z;
>> >   readonly attribute double w;
>> > }
>>
>> That sounds great! Should we consider adding DOMQuaternion to
>> http://dev.w3.org/fxtf/geometry/ instead of creating it inside this spec?
>>
>> -- Mounir
>>
>
Received on Thursday, 28 August 2014 10:07:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:51:08 UTC