-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
New DCM AHRS #8407
New DCM AHRS #8407
Conversation
Awesome work on this PR including all the testing that is been done. |
yes I am working with him as well and test it. |
This is not a competition! "to see which comes out as best". From my point of view, this new AHRS has a lot of improvements that the old one doesn't have. |
What's the point of making the centrifugal correction using the GPS work, if when you don't have a GPS, the Drift will still be there?? Tell me? |
No one is competing, it was just a coincidence that both PR's were open at the same time (although I don't want to open this one now)... Both are totally different. |
the other PR uses still the ignore_rate mitigations if no GPS is available. If course it is not a perfect solution but doable. Anyway. I see no reason why you should not have opened this PR. We know that some last things are to fix and you need some help. Without the PR no one would be able to help. Let's wait till @digitalentity has time to look at it. One more update in case this helps solving issues. Marcin did another test flight with the seal today. Drift was only there if excessive or continuous Z-Accelleration is applied like a spiral climb in cruise mode or during autotune on Pitch. But one more thing that is more noticeable on his plane is the heading randomly doing correction jumps. Check the numerical heading at the following times: 1:31 - 2:53 - 4:42 (maybe more but i did not frame by frame chat the whole flight. It is not really noticeable in Angle mode of course but in nav modes this can cause sudden course changes. Keith also saw it on one mission flight when a waypoint was not properly approached and then a sudden course correction appeared and I saw the same in my 5.1 comparison flight here when approaching WP4 I have not taken it serously before but in this flight it was more obvious to see the connection. Here is the full video of Marcins flight: https://youtu.be/ZOygg6xUMrE |
Hey, great stuff we have here! I would still suggest to have |
I don't agree with that! |
Why not, just because it's old code? You might consider it temporarily... |
instead of you thinking about using the old AHRS parts, I recommend you to take a paper and pencil and help me correct the current AHRS math! If I didn't add the functions "ignore_rate" and "ignore_sloope" it's because I know that this new AHRS works without these functions! And merge this to fix this in the future? No, that doesn't make sense, it's totally wrong. |
Guys let's calm down a little bit. The only problem that I see at the end is, that the ignore rate workaround is depending on very clean setups and high gyro precision and that can cause new issues for these. But as long as GPS is available and we have the speed and heading working, there is no point in adding back the ignore rates. |
Fair enough! 👍 |
btw @0crap it is not just acrobatic flying causing still drift. When I do autotune and pitch up and down in waves I would not consider this acrobatic and here is the biggest impact visible with the most amount of drift. |
True, seen that on your vid. Weird indeed. |
Also, overcoming the remaining issues by the easier path of This temporary runaway occurs if a quad experiences specific G forces acting on the accelerometer as it slows, and begins to tilt back in the braking phase... |
well... sorry for the earlier message! But, I think we should pay attention to the function that is activated through the variable "should_correct_centrifugal", and also give a review on the fusion of the NED (3D) speed of the GPS in the AHRS. |
just a quick test flight today with the Dart 250g. It flew very bad becasue I had messed up the first launch and the Hatch cover flew off and broke off the tabs. So I had to fly with an open fuselage xD |
no solutions here! Let's pay attention to >> #8403 |
@JulioCesarMatias if you don't mind, I'd like to leave this PR open but with |
well... I've been working on it for at least 2 or 3 months, with the help of some friends like: @Jetrell, @b14ckyy and @MrD-RC. The intention is just to end the Drift of the current AHRS. So far, almost 90% of this is functional, but we still have some issues that need to be resolved, I'll list them below. This PR is being difficult for both parties, both for the developer, and also for those who will merge this in the future (if the problems are fixed, of course)....
1 ~ There is a small drift in the AHRS, when we leave a maneuver in fixed-wing aircraft, but the GPS compensation manages to mitigate a good part of the drift (This may be related to the
change_limit
variable on line 938, since I spent days trying to fix this, but I couldn't).2 ~ When the GPS is deactivated, the Drift increases even more (because the centrifugal force correction function stops working, see line 821 to 836).
If this short list of problems is solved, we will have a good AHRS in iNav... I can mention some benefits:
1 - The circles in Pos-Hold mode on fixed-wing aircraft were perfect... So far I can't believe what I saw... Overall, this AHRS improved the performance of the INS.
2 - If we are flying with Compass, a "consistency" check will always be checking if it is useful to use in flight, if not, the system automatically switches to the use of GPS (This has already been proposed in the past here in iNav, but it didn't go any further, because I don't think anyone put this in lines of code).
3 - Delayed acceleration vector to compensate for low GPS refresh rate.
4 - Gyro coning correction (https://scholarsmine.mst.edu/cgi/viewcontent.cgi?article=8915&context=masters_theses).
5 - During a launch acceleration, and reduce the Roll and Pitch gain by 50% to reduce the impact of GPS lag on takeoff attitude when using a catapult.
6 - We only have 3 configuration parameters for this AHRS... kP Acc, kP Mag and GPS Gain.
Anyone interested in helping me with this, please fork my branch,study the entire algorithm, not just the lines I mentioned above, it is necessary to understand how everything else works, so that no incorrect conclusion occurs... HITL mode using XPlane11 also helped a lot with the development of this!