Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up gyro calibration #13632

Merged
merged 3 commits into from
Nov 29, 2019
Merged

Speed up gyro calibration #13632

merged 3 commits into from
Nov 29, 2019

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented Nov 29, 2019

  • speedup gyro calibration from 20s to 1s
  • slightly stricter motion detection check (change the threshold from 0.573 deg to 0.4), as the existing one allowed for quite a bit of motion.
  • remove unused gyro scale calibration parameters

The existing calibration collects 5000 samples, which is unnecessary, so this PR reduces it to 250 (1 second). Tests showed that the standard deviation of the estimated offsets over 10 runs is in the same range for 1s as for 20s (the increase in temperature has a bigger effect on the offset). This was tested with an MPU9250, ICM20608, ICM20689 and BMI088.

In case of motion, calibration is restarted automatically, maximally 30 times (same as existing behavior).

It's not required to take that many samples, 1 second is enough.
This is confirmed by looking at the standard deviation over 10 calibrations:
it is in the same order as with 20 seconds (the effect of temperature
increase has a bigger effect).
From 0.573 deg to 0.4.

And some cleanup.
@Antiheavy
Copy link
Contributor

Good change!

@dagar dagar merged commit 5ff83ef into master Nov 29, 2019
@dagar dagar deleted the gyro_calib_improvements branch November 29, 2019 16:28
@mrpollo mrpollo mentioned this pull request Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants