Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Automation section after w3c/sensors#470 #78

Merged
merged 5 commits into from
Oct 25, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 13 additions & 23 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ urlPrefix: https://w3c.github.io/sensors/; spec: GENERIC-SENSOR
text: local coordinate system
text: check sensor policy-controlled features; url: check-sensor-policy-controlled-features
text: supported sensor options
text: automation
text: mock sensor type
text: mock sensor reading values
urlPrefix: https://w3c.github.io/accelerometer/; spec: ACCELEROMETER
type: dfn
text: acceleration
Expand Down Expand Up @@ -501,31 +498,24 @@ Abstract Operations {#abstract-operations}

Automation {#automation}
==========
This section extends the [=automation=] section defined in the Generic Sensor API [[GENERIC-SENSOR]]
to provide mocking information about the device's physical orientation in relation to a three
dimensional Cartesian coordinate system for the purposes of testing a user agent's implementation
of {{AbsoluteOrientationSensor}} and {{RelativeOrientationSensor}} APIs.

<h3 id="mock-orientation-sensor-type">Mock Sensor Type</h3>
This section extends [[GENERIC-SENSOR#automation]] by providing [=Orientation Sensor=]-specific virtual sensor metadata.

The {{AbsoluteOrientationSensor}} class has an associated [=mock sensor type=] which is
<a for="MockSensorType" enum-value>"absolute-orientation"</a>, its [=mock sensor reading values=]
dictionary is defined as follows:
<h3 dfn> Absolute Orientation Sensor automation</h3>
JuhaVainio marked this conversation as resolved.
Show resolved Hide resolved

<pre class="idl">
dictionary AbsoluteOrientationReadingValues {
required FrozenArray&lt;double>? quaternion;
};
</pre>
The [=per-type virtual sensor metadata=] [=map=] must have the following [=map/entry=]:
: [=map/key=]
:: "`absolute-orientation`"
: [=map/value=]
:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/virtual sensor type=] is [[#absoluteorientationsensor-model|AbsoluteOrientationSensor]] and [=reading parsing algorithm=] is [=parse quaternion reading=].
JuhaVainio marked this conversation as resolved.
Show resolved Hide resolved

The {{RelativeOrientationSensor}} class has an associated [=mock sensor type=] which is
<a for="MockSensorType" enum-value>"relative-orientation"</a>, its [=mock sensor reading values=]
dictionary is defined as follows:
<h3 dfn>Relative Orientation Sensor automation</h3>

<pre class="idl">
dictionary RelativeOrientationReadingValues : AbsoluteOrientationReadingValues {
};
</pre>
The [=per-type virtual sensor metadata=] [=map=] must have the following [=map/entry=]:
: [=map/key=]
:: "`relative-orientation`"
: [=map/value=]
:: A [=virtual sensor metadata=] whose [=virtual sensor metadata/virtual sensor type=] is [[#relativeorientationsensor-model|RelativeOrientationSensor]] and [=reading parsing algorithm=] is [=parse quaternion reading=].

Acknowledgements {#acknowledgements}
================
Expand Down
Loading