import { Coordinates } from "../airports/types.js"; //#region source/helpers/geodesy.d.ts /** * Returns the distance along the surface of the earth between two points. * * Uses haversine formula: * a = sin²(Δφ/2) + cos φ1 ⋅ cos φ2 ⋅ sin²(Δλ/2); * c = 2 ⋅ atan2(√a, √(1−a)); * d = R ⋅ c; * * where φ is latitude, λ is longitude, R is earth’s radius (mean radius = 6,371km); * note that angles need to be in radians to pass to trig functions! * * note greek letters (e.g. φ, λ, θ) are used for angles in radians to distinguish from angles in * degrees (e.g. lat, lon, brng) * * @param start - Latitude/longitude of start point. * @param end - Latitude/longitude of destination point. * @param radius - Radius of earth (defaults to mean radius in metres). * @returns Distance between two points, in meters. * * @example */ declare const distance: (start: Coordinates, end: Coordinates, radius?: number) => number; //#endregion export { distance };