Good hints these are, thx; I'll add DD then.
One of my ideas with this tool is to automatically improve the gains on a continuous basis. Define a performance indicator, for instance, the ap.heading_error as you already use in autogain.py (the trick is making it a rolling average). Then, at certain intervals, take the current gainset and adjust some of them by a harmlessly small, but random factor. Measure performance for a certain time, and if performance improved, switch to the new gainset. If not, stick to the old one and repeat. This all happens within the context of one gainset. This way, the system learns by itself.
While we are brainstorming, let's touch the subject of non-linearity. To be honest, before I started looking into autopilots I thought it was more advanced than PID contol. I'm talking in general, not only pypilot. There are urban myths going around about autopilots that are in tune with the periodics of the waves and the boat, and I believed them. But reading into it, it indeed seems to be all about these PID gains. Are you aware of any wave modeling going on? If you'd have the imu.heave, you might be able to lock a phase locked loop (PLL) system to it. With some certainty this could predict an incoming wave in some well-behaved sea, if such a thing exists ;-) Would not know what to do with it yet, especially given its stochastic nature, but I do find it an interesting thought. When you're hand-steering, you anticipate waves in some way, and that is feed-forward. You can already do something with the imu.pitch I guess https://liquidsdr.org/blog/pll-simple-howto/.
One of my ideas with this tool is to automatically improve the gains on a continuous basis. Define a performance indicator, for instance, the ap.heading_error as you already use in autogain.py (the trick is making it a rolling average). Then, at certain intervals, take the current gainset and adjust some of them by a harmlessly small, but random factor. Measure performance for a certain time, and if performance improved, switch to the new gainset. If not, stick to the old one and repeat. This all happens within the context of one gainset. This way, the system learns by itself.
While we are brainstorming, let's touch the subject of non-linearity. To be honest, before I started looking into autopilots I thought it was more advanced than PID contol. I'm talking in general, not only pypilot. There are urban myths going around about autopilots that are in tune with the periodics of the waves and the boat, and I believed them. But reading into it, it indeed seems to be all about these PID gains. Are you aware of any wave modeling going on? If you'd have the imu.heave, you might be able to lock a phase locked loop (PLL) system to it. With some certainty this could predict an incoming wave in some well-behaved sea, if such a thing exists ;-) Would not know what to do with it yet, especially given its stochastic nature, but I do find it an interesting thought. When you're hand-steering, you anticipate waves in some way, and that is feed-forward. You can already do something with the imu.pitch I guess https://liquidsdr.org/blog/pll-simple-howto/.