pozyxLabs / Pozyx-Arduino-library

The Arduino library for use with the pozyx accurate indoor positioning system.
https://www.pozyx.io
MIT License
78 stars 53 forks source link

POZYX_CALIB_STATUS register #21

Closed ivannunyadambiz closed 8 years ago

ivannunyadambiz commented 8 years ago

Actually I'm not entirely sure what to call this. SYS Calib Status usually is not set (the rest is). But I actually had it the other way round. Now, I cannot tell how severe this is, as I'm not entirely sure what to do with the information this register offers.

samuelvdv commented 8 years ago

Hello, I have added more information about this mysterious register to the documentation. It can be found here: https://www.pozyx.io/Documentation/Datasheet/RegisterOverview Hopefully it is more clear now.

samuelvdv commented 8 years ago

Hello, I have added more information about this mysterious register to the documentation. It can be found here: https://www.pozyx.io/Documentation/Datasheet/RegisterOverview Hopefully it is more clear now.

ivannunyadambiz commented 8 years ago

Thanks. I just booted the arduino and got:

Calibration Status: MAG: fail ACC: fail GYR: ok SYS: fail

I made a couple of movements as suggested, reset the arduino and got:

Calibration Status: MAG: ok ACC: fail GYR: ok SYS: ok

Which I believe should not be possible? SYS should fail, as ACC is not calibrated?

ivannunyadambiz commented 8 years ago

I actually managed to get ACC calibrated, but SYS comes on too early

samuelvdv commented 8 years ago

The system calibration indicates if the sensors are sufficiently calibrated to compute the orientation of the device by fusing all the data from the motion sensors.

The accelerometer already has an internal initial calibration which is mostly sufficient in combination with the gyroscope and magnetometer, hence, even when the accelerometer isn't completely calibrated, it is still sufficient to obtain the orientation.

When the magnetometer is not calibrated, or when the sensor is close to an external magnetic field, it is impossible to accurately measure the absolute heading. You can verify this if you continuously print out the calibration status: bringing some metal or a magnet close to the pozyx board (in fact the motion sensor) will make SYS and MAG status go down. When it can be recognized that this occurs the magnetomer will not be used to obtain the orientation of the device and you will see that after a while the heading will drift away.

To conclude, the sys calib status gives you an indication whether the orientation data is reliable.

Please check out this processing sketch for Pozyx that shows all the orientation data

I'm considering making a video about this actually. We'll see :)