Function coord_transforms::geo::lla2ecef

source ·
pub fn lla2ecef(
    lla_vec: &Vector3<f64>,
    ellipsoid: &geo_ellipsoid
) -> Vector3<f64>
Expand description

Converts 3-d LLA coordinates to 3-d ECEF coordinates

Arguments

  • lla_vec - Vector3 reference to the LLA vector (latitude, longitude, altitude) (radians, radians, meters)
  • ellipsoid - geo_ellipsoid reference to the ellipsoid

Return Value

  • nalgebra::Vector3<f64> - x, y, z

Formula

  • x = (N + h) * cos(lat) * cos(lon)
  • y = (N + h) * cos(lat) * sin(lon)
  • z = (( b^2 / a^2 ) * N + h) * sin(lat)