9 Replies
Latest reply on May 3, 2019 4:06 AM by Claude31
Level 1 (0 points)

I am wondering what unit is given by the magnetometer https://developer.apple.com/documentation/coremotion/cmmotionmanager/1616032-magnetometerdata?language=objc. Does anyone know?

• ###### Re: In what unit is the value given by magnetometer?
Level 8 (8,455 points)

it should be tesla (in SI)

Magnetic fields

Magnetic fields are vector quantities characterized by both strength and direction. The strength of a magnetic field is measured in units of tesla in the SI units, and in gauss in the cgs system of units. 10,000 gauss are equal to one tesla.[1]

Source: wikipedia

To check if it is nanoTesla or a different sub unit, measur the field in open space (far from any artificial magnetic field)

Knowing that the Earth's magnetic field can vary from 20,000 to 80,000 nT depending on location,

if you get a value in the tens of thousands (10 000 to 90 000), unit is nano Tesla.

If you get a value in the tens (10 to 90), then it is micro tesla

If you get a value in the ten millis (0.01 to 0.09), then it is milli tesla

What value do you get ?

• ###### Re: In what unit is the value given by magnetometer?
Level 1 (0 points)

I get 90 when reading x-axis. When calculating total magnetic influence I get 570. I used this formula to get the total magnetic influence: https://stackoverflow.com/questions/9349376/sensormanager-magnetic-field-range.

Using the raw data seem to be unreliable. Non understable?

So I will probably go with the cmdevicemotion instead

https://developer.apple.com/documentation/coremotion/cmdevicemotion?language=objc.

• ###### Re: In what unit is the value given by magnetometer?
Level 9 (15,495 points)

Hardware specs are here, I believe: h ttps://www.akm.com/akm/en/file/datasheet/AK8963C.pdf

And I agree, raw data, in your app example/dev-level, is not meaningful. If the related API(s) won't cater to your (unstated) goals, feel free to file an enhancement request via the bug reporter link below, adding your report # to your thread for reference, thanks and good luck.

• ###### Re: In what unit is the value given by magnetometer?
Level 8 (8,455 points)

After searching, I think it is given in micro tesla (typical value is 45).

Have a look here

h ttps://www.kjmagnetics.com/blog.asp?p=iphone-fun

• ###### Re: In what unit is the value given by magnetometer?
Level 8 (8,455 points)

Surprised you get 570.

What are the 3 components of the field vector ?

• ###### Re: In what unit is the value given by magnetometer?
Level 1 (0 points)

It is (x: 92, y: 105, z: -551).

Which is the rawdata given by cmmotionmanager.

I downloaded a teslameter app which says (x: -14, y: 9, z: -40) μT in the same spot.

• ###### Re: In what unit is the value given by magnetometer?
Level 8 (8,455 points)

551 value is surprising.

May be you have some magnet that is perturbating the measure and creates a large vertical component.. It is very sensitive.

Try to measure outside, on open field, far from metallic parts…

• ###### Re: In what unit is the value given by magnetometer?
Level 1 (0 points)

CMDeviceMotion which gives the calibrated values gave me normal readings in μT, microtesla. (x: -7, y: 7, z: -44).

• ###### Re: In what unit is the value given by magnetometer?
Level 8 (8,455 points)

So, the answer to your initial post is : unit is micro tesla.

And you found out that CMDeviceMotion gives more credible values.

The total field is 45.1, which looks like Earth magnetic field.

Good luck for continuation of your project and don't forget to mark the thread as closed.