# Haversine formula to calculate distance between real coordinates?

I need to calculate distance between two stations in a map in order to calculate empirical variogram in ordinary kriging to interpolate temperature data.

Calculating distance in kriging using Euclidean distance formula between two points on XY axes, and I found that not sufficient because I specified Lag_units and Lag_distance in meters when I programmed kriging.

Can I use the haversine formula to calculate distance between real coordinates instead of Euclidean distance?

• What's the coordinate system you're working on (datum & projection) ? Also, I do not see how Kriging is helping understand the question here, from what I understood, all you want is to mesure the distance, right ? – Akheloes Feb 23 '14 at 12:45
• Gloserio,my coordinates are real latitudes,longitudes for six weather stations ...in the formula of calculating the experimetal variogram and the fitted model you need to calculate the distance between pair points(1,3)(4,5) using calculation formula (Aucledian distance). if i apply aucledian distance between latitudes and logtitudes i dont get the distance ? therefor i suggest to use haversine formula..does this right? – The_programmer Feb 23 '14 at 14:58
• Well, maybe you can use the haversine formula, but it will not be very accurate, this formula is based on a spherical geometry and unless you're working on a map based on spherical coordinates, you'll lose accuracy... Do you know which coordinate system is your map on ? What software are you using ? – Akheloes Feb 23 '14 at 15:34
• im work on Google maps co-ordinate system (latitude,longitude),and programming with asp.net c# – The_programmer Feb 23 '14 at 17:03
• Gloserio, which distance formula is accurate than haversine formula ? – The_programmer Feb 23 '14 at 17:14