redpaperheart / Cinder-Wax9

3 stars 0 forks source link

Need to add calibration routine #1

Open araid opened 9 years ago

araid commented 9 years ago

Calculated orientation drifts off too easily. A possible cause might be that we don't have any calibration process for the sensors.

From the WAX9 developers guide:

The linearity, offset and noise level of the sensor is described in the device
datasheet; some degree of calibration may be required for precision
measurements.

Not sure where this data sheet is, though.

Some references:

halsmgd commented 9 years ago

Yes, I too am interested in calibrating my WAX9. There was very noticeable Yaw drift.

Looking a the demo app's code, primarily arhs.c and azimuth.c, I was surprised to see it ignores the magnetometer readings coming from WAX9. I tweaked the code and fed the magnetometer data into Madgwick & Mahony's AHRS algorithms. This actually made the yaw drift even worse...or I should say that it began to gravity towards a fixed-point orientation as I held the sensor steady.

Guess I'm going to have to learn about magnetometer calibration. Or perhaps those AHRS algorithms are not using the data correctly.

araid commented 9 years ago

Yes. So there are two things here, one is applying some sort of offset calibration to the gyroscope data, and the other is using the magnetometer part of Madgwick's algorithm. The input for that part needs to be calibrated first, which I didn't have enough time to learn how to do.

Keep us posted if you make any improvements!