pub fn haversine_distance(loc1_lat: f64, loc1_lon: f64, loc1_alt: f64, loc2_lat: f64, loc2_lon: f64, loc2_alt: f64) -> f64 {
    let mut r = 6372797.560856; // radius of the earth in meters
    r = r + loc2_alt - loc1_alt;

    let lat_arc = (loc1_lat - loc2_lat).to_radians();
    let lon_arc = (loc1_lon - loc2_lon).to_radians();

    let mut lat_h = (lat_arc * 0.5).sin();
    lat_h = lat_h * lat_h;

    let mut lon_h = (lon_arc * 0.5).sin();
    lon_h = lon_h * lon_h;

    let tmp = loc1_lat.to_radians().cos() * loc2_lat.to_radians().cos();
    let rad = 2.0 * (lat_h + tmp * lon_h).sqrt().asin();

    rad * r
}
/// Returns the Haversine distance between two points on the Earth's surface.
Returns the Haversine distance between two points on the Earth's surface.
Returns the Haversine distance between two points on the Earth ' s surface .
pub fn haversine_distance(loc1_lat: f64, loc1_lon: f64, loc1_alt: f64, loc2_lat: f64, loc2_lon: f64, loc2_alt: f64) -> f64 {
    let mut r = 6372797.560856; // radius of the earth in meters
    r = r + loc2_alt - loc1_alt;
    let lat_arc = (loc1_lat - loc2_lat).to_radians();
    let lon_arc = (loc1_lon - loc2_lon).to_radians();
    let mut lat_h = (lat_arc * 0.5).sin();
    lat_h = lat_h * lat_h;
    let mut lon_h = (lon_arc * 0.5).sin();
    lon_h = lon_h * lon_h;
    let tmp = loc1_lat.to_radians().cos() * loc2_lat.to_radians().cos();
    let rad = 2.0 * (lat_h + tmp * lon_h).sqrt().asin();
    rad * r
}
pub fn haversine_distance ( loc1_lat : f64 , loc1_lon : f64 , loc1_alt : f64 , loc2_lat : f64 , loc2_lon : f64 , loc2_alt : f64 ) -> f64 { let mut r = 6372797.560856 ; // radius of the earth in meters r = r + loc2_alt - loc1_alt ; let lat_arc = ( loc1_lat - loc2_lat ) . to_radians ( ) ; let lon_arc = ( loc1_lon - loc2_lon ) . to_radians ( ) ; let mut lat_h = ( lat_arc * 0.5 ) . sin ( ) ; lat_h = lat_h * lat_h ; let mut lon_h = ( lon_arc * 0.5 ) . sin ( ) ; lon_h = lon_h * lon_h ; let tmp = loc1_lat . to_radians ( ) . cos ( ) * loc2_lat . to_radians ( ) . cos ( ) ; let rad = 2.0 * ( lat_h + tmp * lon_h ) . sqrt ( ) . asin ( ) ; rad * r }
Returns the Haversine distance between two points on the Earth's surface.
Returns the Haversine distance between two points on the Earth ' s surface .
loc1_lat
f64
loc1_lon
f64
loc1_alt
f64
loc2_lat
f64
loc2_lon
f64
loc2_alt
f64