Here’s what I’m looking at, attempting to get this really “locked in” (what an engineering term!)
Looking at the target velocity vs actual in New Loiter it looks like my velocity gains are OK - these are from the 626.
But I cannot 100% get rid of the slight oscillation in the position. In the old Loiter controller the POS_XY_P gain was 1.0 default, and normally did not have to mess with the Loiter settings to get good results. This is with PSC_POSXY_P set to 0.5 and it still slightly oscillates.
OK, so in the old controller the velocity PID’s were 1.0, 0.5, and 0.0 default and they worked on the velocity request instead of the velocity error. They convert the desired speed towards the target to a desired acceleration. The resulting accel becomes a lean angle which is then passed to the same angular controller used in Stabilize.
In New Loiter those were set to P - 2.0, I - 1.0, and D - 1.0 by default. Setting those to the old values and just playing with the D gain can make the heli act anywhere from totally drunk to not too bad. I’d have to pull the params to see where I ended up on this last test flight.
I wish there was some sort of sensible tuning procedure for these PSC gains instead of making stabs in the dark to try to figure it out. After comparing one heli with New Loiter side-by-side with another one in Old Loiter this morning it was obvious New Loiter is not quite ready for a full-blown Auto test yet.
This is what I’m trying to get New Loiter to look like - taken from the logs from the Comparison Heli flying Old Loiter. New Loiter is close, but no cigar.