jremington / ICM_20948-AHRS

Mahony Fusion Filter and Tilt compensated compass for ICM_20948
32 stars 7 forks source link

Accelerometer Calibration. #7

Closed jasvinder1079 closed 6 months ago

jasvinder1079 commented 6 months ago

Hi @jremington, I went through your library and understand that, After collecting calibration data ,the python script you provided is for calibration will take data from csv files are provide calibrated data which we can use in get_scaled_IMU API and then we'll calibrated roll pitch and yaw. But the python scripts is for magnetometer only as per your code ,How accelerometer calibration is happening here?

jasvinder1079 commented 6 months ago

One more thing, If python code is there for calibration, Do we need to use Magneto.c file( is this also for calibration ?). and others file like gravity_demo and icm_20948_tilt_compesation what's use of these ?

jremington commented 6 months ago

Magneto.c and calibrate3.py do the same thing, using different programming languages.

The file gravity_demo.ino calculates and returns the estimated direction of "down" in the sensor frame of reference, which is useful for subtracting the acceleration due to gravity from the total acceleration. The tilt compensation code is a tilt-compensated magnetic compass, also for navigation.