Below is a graph of the position, velocity, and acceleration of an SCV while it travels from one point to another with a distance of 4 grids between them. The SCV only changes position at every game tick, so the distance traveled function is not continuous and therefore not differentiable.
We can approximate the velocity at game tick using:
Approximate the acceleration at game tick using:
We must also define the boundary values and .
The rest of this post covers some of the details of how to perform the calculations using a program such as Matlab/Octave. The distance values were obtained by using the programming features of the map editor to measure the distance of the SCV from its starting point at intervals of one sixteenth of a game second. Here is the code to create a vector with the distance values:
And this code creates the vector of time values at which each of the distances was measured:
Here is the code to calculate the vector and acceleration values:
And the graph can be created using the plot function: