The distance from the point to the directed line segment (the application to determine whether to deviate from the route)