Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

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

NameTypeDescription
kilometresnumber

Geodesic distance on WGS84, kilometres. The great-circle distance when the geodesic did not converge.

greatCircleKmnumber

Great-circle distance on a sphere of MEAN_RADIUS_KM, kilometres.

initialBearingnumber

Degrees clockwise from north, 0 to 360, at the start.

finalBearingnumber

Degrees clockwise from north, 0 to 360, at the end.

flightHoursnumber

Hours at FLIGHT_SPEED_KM_H.

midpointGeoPoint

The point halfway along the geodesic (or the great circle, when the geodesic did not converge).

exactboolean

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);
null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.