/** Program to calculate Gyrojet projectile accelerations from raw data. See my full article at: https://futureboy.us/blog/gyrojet.html */ readings = [[0 ft, 0 ft/s], [1 ft, 105 ft/s], [3 ft, 192 ft/s], [5 ft, 290 ft/s], [8 ft, 421 ft/s], [13 ft, 566 ft/s], [18 ft, 787 ft/s], [23 ft, 985 ft/s]] sumt = 0 s size = length[readings] var d2 var v2 for i = 0 to size-2 { [d1, v1] = readings@i [d2, v2] = readings@(i+1) vavg = (v1+v2)/2 deltat = (d2-d1)/vavg deltav = v2-v1 a = deltav/deltat sumt = sumt+deltat println["