Re: [deviceorientation] Add automation support using WebDriver (#122)

> > * What kind of virtual sensor type to use for the deviceorientation and deviceorientationabsolute events. We can clearly use "accelerometer", "linear-acceleration" and "gyroscope" for DeviceMotionEvent, but there's no clear mapping to one or more sensor types for DeviceOrientationEvent. One could require "accelerometer" and "gyroscope" for relative orientation, for example, but implementations are arguably free to obtain the Euler angles data from the platform in another manner altogether, so I'm tempted to just go with making this specification define additional virtual sensor types, "relative-orientation-data" and "absolute-orientation-data" that takes Euler angles directly.
> 
> I'm leaning towards the virtual sensors defined in https://w3c.github.io/orientation-sensor/#automation, the only issue being that they use quaternions instead of Euler angles.

The simplest option would then be having some extra sensor types (e.g. "absolute-orientation-euler" and "relative-orientation-euler") with a custom parsing algorithm that reads alpha, beta and gamma values and ensures they are within the ranges we allow for each ([0, 360) for alpha, for example).

I can start working on a PR if this approach (including building it upon the virtual sensor infrastructure from Generic Sensors) sounds sane enough.

-- 
GitHub Notification of comment by rakuco
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/122#issuecomment-1813089460 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 November 2023 18:56:24 UTC