3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iPhoneで取得可能な磁気の種類

Last updated at Posted at 2020-03-15

Core Motion

CMMotionManagers > CMMagnetometerクラス > magneticFieldプロパティ

地球の磁場 + 周囲の磁場 + デバイスのバイアス

  • 磁力計からの生のデータを読み取る
  • デバイス自体で生成される磁場の影響を大きく受ける
  • 希土類磁石を近づけない限り、何にも反応しない。デバイス内の磁場は、局所的な外部の磁場や地球の磁場よりもはるかに重視される。

CMDeviceMotion > CMCalibratedMagneticFieldプロパティ

地球の磁場 + 周囲の磁場 - デバイスバイアス

  • デバイスバイアス(オンボード磁場)に対して補正された磁力計の読み取り値
  • iPhone内部の磁場の影響の除去

CoreLocation

CLLocationManager > CLHeading

地球の磁場 - 周囲の磁場 - デバイスバイアス

  • フィルタリングしてローカルの外部磁場を除去
  • 多くの種類の電子機器に見られる固定磁石から発生する磁場など、局所的な磁場の影響を受ける可能性がある。
  • 局所的な外部磁場というのに、建物の鉄骨による影響の除去も含まれる。
  • 他のセンサーからのデータを使用して、磁力計データを安定させてる。
  • 磁場 x、y、zの生のデータは得られない。

参考

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

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?