Question 4:
In the code block highlighted in blue at the bottom of
post 11 the following code appears for calculating position and heading:
Code:
Q+=dR/2.0;
X+=dF*sin(Q)+dS*cos(Q);
Y+=dF*cos(Q)-dS*sin(Q);
Q+=dR/2.0;
Give the mathematical justification for updating the heading "Q" twice in half-steps, instead of doing it like this:
Code:
Q+=dR;
X+=dF*sin(Q)+dS*cos(Q);
Y+=dF*cos(Q)-dS*sin(Q);