I used to reach an accepatable position controll tune flying in Loiter mode. With the new tune, I could not get to that good. I realize the attitude tuning is not very good in both cases but with the current ATC_RAT_* and filters params, I really need your helps to optimize the postion controller. By comparing 2 parameter set, I do not see much different.
I would improve the basic tuning first as there’s a few issues there.
If you look at the “map” when examining the log in MissionPlanner, you can see the GPS position (blue) and IMU position (red) never really align with each other. Often this is because of vibrations, but I think in your case it might be some lag in the system somewhere. Therefore I’m recommending reducing logging and updating to latest Stable, especially since there are important fixes.
Some of yours were quite low and would allow loiter to take a long time to make changes, and then you are comparing it to PosHold which is much more manual like Stabilise mode with GPS position and altitude enhancement. In fact I would avoid using poshold since it’s not very tunable and Loiter offers so much more.
Just use Stabilise, AltHold and Loiter.
Of course we should all practice in Stabilise for safety, and then AltHold and Loiter the rest of the time is most suitable for tuning and normal use.
About the not alligning GPS and IMU, I believe that it is because of parameters GPS_POS_* that I intend to change because I have the dual antenna in the system. If I enable the second GPS and switch to Blended mode, the blended GPS will be match IMU position.
Other parameters you mentioned have been modified properly.
Autotune - Autotune has never given a better tune than the manual tune in this frame. I am aware of this issue and will try to make it work someday.
Sorry but I don’t think the Loiter would take longer when I have a slower maximum Loiter speed. In the log, there were some overshooting of acceleration, not only velocity.
It seemed like the target velocity changed the sign during braking and it crossed the zero and change the sign again which causes moving backward.
Something made the target velocity increase when both desired accel and desired velocity are coming to zero