Re: DeviceOrientation comments

On Jul 22, 2010, at 4:53 AM, Dean Jackson wrote:

> Hi,
> 
> Apologies in advance if I'm repeating things here. I haven't read through the entire archives to check for duplicate comments or issues that were already closed.
> 
> BTW - I'm commenting on http://dev.w3.org/geo/api/spec-source-orientation.html
> which is currently dated 10 March 2010, although I see comments in the email archives suggesting updates since then. 
> 
> My main comment/proposal is that Accelerometer Event should include the ability to return rotation around the 3 axes. Along these lines, it would be nice if it also included the direction of gravity so that you could easily determine the acceleration the user is providing.
> 
> If this is accepted, then the name of the Event is slightly misleading, because it returns more than acceleration. I propose it be renamed Motion Event.
> 
> The specification currently says that implementations "must set the values of the unknown angles to null", yet the values are defined as doubles. Not all languages will be able to do this, so it seems necessary to have some query methods or properties indicating the availability of values. I see a suggestion via email to throw NOT_AVAILABLE (although I think you want NOT_SUPPORTED_ERR), but that means you have to try to read the value to see if it exists (and catch any exceptions).

Another possibility is to use NaN for unknown values.

Regards,
Maciej

Received on Friday, 23 July 2010 01:29:12 UTC