Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 921 Bytes

README.md

File metadata and controls

57 lines (37 loc) · 921 Bytes

gps

Utils to process data from orienteering live gps providers with Javascript/Typescript

Installation

Deno

deno add @orienteering-js/gps

Npm

npx jsr add @orienteering-js/gps

Yarn

yarn dlx jsr add @orienteering-js/gps

Pnpm

pnpm dlx jsr add @orienteering-js/gps

Bun

bunx jsr add @orienteering-js/gps

Usage

Gpsseuranta

Gpsseuranta is a Finnish orienteering live GPS provider.

import { parseInit, parseData } from "@orienteering-js/gps/gpsseuranta";

const init = await fetch(
  "https://www.tulospalvelu.fi/gps/20240526_WC_S_M/init.txt"
).then((r) => r.text());

const [mapCallibration, competitors] = parseInit(init);

const data = await fetch(
  "https://www.tulospalvelu.fi/gps/20240526_WC_S_M/data.lst"
).then((r) => r.text());

const competitorsRoutesMap = parseData(data);