Roll Rate
File: In sw/airborne/fw_h_ctl.c we define the roll rate loop: float cmd = throttle_dep_pgain * ( err + h_ctl_roll_rate_igain * roll_rate_sum_err / H_CTL_ROLL_RATE_SUM_NB_SAMPLES + h_ctl_roll_rate_dgain * d_err);Note that the roll Pgain is variable with throttle and multiplies through the entire equation affecting the I and D terms as well for ease of tuning.