Below is the file 'thrust.c' from this revision. You can also download the file.
/* thrust.c */ #include "fisqrt.h" #include "timer.h" float linearise_thrust(float x) { return fisqrt(fisqrt(x*x*x)); } void set_thrust(int motor, float x) { timer_set_pwm_value(motor, (int)(linearise_thrust(x) * PWM_MAX)); }