if (_rate_bf_ff_enabled)
this if term is inside the input_euler_angle_roll_pitch_euler_rate_yaw() function that is inside the run() function that is inside the dast_loop() function.
if (_rate_bf_ff_enabled)
this if term is inside the input_euler_angle_roll_pitch_euler_rate_yaw() function that is inside the run() function that is inside the dast_loop() function.
It checks if the ‘Body frame rate feed forward’ is enabled. If it is then the calculations are different than otherwise. Is your question more specific than this? Are you having a problem with part of this code?
well i do have problems with the code. me and my team mate for the quadcopter we are building need to undestand the whole procces of getting the RC inputs and their translation for the pwm to the motors.
we have managed to understand a lot but we kinda got stuck at the function : input_euler_angle_roll_pitch_euler_rate_yae(). this function have a large if-else code and the term for the if() is : if(_rate_bf_ff_enabled). we didn’t realy understand what that is…
and we also got stuck at the meaning of this variable: Aux_servo_function_t
in the function: rc_write() we have this variable: SRV_Channel::Aux_servo_function_t function
Start from a wider angle, check this awesome presentation by Leonard https://www.youtube.com/watch?v=-PC69jcMizA it has all the details that needed to understand what does fast forwarding do in the control loop. (And many more)