Math model of the plane

Hello! Please advice - where in scource code of Ardupilot I can find the math model of the plane? Thank you.

perhaps you’re looking for libraries/SITL/SIM_Plane.cpp
That is a simple model used for testing purposes.

1 Like

Thank you, Mark! Maybe you know - what exactly model is used for the flight? For example, how PID autotune is working etc? Thank you again!

PID control loops aren’t model-based. There’s a good description of tuning techniques on wikipedia:
https://en.wikipedia.org/wiki/PID_controller#Loop_tuning
and the ArduPilot wiki section for Plane is here:
https://ardupilot.org/plane/docs/automatic-tuning-with-autotune.html

The autotuning C code for Plane is here: libraries/APM_Control/AP_AutoTune.cpp and there are also some tuning scripts in LUA which might be of interest to you.

1 Like

Hey, Mark! Your responses were very helpful. Dont know how to do it properly, but maybe you can recommend something on another question? How to control the UAV in stabilize mode