Convert Cartesian Distance to Sperical

I apologize if this is posted in the in the wrong place (i figure either here or calculus)

Assume unit radius

this is what i know - I have a latitude and longitude and I can convert these to Cartesian coordinates like this

first convert lat and lon to radians by multiplying by pi/180, then

$\displaystyle x = cos(lat) * cos(lon)$

$\displaystyle y = cos(lat) * sin(lon)$

$\displaystyle z = sin(lat)$

To convert back to lat lon i do this

$\displaystyle r=\sqrt(x^2 + y^2 + z^2)$

$\displaystyle lat = asin(z/r)*(180/pi)$

$\displaystyle lon = atan2(y, x)*(180/pi)$

What I am trying to figure out is

If i give you a distance between two points defined in cartesian space on a unit radius sphere how do i convert that distance to lat lon in degrees

Hope this makes some sense

Chogo

Re: Convert Cartesian Distance to Sperical

I have figured this out so please disregard the thread

to convert from chordal distance to greater circle

2*arcsin(distance/2)*Radius