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 Earth-orbit catalogue: orbit class, object kind, colours, fleets and the packed file format (no data)

countFleetsfunction

How many of each fleet a list of objects holds, and how many objects there are in all: what a filter shows as "N of M".

Import it

import { countFleets } from "@johnmorrisdotca/chikyu-earth/catalogue";

Definition

function countFleets(objects: Iterable<{ name: string; kind?: ObjectKind; }>): { fleets: Record<string, number>; total: number; }

Parameters

NameTypeDescription
objectsIterable<{ name: string; kind?: ObjectKind; }>

The objects' names and kinds.

Returns

{ fleets: Record<string, number>; total: number; }

The count in each fleet (every fleet, 0 included) and the total.

Examples

import { countFleets } from "@johnmorrisdotca/chikyu-earth/catalogue";

const { total, fleets } = countFleets([{ name: "STARLINK-1007", kind: "PAY" }, { name: "STARLINK-1008", kind: "PAY" }, { name: "HST", kind: "PAY" }]);
console.log(fleets["starlink"], total);
2 3

What it prints (run when this page was built)

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