Files
gods-eye-view/src/layers/awareness/policy.js
T
Sameh Khamis 73e789489b chore: drop exports nothing imports
Knip, configured with the application, package exports, scripts, QA
harnesses, workers, tools and tests as entry points, reports exports
that no module imports. Each was checked by hand against string-based
and namespace imports.

- Symbols that are still used inside their own module lose only the
  `export` keyword (176 constants and helpers).
- Unused re-exports are removed from barrel modules (flight, military,
  vessel, CCTV, directions, transit history, local ADS-B and street-level
  policy modules).
- Declarations that nothing uses at all are deleted, among them
  AIS_WATCHDOG_STATUSES, applyFilter, isRadioCountryCode, compactText,
  DENSITY_STOPS, the unused CCTV endpoint constants, and the SDR band
  constants.
- Default exports that nothing imports are removed. The ones in
  src/data/earthquakes.js, src/data/telegeographySubmarineCables.js,
  src/data/wind.js and src/data/bhoteKoshiLocator.js each constructed a
  layer instance at import time that nothing used; those instances are
  no longer created.

Every export of a package.json entry stays, as does TOMTOM_CREDIT,
which the traffic layer reads from the credits namespace it is given.
2026-10-22 19:00:40 -07:00

66 lines
2.2 KiB
JavaScript

export const AIRCRAFT_DEPENDENCIES = ['flights', 'military'];
const DEFERRED_DEPENDENCIES = ['ais-live-vessels', 'military-installations'];
export const DEPENDENCIES = [
...AIRCRAFT_DEPENDENCIES,
...DEFERRED_DEPENDENCIES,
];
export const AWARENESS_REFRESH_MS = 750;
/** @constant {number} Refresh cadence while the camera pose is CHANGING.
* Owner playtest 2026-08-18: the Contacts direction arrows and card readouts
* "feel sluggish when you look around" — at the parked 750 ms cadence the
* arrows lag the view by up to three quarters of a second. */
export const AWARENESS_MOTION_REFRESH_MS = 175;
/** @constant {number} How long the pose signature must stay UNCHANGED before
* the view counts as parked again. The signature is quantized, so a slow drag
* crosses a bin only every few frames; without this hysteresis every crossing
* read as a motion-end and refreshed at nearly display rate. */
export const AWARENESS_MOTION_SETTLE_MS = 250;
export const AWARENESS_REEVALUATE_DISTANCE_M = 250;
export const AWARENESS_PAGE_ROTATE_MS = 10000;
export const AWARENESS_PAGE_SIZE = 3;
export const AWARENESS_MAX_EXAMPLES = 10;
// Navigation walks the whole 250 km cohort, not the ten rows the panel shows,
// so these caps sit far above any realistic in-range population rather than at
// the display limit. They are still FINITE: an unbounded materialization would
// let a pathological feed sort an eleven-thousand-contact array on every
// refresh. Callers sample beyond this cap and carry explicit completeness, so
// a saturated cohort is a lower bound rather than a silently exact count.
export const AWARENESS_QUERY_LIMIT = 20000;
export const AWARENESS_MAX_NAVIGATION_EXAMPLES = 10000;
export const CONTEXT_RIM_HEIGHT_M = 2500;
export const VESSEL_FOCUS_RADIUS_M = 3000;
export const SOURCE_LABEL = {
flights: 'OpenSky',
military: 'adsb.lol',
'ais-live-vessels': 'AISStream',
'military-installations': 'OpenStreetMap',
};
/**
* Whether a refresh tick could confirm the subject in its source collection.
* UNCHECKED means the tick did not look — it must never change the verdict.
*/
export const SUBJECT_PRESENCE = Object.freeze({
LIVE: 'live',
MISSING: 'missing',
UNCHECKED: 'unchecked',
});