-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Better yaw estimation for mulitirotor(magless operation) #11046
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
base: master
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Over the last years of my testing with INAV 7.1 through to 8.1. Using a wide range of GPS modules. Which include quality M8, M9 and a broad quality range of M10's. I've notice that GPS is not really any better in general.. Or at least its handling for INAV copter use is far from as consistent as it used to be, with the same higher quality M8 modules, and most of the cheaper M10 modules. The reason I raise this matter. Is because leaning too heavily on GNSS data may work fine for those high end modules. But it ends up making copter flight with the cheaper M10 modules, very hit and miss. i.e. some days these copter works well in navigation modes. Other days I just pack up and go home, because the same copter can't do anything right. So what concerns me with using GPS acceleration. Is the GPS data delay, and wild fluctuations in satellite in precision with the older M8's and cheaper M10's; which totally mess-up the estimation for a time. This will prevent lower-end GNSS modules, or poorly layout builds, from being able to obtain good enough acceleration correction data for this feature to work under most conditions. But I'm also not ruling out something else being wrong with INAV GNSS handling. Whether at the serial communications end or Ublox handling.
|
GPS data delay, and wild fluctuations in satellite will mess up the estimation.
|
I agree. It had great success for fixedwings in 6.0 up to 7.1.. But in 8.0 things don't work as well. There have been multiple reports of horizon drift with the AHI. I've also experienced it on the random occasions on several very well setup (prop/motor balanced) and well filtered fixedwings.
Not on me without looking through old video file tests. Also read what I wrote in the later comments in that PR, after more testing. The effect I wrote of for a copter without a mag, also seems to effect copters with a mag on those occasions. |
When debugging yaw, heading estimation, please pay attention to the goggles feed vs heading number on OSD or the home arrow. Do not rely on navigation modes. The navigation mode complicates the determination of whether it is an estimation problem or a navigation problem. |
Yeah I have also noticed what seems to be more GPS complaints under INAV 8 than INAV 7. I haven't pinned down anything specific, though. I know that a 180° turn will mess up the AHI when using a traditional mechanical gyro. Continuing through 360° will fix it because the second 180° causes an equal and opposite error. It's not clear to me whether or not the same effect would apply with an MEMS gyro. |
The 180/90 gimbal lock problem will not exist on the Quaternion/Rotation matrix-based AHRS. |
@shota3527 The AI bot highlighted about 5 things it thought might be issues. Have you had a chance to review those to see if one or two of the five might actually be real? |
|
User description
Add a new yaw estimation method for multirotors, which may enable complete magless operation.
The new method gets the acceleration over ground from GPS, then the Z axis of the multirotor should be colinear with the acceleration vector.
https://youtu.be/w23qKWfI2p8
Also some refactoring on the AHRS code, raise ahrs_acc_ignore_rate from 15 to 20 since gps have been better now
PR Type
Enhancement
Description
This description is generated by an AI tool. It may have inaccuracies
Add acceleration-based yaw estimation for multirotor magless operation
Implement GPS acceleration vector for improved heading estimation
Refactor AHRS code with filtered acceleration measurements
Increase default accelerometer ignore rate from 15 to 20 degrees/s
Diagram Walkthrough
File Walkthrough
imu.c
Implement acceleration-based yaw estimation for multirotors
src/main/flight/imu.c
imuMahonyAHRSupdate
to support acceleration vectorsimu.h
Add filtered acceleration vector export
src/main/flight/imu.h
imuMeasuredAccelBFFiltered
realFlight.c
Enable GPS velocity components in SITL
src/main/target/SITL/sim/realFlight.c
settings.json
Update VSCode file associations
.vscode/settings.json
maths.h
to file associationssettings.yaml
Increase accelerometer ignore rate threshold
src/main/fc/settings.yaml
ahrs_acc_ignore_rate
from 15 to 20 degrees/s