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

Initialize using gravity vectors to exclude the influence of the orientation during initialization #79

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Jan 31, 2024

  1. The previous method of subtracting gravity when calibrating accelerom…

    …eters required that the Z-axis be exactly parallel to and upward of the direction of gravity, but now a normalized gravity vector is used. This algorithm for obtaining the normalized vector could perhaps be replaced by "Fast Inverse Square Root".
    Zhaosn committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    33d27f4 View commit details
    Browse the repository at this point in the history
  2. Never forget the concept of vectors now, huh?

    Unit vectors with offsets close to zero are literally monsters!
    Zhaosn committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    66c7b9d View commit details
    Browse the repository at this point in the history
  3. It's worth to note that my tests show it's maybe better to keep the c…

    …ode unchanged and keep the z-axis calibrated upwards, just make sure the z-axis was calibrated upwards. Now all directions can be just as bad, and the calibration error is related to epsilon
    Zhaosn committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    a19a401 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Update MPU6050.cpp

    If the acceleration reading is [0 0 0] at the beginning, it causes the unit vector to return [nan nan nan nan], which causes the ITerm always be nan, leading to unconvergence
    
    Signed-off-by: Zhaosn <[email protected]>
    Zhaosn authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    fbb3de4 View commit details
    Browse the repository at this point in the history
  2. Update MPU6050.cpp

    Signed-off-by: Zhaosn <[email protected]>
    Zhaosn authored Feb 1, 2024
    Configuration menu
    Copy the full SHA
    9352961 View commit details
    Browse the repository at this point in the history