Modifying Multicopter Autotuning Code For implementing Recursive Least Squares to tune PID gains of Multicopter Attitude controller in real time

Dear PX4 Development Community Members,

I hope this message finds you well. I am reaching out to you to seek your support and collaboration in Modifying Multicopter Autotuning Code For implementing Recursive Least Squares to tune PID gains of Multicopter Attitude controller in real time. The problem I am facing is to understand how the gains are computed and updated in real time in the code. if I can get an understanding of this, then I can Modify it according to Recursive least squares technique to find the most appropriate gains for the controller. Also for computing and updating the gains I need to read Measured and Desired orientation angles in real time for calculations.