Hello people,

For the donkey car I have a question about the mathematical origin of the formula of the throttle. I am clear all the transformations, but the initial situation unfortunately not. Could you please explain this to me.

Thank you very much =)

# Solve: THROTTLE_CUT_OFF_RATE = pow(sin(90 +/- THROTTLE_CUT_OFF_ANGLE), x) for x…

# → sin(90 +/- THROTTLE_CUT_OFF_ANGLE) = cos(THROTTLE_CUT_OFF_ANGLE) .

t_power = math.log(THROTTLE_CUT_OFF_RATE) / math.log(math.cos(math.radians(THROTTLE_CUT_OFF_ANGLE)))

def figure_out_my_throttle(steering): # steering → [0:180]

```
# pow(sin()) of the steering angle is only non-zero when driving straight... e.g. steering ~= 90
t_result = math.pow(math.sin(math.radians(max(min(steering, 179.99), 0.0))), t_power)
return (t_result * THROTTLE_GAIN) + THROTTLE_OFFSET
```