[go: nahoru, domu]

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

Better Gyro Fusion #784

Draft
wants to merge 4 commits into
base: emuflight-1.0.0-master
Choose a base branch
from

Conversation

nerdCopter
Copy link
Member
  • Cherry-Pick @Quick-Flash code
  • exclude SPRACINGH7CL SPRACINGH7EF

This code looks at the variance over the last 8 samples and uses this to determine how to fuse dual gyros together. Gyros with more variance will be fused less while the gyro with less variance will be fused at a higher percent.

To test this code set your debug mode to fusion and set the gyro_to_use in the cli to be both_variance. Debug 0 is gyro1, debug 1 is gyro 2, debug 2 is the fused gyro data. It should be slightly cleaner than the other gyro signals.

@nerdCopter nerdCopter changed the title 20220329 cherry pick better gyro fusion Better Gyro Fusion Mar 29, 2022
@nerdCopter nerdCopter marked this pull request as draft May 2, 2022 13:17
@nerdCopter nerdCopter force-pushed the 20220329_cherry_pick_better_gyro_fusion branch from a87bc6f to 29365cc Compare May 26, 2022 13:30
@nerdCopter nerdCopter force-pushed the 20220329_cherry_pick_better_gyro_fusion branch from 29365cc to 6413805 Compare May 26, 2022 15:51
@nerdCopter nerdCopter force-pushed the 20220329_cherry_pick_better_gyro_fusion branch from 6413805 to 1e0edeb Compare June 2, 2022 15:04
@nerdCopter nerdCopter force-pushed the emuflight-1.0.0-master branch 2 times, most recently from 0c4ee8b to 3aab740 Compare June 11, 2022 20:52
@nerdCopter nerdCopter force-pushed the 20220329_cherry_pick_better_gyro_fusion branch from 1e0edeb to 7d2cce7 Compare July 15, 2022 14:47
@nerdCopter
Copy link
Member Author
  • what happens if a gyro goes bad?
  • what happens if one is always bad vs going bad mid-flight.
  • can it automatically compensate for bad gyro or will things get worse?
  • (i.e. does it need additional gyro checks or compensation-code)

@Quick-Flash
Copy link
Member
  • what happens if a gyro goes bad?

    • what happens if one is always bad vs going bad mid-flight.

    • can it automatically compensate for bad gyro or will things get worse?

    • (i.e. does it need additional gyro checks or compensation-code)

Comparing this to the current gyro fusion, this code will make the gyro that performs worse be ignored more than one that is still working right. So if one gyro went bad it would fly better with this code than it would without this code. However, it isn't good enough to totally ignore a bad gyro and will still perform better if the bad gyro is just disabled completely. Perhaps it could be modified so that if it detects its constantly leaning hard towards one gyro that it will just disable the other gyro and only rely on one.
TLDR, it will work better than the current gyro fusion if one gyro goes bad, but it is still better to disable a bad gyro, but it may be possible to change that.

@nerdCopter nerdCopter force-pushed the emuflight-1.0.0-master branch 2 times, most recently from fe70257 to fe7710c Compare November 22, 2022 19:11
@nerdCopter nerdCopter force-pushed the 20220329_cherry_pick_better_gyro_fusion branch from 7d2cce7 to 4cf2e5c Compare November 22, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants