How to improve accuracy of accelerometer and compass sensors?

后端 未结 4 1264
北荒
北荒 2021-02-01 11:07

i am creating an augmented reality app that simply visualices a textview when the phone is facing a Point of Interest (wich gps position is stored on the phone). The textview is

4条回答
  •  执念已碎
    2021-02-01 11:15

    I solved it with a simple trick. This will delay your results a bit but they surly avoid the inaccuracy of the compass and accelerometer.

    Create a history of the last N values (so save the value to an array, increment index, when you reach N start with zero again). Then you simply use the arithmetic average of the stored values.

提交回复
热议问题