John,
I want to help here and I’ve been noticing that you’ve been having trouble. I fly planes mostly, but I looked at your recent logs and I have some ideas. The first important concept is that there are steering and navigation controllers. Without getting good steering, it won’t matter what your navigation controller demands because your boat won’t be able to follow it. I think we’re mainly concerned with the steering control here.
The first thing I looked at was your desired and achieved yaw. They are not quite aligning as well as they could be. They also overshoot sometimes, indicating problems.
Here’s a comparatively well tuned aircraft roll graph from one of my flights. It rarely overshoots, and it moves quickly to the desired angle.
The red line on the graph of your craft is showing that the navigation controller is demanding a 270 (westbound) track and then swinging back to a 180 (southbound) track before settling on a 220 (southwestbound track). The craft is slow to achieve these headings, and often it is overshooting them. It’s actually a bit of an oscillation.
To understand why it is overshooting them, I looked at your servo 1 output. It was showing values far from trim at the moment that the desired and actual yaw met. Normally when your craft is straight, I see a consistent 1500 pwm output, and that is excellent. Here however, the PWM was about 1800 when it should have been 1500.
To see why the motor is still turned when the actual and desired yaw are equal, I looked at your PID.S graphs. It’s obvious that you have I-term buildup that is causing the servo motor to be far too sluggish to do the right thing.
As a reference, here is my aircraft’s roll PID chart that gives you an example of how PID’s should be. The I-term remains pretty constant because my aircraft isn’t very well in trim, but the P-value dominates when there are large roll errors (changes).
#1 recommendation: Turn down your ATC_STR_RAT_I gain. Try 0.05 instead of 0.5. This should help with the overshoot in the path just after turns.
#2 recommendation: Turn down your ATC_STR_RAT_IMAX to 0.15 instead of 1. It is obvious that your boat is fairly well in trim (better than 15% of the steering throw). This will also help prevent That I-term buildup
#3 recommendation: Turn up your TURN_MAX_G. Try .7 instead of .1. That will decrease the chance that the navigation controller is suppressed by this parameter. It’s likely that your boat can handle fairly high acceleration turns well because of its side floats and thrust that is below the waterline. Boats typically can achieve quite high acceleration turns.
#4 recommendation: Turn your NAVL1_DAMPING back down to 0.7. Having that high may cause oscillations as well, but it’s hard to tell until you get your steering to hit the desired
#5 recommendation: Turn up your ATC_STR_RAT_P value to 1.4 instead of 1.0. This should help your motor turn tighter. It is currently not maxing out when I look at the CH1 output graph. The PID values should be dominated by P-gain as shown in my roll graph above. The P-gain should do the work of turning the motor when the heading is not as desired.
#6 recommendation: Turn down ATC_STR_RAT_FILT a bit. Maybe try 1 instead of 5. I don’t know exactly how this affects the outputs, but be cautious when testing this.
AFTER you run a few test missions, and see that your desired and actual yaw are matching up well (after turns) then play with NAV_L1_PERIOD. Note that immediately after a waypoint is finished, the yaw demand will be a lot and the boat obviously can’t whip around immediately. You should, however, see your steering servo nearly max out until it achieves that desired heading. Note that the desired heading is usually up to 45 degrees from the waypoint path. It will rarely approach the new run at a steeper angle.