Hello Marco
Magnetometer LSM303AGR is working fine now or at least looks like it.
But we have other problem with E-compass.
We can't receive true direction of North.
We are thinking that the main problem in cooked accelerometer values which were not calibrated correctly.
How can we normalize values correctly to calculate pitch and roll of the local level frame without errors?
We made text example for LSM303AGR on the basis of LSM303DLH example.
So LSM303AGRcfg structure is defined by next instruction:
static const LSM303AGRConfig LSM303AGRcfg = { .i2cp = &I2CD1, .i2ccfg =
&i2ccfg, .accsensitivity = NULL, .accbias = NULL, .accfullscale =
LSM303AGR_ACC_FS_4G, .accodr = LSM303AGR_ACC_ODR_100Hz,
.compsensitivity = NULL, .compbias = NULL, .compodr = LSM303AGR_COMP_ODR_50HZ,
};
Then raw accelerometer values (x,y,z) = (-448 ,-64 ,7744) are transformed to cooked accelerometer values (-61.4399986 -15.3599997 929.279968) by
multiplication ob the value of sensibility =0.120.
We realize that it is wrong.
We read an article "AN3192 application note Using "LSM303DLH for a tilt compensated electronic compass"
Can we use calibration algorithm from this article for calibration of LSM303AGR accelerometer?
Best Regards
Alexey Gavrilov
Maxim Vasin
Zero compass values in I2C-LSM303DLHC example
Moderators: RoccoMarco, barthess
Who is online
Users browsing this forum: No registered users and 11 guests