Wikitude AR.RelativeLocation,如何提高陀螺仪精度?

Wikitude AR.RelativeLocation, how to increase gyroscope precision?

我正在使用 Wikitude(在 Android 上使用 Javascript API)在 AR 体验中显示透明视频。我没有放置视频的标记。该视频有它的坐标(相对于用户的位置),我想将它放在一个确切的位置,以便用户在其设备指向该方向时可以看到它。

为了做到这一点,我使用了一个 AR.RelativeLocation 对象并在特定位置放置了一个 VideoDrawable。

// the location
var location = new AR.RelativeLocation(null, 5, 5, 0);

// the video
var video = new AR.VideoDrawable("assets/transparentVideo.mp4", 5, {
    scale: {
        x: 1,
        y: 1,
        z: 1
    },
    isTransparent: true,
    onLoaded: this.worldLoaded
});
video.play(0) // the video starts immediately

// the GeoObject showing the video
var obj = new AR.GeoObject(location, {
    drawables: {
       cam: [video]
    }
});

问题是视频根本不稳定。当我转动我的设备时,我看到视频大致在它的位置,但它不是固定的:它会随着我的相机移动一段时间而移动,就好像它是通过使用运动传感器而不是陀螺仪放置的一样。有稳定的可能吗?

Wikitude Android SDK 目前不使用陀螺仪,而是结合加速度计和指南针来计算方位。也没有改变精度的方法。您可以尝试按照此处所述校准您的指南针:https://support.google.com/maps/answer/6145351?hl=en or here: https://android.stackexchange.com/questions/10145/how-can-i-calibrate-the-compass-on-my-phone 并尽量与可能影响指南针精度的事物保持距离,例如其他电子设备。