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 · Satellites: orbital elements in, positions out

parseElementsfunction

Read element sets from text: OMM as JSON (an array or a single object), OMM as CSV (a header row, then one satellite a row) or TLE (two lines, or three with the name first). The format is found from the text. An element set that is missing a number, has a wrong TLE checksum or is not a possible orbit is left out, with the reason, in skipped. It throws if the text is none of the three.

Import it

import { parseElements } from "@johnmorrisdotca/chikyu-earth/satellites";

Definition

function parseElements(text: string): ParsedElements

Parameters

NameTypeDescription
textstring

What the source answered.

Returns

ParsedElements

The element sets that can be used and the ones that cannot.

Examples

import { parseElements } from "@johnmorrisdotca/chikyu-earth/satellites";

const csv = [
  "OBJECT_NAME,OBJECT_ID,EPOCH,MEAN_MOTION,ECCENTRICITY,INCLINATION,RA_OF_ASC_NODE,ARG_OF_PERICENTER,MEAN_ANOMALY,NORAD_CAT_ID,BSTAR,MEAN_MOTION_DOT,MEAN_MOTION_DDOT",
  "MADE-UP 1,2026-001A,2026-11-03T12:00:00,15.2,0.0002,53,10,90,20,900001,0.0001,0.00001,0",
].join("\n");
const { sets, format } = parseElements(csv);
console.log(format, sets.length, sets[0].OBJECT_NAME);
omm-csv 1 MADE-UP 1

What it prints (run when this page was built)

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