Update speed calculation variables.