Which iOS class/code returns the magnetic North?

前端 未结 2 1611
礼貌的吻别
礼貌的吻别 2020-12-31 19:34

I want to get the device\'s deviation from the magnetic North in degrees, and use that value in some code I\'m writing.

I don\'t want to use the device\'s location

2条回答
  •  误落风尘
    2020-12-31 20:10

    You need to fuse sensors to mimic the apple applications. They use the gyro accelerometer and magnetometer, and advanced mathmatics you may or may not have learned to produce such clean results. Good luck. You probably won't be able mimic them.

提交回复
热议问题