Function coord_transforms::geo::ecef2lla
source · pub fn ecef2lla(
ecef_vec: &Vector3<f64>,
ellipsoid: &geo_ellipsoid
) -> Vector3<f64>
Expand description
Converts 3-d ECEF coordinates to 3-d LLA coordinates
Arguments
ecef_vec
- Vector3 reference to the ECEF vector (x, y, z)ellipsoid
- geo_ellipsoid reference to the ellipsoid
Return Value
nalgebra::Vector3<f64>
- lat, long, alt (radians, radians, meters)
Formula
- x = arctan((z + e’^2 * b * sin^3 (theta)) / (p - e^2 * a * cos^3 (theta)))
- y = arctan(y / x)
- z = (p / cos(lat)) - N