I'm measuring distance of 2 points on Google Map and then in my program converting them into ECEF using this formula. Then using Pythagorean theorem to calculate distance between those 2 points. Difference is about 100-200m, which is fairly big for what I am doing. In my program I use double
for precision.
Big question will be what method Google is using in order to calculate distance between 2 points?
Update, example:
Lon/Lat : 44.50310895983847,40.16009701404741
and 44.50151117520584,40.15672510042466
. Google Earth says it's 400m
.
After converting to ECEF I get 3482269.0815067333, 2938590.6893090927
and 3482536.9833229352, 2938466.2491839984
. I measure distance of 276.99011m