Never mind. i just found out I forgot a factor of 2 in the calculation of the haversine.
Problem calculating haversine. Obtained distance is too big
조회 수: 4(최근 30일)
Hello everyone. I am working in airplane conflic detection. I have two aircraft optimized routes and I need to know the distance between them. The trajectories are given in degrees. I have tried to use the haversine to calculate the distance between each trajectory points as
plot(meanTim2, haversine_mean_distance_alternative, 'b')
When I execute the code, I obtain the results displayed in figure 1.
However, if I calculate the distance between the starting points, it is way smaller that the one displayed in the figure 1.
I don't know what I am doing wrong in my calculation. As far as I see, I have implemented everything well. Also, note that if I use radians in the angles as
The distance is
Which still doesn't look like the one in the map.
Can someone help me?
I am also attaching the files which contain the trajectories of both airplanes and the time (which is the same for both airplanes)