# Latitude-Longitude to x y coordinates

I wanted to know if there is a formula in Excel to convert latitudes and longitudes(in degrees) into x and y coordiantes(in km or m), a formula that takes into account the curvature of Earth. Any help will be really appreciated.

-
Your question is a bit generic - coordinate conversions depend on a lot of parameters like the used map projection. Please describe in detail what you have and what you need in the end. – Robert Jun 27 '12 at 11:30
X and Y coordinates in which system? Which origin? – slhck Jun 27 '12 at 11:31
By X and Y you mean en.wikipedia.org/wiki/… ? If so, google Excel UTM formulas – golimar Jun 27 '12 at 13:57
@slhck: considering center of Earth as origin, can we calculate cartesian coordinates? I can ignore used map projections and all that since what i want to do is a bit generic. What I have is x and y coordinates of an animal's movement and I want to convert them into distance in km so that a. I can see how it is moving in time and b. calculate the distance it is moving in each time interval – Maddy Jun 28 '12 at 3:57

What you are looking for is a great circle route formula. If you could draw a perfectly straight line through a basketball from one point to the other (you will have to go through the ball) and then transpose that line to the surface you will have the great circle route. Here is a website I use to calculate such things.

http://www.movable-type.co.uk/scripts/latlong.html

Here is the Haversine Formula from that website

Haversine formula:
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2)

c = 2.atan2(√a, √(1−a))

d = R.c

Where R is earth’s radius (mean radius = 6,371km); note that angles need to be in radians to pass to trig functions!

-
so then what is d in terms of x and y? isn't that the distance between the 2 points? then how can i determine those 2 points? – Maddy Jun 28 '12 at 3:54
This site gives some more details on using Lat/Lon & Haversine in Excel – SeanC Jun 28 '12 at 21:27