car to checkpoint distance calculation and bug fix in checkpoint calculation