I've been having a devil of a time trying to get the autopilot to fly a heading without rolling all over the place.
The first tip I can give is that most of the parameters about the PID in the SDK about the autopilot in the system.cfg do not work in the modern flight model. Those PID parameters have all been moved into the ai.cfg file.
The parameters I am editing is in the [STICKANDRUDDER] section of ai.cfg and I have come up with (by random punching in numbers):
rollPID = 0.5, 0.01, 0.010, 1, 20.0
The parameters are Proportional Control, Integrator Control, Derivative Control, Integrator Boundary, Derivative Boundary
Using these parameters it is mostly working. The AP still wants to dial in a big bank angle (exceeding the max angle) and then settles back down and there is still a bit of hunting when on course but at least I have tamed the wild overshoots.
I was hoping that others would have some tips or perhaps a methodology they use to fine tune the AP parameters.
The other tip I can give is to make sure you open the AP debug in the aircraft editor in MSFS so you can watch in horror as your aircraft tries to fly at a 40% bank angle and overshoots the heading.
The first tip I can give is that most of the parameters about the PID in the SDK about the autopilot in the system.cfg do not work in the modern flight model. Those PID parameters have all been moved into the ai.cfg file.
The parameters I am editing is in the [STICKANDRUDDER] section of ai.cfg and I have come up with (by random punching in numbers):
rollPID = 0.5, 0.01, 0.010, 1, 20.0
The parameters are Proportional Control, Integrator Control, Derivative Control, Integrator Boundary, Derivative Boundary
Using these parameters it is mostly working. The AP still wants to dial in a big bank angle (exceeding the max angle) and then settles back down and there is still a bit of hunting when on course but at least I have tamed the wild overshoots.
I was hoping that others would have some tips or perhaps a methodology they use to fine tune the AP parameters.
The other tip I can give is to make sure you open the AP debug in the aircraft editor in MSFS so you can watch in horror as your aircraft tries to fly at a 40% bank angle and overshoots the heading.
