import type { Pt } from "./crowd.ts"; import type { Circuit } from "./circuits.types.ts"; import { type LonLat } from "./venues.geo.ts"; /** The credit a drawing made from OpenStreetMap's data carries (the same words as the venues'). */ export declare const CIRCUIT_ATTRIBUTION = "(c) OpenStreetMap contributors, ODbL 1.0, openstreetmap.org/copyright"; /** Every circuit, in the order of the data. */ export declare const CIRCUITS: readonly Circuit[]; /** The keys of the circuits. */ export declare const CIRCUIT_IDS: readonly string[]; /** A circuit by its key, or `undefined`. */ export declare const circuitById: (id: string) => Circuit | undefined; /** A turn as the plan places it: its number, its point on the lap, how far round the lap it is, which way the lap runs there and the side the bend turns to (1 left, -1 right, 0 straight). */ export interface PlanTurn { n: number; at: Pt; along: number; dir: Pt; side: -1 | 0 | 1; } /** A circuit's plan in the drawing's frame: feet, the long side of the lap along x, y down the page. */ export interface CircuitPlan { circuit: Circuit; /** The point of the map the frame is measured from (the middle of the lap's box), `[longitude, latitude]`. */ origin: LonLat; /** The heading of the lap's long side, degrees clockwise from north, and the way north points on the page, degrees clockwise from its top. */ heading: number; north: number; lap: Pt[]; /** The length of the lap measured along the drawn line, in metres. */ measured: number; pitLane: Pt[]; area: Pt[]; building?: { ring: Pt[]; height: number; }; turns: PlanTurn[]; start: { at: Pt; dir: Pt; along: number; }; finish: { at: Pt; dir: Pt; along: number; }; /** The track's width and the pit lane's, in feet. */ width: number; pitWidth: number; /** The box of everything drawn on the ground, in feet. */ box: { x0: number; y0: number; x1: number; y1: number; }; } /** A circuit's plan: its lap, pit lane, ground, pit building, turns, start and finish in the drawing's frame. */ export declare function circuitPlan(circuit: Circuit): CircuitPlan; /** The circuit a set of options names, or an error that lists the keys. */ export declare function circuitOf(id: string): Circuit;