Scripts for calculating distance travelled.