Answer:
The 3-D coordinates of the location of a point on the earth's surface is given by (R₀ₐ ×cosλ ×cosθ, R₀ₐ×sinλ×cosθ, R₀ₐ×sinλ) where λ =longitude and θ = latitude
and the distance between points on the surface such as two cities is given by P₁ = (x₁, y₁, z₁) and P₂ = (x₂, y₂, z₂) = |P₁ P₂| = √((x₂-x₁)² + (y₂-y₁)² + (z₂ - z₁)²)
Explanation:
If the center of the earth is marked O the location of a point is given in longitude and latitude as λ and θ respectively then where normally we have
-180 ° ≤ λ ≤ 180 ° and 90 ° ≤ θ ≤ 90°
However in cartesan coordinates, considering the radius of the earth and specifying the location of a point on the surface of the earth in three dimensions of the x, y and z coordinates with distance from the earth center = R where R = |Oa| = 6367.5km and the center of the Earth is O, then a point, a on the surface of the earth has the x, y and z Cartesian coordinates we have
a = (xₐ, yₐ, zₐ) = (R×cosλ×cosθ, R×sinλ×cosθ, R×sinλ)
Hence the 3-D coordinates of a location is given by
(R₀ₐ ×cosλ ×cosθ, R₀ₐ×sinλ×cosθ, R₀ₐ×sinλ) with R₀ₐ = the distance of the point a to the center of the earth
Distance between two points is given by P₁ = (x₁, y₁, z₁) and P₂ = (x₂, y₂, z₂) = |P₁ P₂| = √((x₂-x₁)² + (y₂-y₁)² + (z₂ - z₁)²)