主题
MagnetometerReadingEvent 继承自: Event['Magnetometer']
来自磁力计的传感器采样数据。
磁力计测量传感器周围的环境磁场,针对三个维度轴各返回一个以微特斯拉 μT 为单位的数值。
请注意,这些采样数据可能同时受到地球磁场以及设备自身金属、附近磁体等局部因素的影响,不过大多数设备会对这些因素进行补偿。
指南针是磁力计数据的一种常见用途示例。
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
x | float | required | Ambient magnetic field on the X axis, in microteslas (uT). |
y | float | required | Ambient magnetic field on the Y axis, in uT. |
z | float | required | Ambient magnetic field on the Z axis, in uT. |
timestamp | datetime | required | Event timestamp. |