W3C home > Mailing lists > Public > public-device-apis-log@w3.org > November 2016

Re: [magnetometer] Provide API to access uncalibrated magnetometer values

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Thu, 03 Nov 2016 22:02:50 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-258287772-1478210569-sysbot+gh@w3.org>
This is pretty cool.

Offering an option 3 which I think is acceptable in the calibration 
case (but not in the fusion case):

```webidl
[Constructor(optional MagnetometerSensorOptions sensorOptions)]
interface Magnetometer : Sensor {
  readonly attribute MagnetometerReading? reading;
};

dictionary MagnetometerSensorOptions : SensorOptions {
  boolean raw = false;
};

[Constructor(MagnetometerReadingInit magnetometerReadingInit)]
interface MagnetometerReading : SensorReading {
    readonly attribute double x;
    readonly attribute double y;
    readonly attribute double z;
    readonly attribute boolean raw;
};

dictionary MagnetometerReadingInit {
  required double x = 0;
  required double y = 0;
  required double z = 0;
  required boolean raw;
};
```

@rwaldron: thoughts? (background reading: 
http://smus.com/magnetic-input-mobile-vr/).

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at 
https://github.com/w3c/magnetometer/issues/16#issuecomment-258287772 
using your GitHub account
Received on Thursday, 3 November 2016 22:02:57 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:52 UTC