Weird magnetometer values
#3
Thanks for the reply and the measurements.
The links also do look very interesting!

To answer your last question: I believe the readings are consistent within a device (just checked with the BH).
Although I have to say that in general the values are kinda jumpy (which is why I made the script using running averages) and overall the sensor appears to be pretty sensitive. I get changes of a few 100 if I move the mouse closer to the phone (?).

EDIT:
When I thought about how to make the measurements I made it more complicated than it needs to be (separate rotations and using a "reference orientation").
Just "waving" the phone randomly makes a lot of sense actually and the "soft iron" corrected plot is a lot what you would expect to measure (basically a sphere).

As for the calibration: Currently, I think we would need to calibrate each device independently and save the calibration data (the weighted/scaled offsets) somewhere.
It's a bit hacky but I would've read the sensor values directly from /sys.
From what I understood iio-sensor-proxy does currently not work, because only magnetometers which have a "in_rot_from_north_magnetic_tilt_comp" entry in sysfs are supported.

If I understand correctly there would be 2 possible ways to fix this. Either fix the driver to include the entry (including "online" calibration - otherwise we can't possible know what to put in "in_rot_from_north_magnetic_tilt_comp") or do the calibration in iio-sensor-proxy and support polling/non calibrated magnetometers.


Messages In This Thread
Weird magnetometer values - by devrtz - 07-25-2020, 04:30 AM
RE: Weird magnetometer values - by migmatite - 07-25-2020, 09:38 AM
RE: Weird magnetometer values - by devrtz - 07-25-2020, 11:05 AM
RE: Weird magnetometer values - by devrtz - 07-25-2020, 05:32 PM
RE: Weird magnetometer values - by migmatite - 07-27-2020, 02:46 AM
RE: Weird magnetometer values - by devrtz - 07-27-2020, 10:22 AM
RE: Weird magnetometer values - by migmatite - 07-27-2020, 11:31 AM
RE: Weird magnetometer values - by wibble - 07-27-2020, 12:54 PM
RE: Weird magnetometer values - by devrtz - 07-28-2020, 07:53 AM
RE: Weird magnetometer values - by wibble - 07-29-2020, 10:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to apply thermal zones values jojuma 3 2,569 04-13-2022, 12:15 PM
Last Post: Fish

Forum Jump:


Users browsing this thread: 2 Guest(s)