Skip to content

Commit

Permalink
Add "Local Coordinate System" concept
Browse files Browse the repository at this point in the history
This is required for fixing w3c#257
  • Loading branch information
Mikhail Pozdnyakov committed Jan 30, 2018
1 parent dab8819 commit f1f43e0
Show file tree
Hide file tree
Showing 2 changed files with 269 additions and 205 deletions.
26 changes: 25 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,28 @@ through a process called [=sensor fusion=].
[=calibration|Calibrated=] [=raw sensor readings=] are referred to as <dfn>sensor readings</dfn>,
whether or not they have undergone [=sensor fusion=].

If the [=sensor readings=] represent spatial measurements (e.g.
acceleration, angular velocity), they must be resolved in
a coordinate system which is called <dfn export>local
coordinate system</dfn>.

Scalar physical quantities (i.e. temperature) do not require
a [=local coordinate system=] for resolution.

The [=local coordinate system=] normally used in a mobile device is
a Cartesian coordinate system which is defined relatively to the
device’s screen, so that X and Y axes are parallel to the screen
dimentions and Z axis is perpendicular to the screen surface.

[=extension specification|Extensions to this specification=]
may explicitly define the [=local coordinate system=] for the associated
[=sensor type=] or make it configurable per {{Sensor}} object.

Depending on the number of orthogonal axes in which the measurements
can be simultaneously performed by a [=device sensor|sensor=], this
[=device sensor|sensor=] can be <dfn>uniaxial</dfn>, <dfn>biaxial</dfn>,
or <dfn>triaxial</dfn>.

The term <dfn id="concept-platform-sensor">platform sensor</dfn> refers to platform interfaces,
with which the user agent ineracts to obtain [=sensor readings=] for a single [=sensor type=]
originated from one or several [=device sensors=].
Expand Down Expand Up @@ -565,7 +587,7 @@ for the given [=sensor types=] they are targeting.
through a process called <dfn>sensor fusion</dfn>.
This process provides [=high-level|higher-level=] or
more accurate data (often at the cost of increased latency).
For example, the [=sensor readings|readings=] of a three-axis magnetometer
For example, the [=sensor readings|readings=] of a [=triaxial=] magnetometer
needs to be combined with the [=sensor readings|readings=] of an accelerometer
to provide a correct bearing.

Expand Down Expand Up @@ -1409,6 +1431,8 @@ Gets the {{DOMException}} object passed to {{SensorErrorEventInit}}.

1. If |sensor_instance|.{{[[state]]}} is "activated",
1. Let |readings| be the [=latest reading=] of |sensor_instance|'s related [=platform sensor=].
1. If the [=extension specification=] defines a [=local coordinate system=] for |sensor_instance|,
1. Remap |readings| values to the [=local coordinate system=].
1. Return |readings|[|key|].
1. Otherwise, return null.
</div>
Expand Down
Loading

0 comments on commit f1f43e0

Please sign in to comment.