Tip:
Highlight text to annotate it
X
Before we get started with automatic control, let's try manual control.
We want the driver to slam on the brake from 0 second to 0.7 seconds, then release the brake,
then slam on the brake again from 1 second to 1.7 seconds, release the brake and so on.
The code of the simulation runs twice--the first time with the strength of the brake close to optimum
and the second time re-release slamming on the brake.
Your job is to do something about that second time.
In that case, this volume variable is pumping becomes true
by the way these parenthesis are just for readability.
Without them, the code look somewhat strange, and when we are pumping, simulate
that this value of p is being modulated, which means that we have to complete this line here.
What is the velocity of the rim of the wheel in the next step.