tjark wrote in Wed Apr 15, 2020 9:31 pm:I read the articles in the wiki regarding the autopilot and know how to code the controller but i still have no idea how to implement it or test it.
It might help to look at existing examples, for example
the KAP 140 of the Cessna 182. Typically autopilots can be found under the Systems directory of
aircraft directories. Look at the simple ones, and do not forget to also look at the
Aircraft-set.xml file to see how it is set up.
PID tuning can be quite tricky, and while one can throw control theory like
Nyquist plots at it, one can also approach it with trial and error. To some degree, order of operations is relevant, in this context which gains to adjust and when.
It might help to
search YouTube for "PID regulator tuning" and going through some videos. A good starter is the below might be:
Electronoobs, "PID Balance+Ball | full explanation & tuning" (13 min, uploaded July 14, 2019). The PID tuning stuff begins at 7 minutes.
tjark wrote in Wed Apr 15, 2020 9:31 pm:I also tried to get a debug file to visualize the behavior of the aircraft, but it isnt generated or saved in some mysterious path..
The debug file, if it is fgfs.log, is probably not that helpful. A good help might be either of the FlightGear wiki article
Logging properties if a simple CSV file is enough, or
Generic protocol if you want something more flexible.
Unfortunately I do not remember how, but you could use properties instead of fixed values for the PID gain filters and adjust them live from the
property browser.