【问题标题】:How do I get compass heading from DeviceOrientation in the Google Glass Browser?如何从 Google Glass 浏览器中的 DeviceOrientation 获取指南针方向?
【发布时间】:2013-07-23 18:39:42
【问题描述】:

自固件版本 XE7 起内置于 Google Glass 的网络浏览器提供 DeviceOreientation events,但这些值似乎并非来自预期的参考框架。如何从中获得正确的指南针方向? Glass 正常放置在头部:

设备方向事件

测试版

     90  upright and level
    -90  inverted and level
      0  looking straight up or down

伽马

     90  right ear towards floor
    180  looking straight up
270/-90  left ear down
      0  looking straight down

阿尔法

当 Glass 处于水平状态时,此属性不稳定(对于使用指南针方向,确定佩戴者正在看的位置应该是最有用的方向)。只有当 Glass 倾斜远高于或低于地平线时,它才会提供稳定的读数。

高于水平

     90  North
      0  East
    180  West
    270  South

低于水平

    270  North
    180  East
      0  West
     90  South

【问题讨论】:

    标签: javascript html compass-geolocation google-glass


    【解决方案1】:

    也许你可以从这个新推出的sample 获得一些关于如何控制指南针的想法

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多