In iOS, what is the difference between the Magnetic Field values from the Core Location and Core Motion frameworks?

前端 未结 4 1896
走了就别回头了
走了就别回头了 2020-12-04 06:26

I have two ways of getting the magnetic fields (strength, x, y, and z) using the iOS device\'s magnetometer.

1) Core Location
Used the CLHeading from CLL

4条回答
  •  隐瞒了意图╮
    2020-12-04 07:00

    I think the magnetometerData.magneticField it telling you the acceleration, not the position (hence why you get large values moving from still to moving) whereas the location manager provides data on the direction the device is pointing in.

提交回复
热议问题