Reference · The globe as an SVG string
RouteLegtype
The distance and the bearings between two places.
Import it
import type { RouteLeg } from "@johnmorrisdotca/chikyu-earth";
Definition
interface RouteLeg {
kilometres: number;
greatCircleKm: number;
initialBearing: number;
finalBearing: number;
flightHours: number;
midpoint: GeoPoint;
exact: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
kilometres | number | Geodesic distance on WGS84, kilometres. The great-circle distance when the geodesic did not converge. |
greatCircleKm | number | Great-circle distance on a sphere of |
initialBearing | number | Degrees clockwise from north, 0 to 360, at the start. |
finalBearing | number | Degrees clockwise from north, 0 to 360, at the end. |
flightHours | number | Hours at |
midpoint | GeoPoint | The point halfway along the geodesic (or the great circle, when the geodesic did not converge). |
exact | boolean | False when Vincenty's formula did not converge (nearly antipodal): the distance is then the great circle. |
Examples
import type { RouteLeg } from "@johnmorrisdotca/chikyu-earth";
const none: RouteLeg | null = null;
console.log(none);nullWhat it prints (run when this page was built)