Hey everyone, I’m pretty new to Ardupilot, have been using it for 3 months, and I believe I discovered a bug in the Code that caused my to lose 3 planes. I did dig into it, and I believe that (In ArduPlane, Navigation.cpp) Plane::calc_gndspeed_undershoot() is faulty (by design, not by implementation). It appears to assume that Wind is always perfectly alignesd with Yaw (Heading), which is almost never true in real-life. I am a traning PPL pilot also, so I am kinda sure of this I have created my own version, but since I am a newbie to the community, I do not want to initialize any push request before consulting with some more experienced Devs from here. I am happy to contribute my Fix (Tested works for me), if it is any use for the whole project… Of course, I need to be sure that I am right… I am not sure whome to address this issue, but I am happy to include more details here (too) if I can help.
This forum is for user support questions only. Users and some of the developers answer user questions.
For code changes we use github.com pull-requests instead. That gives you access to all the developers (not just some of them, like here in the forum). And we can directly comment on each line of code individually. Plus your code changes will get tested against our regression testsuite, that is part of our continuous integration compile farm (quality assurance).
Hi, thank You, I actually did issue a Git Push request (id
d5c255d60b or d5c255d ) - But I am not sure if it got to anyone or not, because I can’t find any trace of it anywhere. Maybe I do not have the right to post Push Requests as I am an absolute newbie to ArduPlane Devs.
Followup - I went out with Car, carrying an actual Plane (without Props), and I simulated heavy winds carrying the Plane to totally nonsense directions - and I logged the GndSpdFwd value by Mavlink.
Please check the 1st vid, with the original calc_gndspeed_undershoot - https://www.youtube.com/watch?v=IK1p47G7jG4
I repeated the experiment with my suggested code Fix - https://www.youtube.com/watch?v=VZ9TF5NUeJk
It seems to have solved the issue - But of course, I’m such a newbie that more experienced Devs might need to take a look at it
However, since then I discovered a potential, mayben even deeper problem, starting with a fault in “setupTurnAngle(void)” in Navigation.cpp, and I already created an independent Issue for it, as it might be an indicator of a much-much more serious Issue. I’m not sure, of course, but I think it’s worth investigating.
Please check this new Issue here - https://github.com/ArduPilot/ardupilot/issues/16699
Thank You for Your consideration - if I am wrong, I’m sorry to have wasted Your time, but if I’m even partially right this might need a Fix ASAP as well.
Happy if I could be of any use
Amilcar Lucas via ArduPilot Discourse email@example.com ezt írta (időpont: 2021. febr. 21., V, 17:20):
Read this https://ardupilot.org/dev/docs/submitting-patches-back-to-master.html and do a better PR
Ok, Thank you for Your guidance. Sorry for my ignorance. I was just trying to help / contribute, but it seems, I have to do much better than that
Amilcar Lucas via ArduPilot Discourse firstname.lastname@example.org ezt írta (időpont: 2021. febr. 22., H, 0:25):