Hello this could be calculated by geodesic distance. You can use that
I did one that I must finish one day