Skip to content

Commit

Permalink
Merge pull request #340 from pozdnyakov/coordinate_system
Browse files Browse the repository at this point in the history
Add "Local Coordinate System" concept
  • Loading branch information
Mikhail Pozdnyakov committed Feb 1, 2018
2 parents dab8819 + 67f96b1 commit 788d323
Show file tree
Hide file tree
Showing 2 changed files with 292 additions and 205 deletions.
39 changes: 38 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ spec: webidl; type:dfn; text:identifier
"title": "Sensor Use Cases",
"date": "2017",
"status": "Note"
},
"COORDINATES-TRANSFORMATION": {
"authors": [
"George W. Collins, II"
],
"id": "COORDINATES-TRANSFORMATION",
"href": "http://ads.harvard.edu/books/1989fcm..book/Chapter2.pdf",
"title": "The Foundations of Celestial Mechanics",
"date": "2004",
"status": "Informational",
"publisher": "Pachart Foundation dba Pachart Publishing House"
}
}
</pre>
Expand Down Expand Up @@ -495,6 +506,29 @@ 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 <dfn export>local coordinate system</dfn> that represents
a reference frame for these [=sensor readings|readings=].
A [=device sensor|sensor=] that provides such [=sensor readings|readings=]
is referred to as <dfn export>spatial sensor</dfn>.

A [=spatial sensor=] can be <dfn>uniaxial</dfn>, <dfn>biaxial</dfn>,
or <dfn>triaxial</dfn>, depending on the number of orthogonal axes in
which it can perform simultaneous measurements.

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 relative 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.

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 +599,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 +1443,9 @@ 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 (see [[COORDINATES-TRANSFORMATION]]) |readings| values to the
[=local coordinate system=].
1. Return |readings|[|key|].
1. Otherwise, return null.
</div>
Expand Down

0 comments on commit 788d323

Please sign in to comment.