How to understand the l1 control

I don’t understand the code:

/*
return the bank angle needed to achieve tracking from the last
update_*() operation
*/
int32_t AP_L1_Control::nav_roll_cd(void) const
{
float ret;
ret = cosf(_ahrs.pitch)*degrees(atanf(_latAccDem * 0.101972f) * 100.0f); // 0.101972 = 1/9.81
ret = constrain_float(ret, -9000, 9000);
return ret;
}

The “ret” is the bank angle of fixed wing,but the formula of get the bank angle, I don’t understand.

2 Likes