W3C home > Mailing lists > Public > public-device-apis-log@w3.org > April 2017

Re: [magnetometer] Add RawMagnetometer, for uncalibrated readings.

From: Anssi Kostiainen via GitHub <sysbot+gh@w3.org>
Date: Thu, 06 Apr 2017 11:00:05 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-292139652-1491476403-sysbot+gh@w3.org>
@tobie 
>We need to document this stuff, or we're going to get huge interop issues. (from https://github.com/w3c/magnetometer/pull/21#issuecomment-291146184)

I think how the implementation transforms the uncalibrated values into calibrated values is an implementation detail, or better, a quality of implementation issue. You should not expect someone to write a JS implementation to do the correction (someone more knowledgeable on the subject to correct me if I'm wrong).

What we need to document in the spec I believe (and what we have done in this PR) is to define what type of corrections implementations must apply to:
* calibrated magnetic field values reported by `Magnetometer`, and
* uncalibrated magnetic field values reported by `RawMagnetometer`.

This is the proposed spec text from this PR:

>The **calibrated magnetic field** is a magnetic field _with_ **hard iron distortion** and **soft iron distortion** correction applied.

>The **uncalibrated magnetic field** is the magnetic field _without_ **hard iron distortion** correction and _with_ **soft iron distortion** correction applied, and as such reports changes in the magnetic field caused by magnetized objects moving near the magnetometer.

The hard iron distortion and soft iron distortion are defined in this PR as follows:

>**Hard iron distortion** is created by objects that produce a magnetic field, such as magnetized iron.

> **Soft iron distortion** stretches or distorts the magnetic field and is caused by metals such as nickel and iron.

Proposals for improvements, clarifications welcome.

@riju, could you please check the rest of the concerns raised in this issue (if any) are addressed satisfactorily?

-- 
GitHub Notification of comment by anssiko
Please view or discuss this issue at https://github.com/w3c/magnetometer/pull/21#issuecomment-292139652 using your GitHub account
Received on Thursday, 6 April 2017 11:00:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 12:18:53 UTC