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

Initial improvements for use cases document #256

Merged
merged 3 commits into from
Aug 25, 2017

Conversation

alexshalamov
Copy link

Fixes #181

Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these improvements, approved with nits.

usecases.bs Outdated


Use Cases {#usecases}
Use Cases and requeiements {#usecases-and-requirements}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requirements

usecases.bs Outdated
=====================

Displaying the position of the user on a map in real time {#display-realtime}
---------------------
The use cases and requirements for the sensors may differ from one application to another. In
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove "may"

usecases.bs Outdated

Environmental sensors might be used in applications like: home automation, accesibility, personal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accessibility

usecases.bs Outdated

Using the proposed Generic Sensor API, application level code looks like this:
- [=Ambient light sensor=]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usecases.bs Outdated
Using the proposed Generic Sensor API, application level code looks like this:
- [=Ambient light sensor=]
- [=Proximity sensor=]
- [=Magnetometer=]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usecases.bs Outdated

<div class="example">
In this example, we create simple linear free fall detection sensor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a simple

usecases.bs Outdated
In this example, we create simple linear free fall detection sensor.

<pre highlight="js">
class FreeFallSensor extends Accelerometer {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @kenchris to review the JS code style of the examples.

usecases.bs Outdated

<div class="example">
In this simplified example, we define FusionSensor class that aggregates multiple sources and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FusionSensor

usecases.bs Outdated
}

// Stateful algorithm that finds brightest spot during calibration phase and uses
// it as a fixed frame of reference to calculate relative orientation from brigtest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brightest

usecases.bs Outdated

- Reed switch and hall effect sensors
- Significant motion, no motion, tap, flat, free fall, low-g and high-g sensors
- Laser or infrared switch sensors

Security and Privacy Considerations {#security-and-privacy}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this section from this use cases document, needed only for API specs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anssiko I removed it initially, but then, bikeshed throws an error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try Status: NOTE, and see if that helps. Or build with -f.

usecases.bs Outdated
}
}

get inFreeFall {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inFreeFall() as pointed out elsewhere.

usecases.bs Outdated

This group of sensors is based on inertia and relevant measuring concepts. Usually, inertial
sensors are part of IMU (Inertial Measurements Unit) that measure [=acceleration=] using
accelerometer and [=rotational rate=] using gyroscope. [=Magnetometer=] might be part of IMU and

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to Gyroscope?

usecases.bs Outdated
set onreading(func) {
super.onreading = () => {
this.inFreeFall_ = Math.hypot(super.x, super.y, super.z) < 0.5;
func();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't func() be called optionally?

Copy link

@pozdnyakov pozdnyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anssiko
Copy link
Member

anssiko commented Aug 25, 2017

My review comments have been addressed, feel free to land this @alexshalamov.

@alexshalamov alexshalamov merged commit ce67aeb into w3c:master Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants