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

Option 4?

```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 double xBias;
  readonly attribute double yBias;
  readonly attribute double zBias;
  readonly attribute boolean raw;
};

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


When `raw` is `false`, the value of the *Bias properties would default
 to 0 and remain 0. 


-- 
GitHub Notification of comment by rwaldron
Please view or discuss this issue at 
https://github.com/w3c/magnetometer/issues/16#issuecomment-258522515 
using your GitHub account

Received on Friday, 4 November 2016 19:11:56 UTC