Skip to content

About

Non-operational conjunction-triage & orbital-data-reliability engine over public catalogs (CelesTrak GP/OMM, SOCRATES, SATCAT): classification, triage, SGP4 consistency checks, and reproducible evidence bundles. Engine-first, not a globe.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

TCA Engine

CI

A conjunction-triage and orbital-data-reliability engine built on public catalogs.

TCA Engine ingests public orbital data (CelesTrak GP/OMM elements, SOCRATES conjunction screenings, SATCAT metadata), classifies satellite/debris close-approach events, evaluates the freshness and confidence of the underlying data, runs an independent SGP4 consistency check, and produces reproducible Evidence Bundles for selected events.

The product is the analysis engine and its evidence output — not a map.

Non-operational research tool. No covariance is fabricated, no collision probability is asserted, and nothing here is suitable for operational collision avoidance. It exists to make the limits of public conjunction data visible and auditable.


The problem it solves

Public conjunction data is genuinely useful but quietly unreliable: SOCRATES screenings are computed from public two-line/OMM elements that carry no covariance, vary in epoch age, and are approximate. A close-approach row that looks alarming may rest on a week-old element set; a benign-looking one may be under-characterized. Most public tooling renders these events on a globe without ever surfacing how trustworthy the inputs are.

TCA Engine treats that reliability question as the product. For every event it answers:

  • What is the event? — objects, miss distance, relative speed, orbit regime.
  • How fresh and complete is the input data? — element epoch age, missing metadata, freshness bands.
  • Does it reproduce? — an independent SGP4 re-propagation of both objects around the screening TCA, compared against the published geometry.
  • What should an analyst do first? — a deterministic triage class with an explicit, inspectable rationale.
  • Can someone else verify it? — a self-contained Evidence Bundle tracing every derived value back to a cached, timestamped source payload.

What this is — and is explicitly NOT

It is It is not
A data-reliability + triage layer over public conjunction data A generic "satellite tracker" or 3D-globe dashboard
A generator of reproducible, auditable Evidence Bundles An operational collision-avoidance or maneuver-planning system
An independent SGP4 consistency check against public elements A source of authoritative covariance or collision probability
A cache-aware, fair-use public-data client A real-time or full-catalog screening service

The workbench includes a single-event geometry playback view (Phase 9). It is deliberately subordinate evidence — one selected event at a time, driven by stored reproduction artifacts — not an all-catalog visualization and not a globe.

Architecture overview

A headless Python engine owns all analysis; a thin read-only API exposes stored results; an optional React workbench renders them. Each stage persists to SQLite and is independently runnable from the CLI.

flowchart LR
    subgraph Sources["Public data (CelesTrak)"]
        GP[GP / OMM elements]
        SOC[SOCRATES screenings]
        SAT[SATCAT metadata]
    end
    subgraph Engine["Headless engine (src/tca_engine)"]
        ING[ingest + normalize]
        ENR[per-event enrichment]
        CLS[object classification]
        TRI[triage]
        REP[SGP4 reproduction]
        EVI[Evidence Bundles + CDM-like export]
        CAL[threshold calibration]
    end
    DB[(SQLite)]
    API[Read-only FastAPI]
    WB[React analyst workbench]

    GP & SOC & SAT --> ING --> DB
    DB --> ENR --> CLS --> TRI --> REP --> EVI --> DB
    DB --> CAL --> DB
    DB --> API --> WB
Loading

Data flow is one-directional: the API never mutates, never reproduces implicitly, and never fetches. All network activity is explicit, bounded, and cache-aware. See docs/architecture.md for the data model and Evidence Bundle schema, and docs/data_sources.md for exact endpoints and fair-use rules.

Core features

  • Ingestion + normalization of GP/OMM, SOCRATES, and SATCAT into typed models with derived orbital parameters and an orbit-regime classifier.
  • Cache-aware, fair-use client — respects CelesTrak update cadence, caches with checksum sidecars, stops on HTTP errors, identifies itself.
  • Object classification from SATCAT status codes (active/inactive payload, rocket body, debris, unknown) with conservative, explained fallbacks.
  • Deterministic triage into five precedence-ordered classes with per-event rationale (never a black box).
  • SGP4 reproduction — independent re-propagation of both objects around the screening TCA; REPRODUCED / PARTIAL / FAILED / NOT_AVAILABLE with tolerances.
  • Evidence Bundles — self-contained, reproducible JSON records with a deterministic bundle ID, plus a CDM-like (explicitly non-CCSDS, covariance-free) export.
  • Threshold calibration — summary statistics over a SOCRATES distribution that propose candidate thresholds for human review (defaults never auto-change).
  • Bounded live workflow — one resumable, cache-aware command chaining the whole pipeline over a real sample.
  • Read-only API + analyst workbench — paginated event queue, full event detail, evidence/CDM viewers, coverage & calibration, and single-event geometry playback.

Quickstart (local)

Requires Python 3.11+ and Node 20+ (for the workbench).

# 1. Install the engine with API + SGP4 extras
pip install -e ".[api,propagation,dev]"

# 2. Pull a real, bounded live sample from CelesTrak and run the full pipeline
#    (ingest real SOCRATES → enrich real OMM/SATCAT → triage → reproduce →
#     evidence → calibrate). Respects CelesTrak fair use; see the warning below.
$env:TCA_USER_AGENT = "tca-engine/0.1 (+https://github.com/onatozmenn/TCA-engine; research)"
python -m tca_engine.cli live-workflow `
  --db data/live/tca_live.sqlite --out data/live_run --run-name live `
  --socrates-limit 400 --max-objects 120 --top-reproduce 25 --top-evidence 15 `
  --allow-network

# 3. Serve the read-only API against the live DB
$env:TCA_ENGINE_DB_PATH  = "data/live/tca_live.sqlite"
$env:TCA_CALIBRATION_DIR = "data/live_run/live/calibration"
python -m uvicorn tca_engine.api:app --port 8000        # http://127.0.0.1:8000

# 4. Run the workbench (separate terminal)
cd web
npm install
npm run dev                                             # http://localhost:5173

A reviewer can now open the workbench, browse the triaged event queue, select an event, inspect its reproduction and geometry playback, open its Evidence Bundle, and read the limitations — all driven by real public catalog data.

What a real run looks like

The bounded live workflow above produces output like this (numbers vary with the current catalog, because real public data changes continuously):

# TCA Engine live workflow (network; non-operational)
#   step ingest_socrates : OK   ingested 400 SOCRATES rows (limit 400)
#   step enrich_objects  : OK   attempted=120 succeeded=118 partial=1 failed=1
#   step triage          : OK   triaged 400 conjunctions
#   step reproduce       : OK   reproduced 25 of top 25 events
#   step evidence        : OK   generated 15 evidence bundles (top 15)
#   step calibrate       : OK   calibration report written (5 candidates)
#   missing OMM          : 668 -> 549
#   cache hits / misses  : 2 / 238
#
#   triage distribution  : REPRODUCE_REQUIRED 303 · HIGH_CONSEQUENCE_GEOMETRY 18
#                          NEEDS_FRESH_DATA 55 · LOW_CONFIDENCE 1 · MONITOR 23

That distribution is the point: on real public data the dominant class is REPRODUCE_REQUIRED — most screened objects are missing usable public elements, have failed enrichment, or cannot be independently reproduced. The engine surfaces that unreliability instead of hiding it. (Raw provider payloads and run databases are git-ignored and never committed, per CelesTrak fair use.)

Offline alternative (no network, for CI / quick review)

If you cannot or do not want to hit the network, build-demo runs the same pipeline fully offline against committed sample payloads in tests/fixtures/. The object identities are real catalog numbers; some conjunction geometries in the calibration sample are adjusted so that every triage class is exercised deterministically. It is a reproducible fixture for tests and demos — not a substitute for a real run:

python -m tca_engine.cli build-demo --db data/demo/tca_demo.sqlite --out data/demo_run

Screenshots

The workbench renders identically whether it is backed by a real live run or the offline demo DB. If the images are absent, run the live workflow (or the offline demo) and start the workbench as shown above.

Event queue (triaged, precedence-ordered) Event detail + SGP4 reproduction
Event queue Event detail
Single-event geometry playback Coverage & calibration
Geometry playback Coverage

CLI reference

All commands are offline unless --allow-network is passed. --db defaults to data/tca_engine.sqlite.

Command Purpose
build-demo Build a reproducible offline demo DB + artifacts from fixtures
ingest-sample Ingest the offline fixtures (no network)
ingest-live Fetch a small bounded live sample from CelesTrak
enrich Fetch missing OMM/SATCAT for referenced objects (bounded; dry-run by default)
triage Triage stored conjunctions (offline)
reproduce SGP4-reproduce stored event(s) and compare to SOCRATES (offline)
evidence Generate Evidence Bundle(s) for stored event(s) (offline)
calibrate Compute a threshold-calibration report (offline)
live-workflow Bounded end-to-end run: ingest → enrich → triage → reproduce → evidence → calibrate
python -m tca_engine.cli reproduce --db data/demo/tca_demo.sqlite --top 5
python -m tca_engine.cli evidence  --db data/demo/tca_demo.sqlite --event-id 49271_69049_20260614T012500

Read-only API

Endpoint Returns
GET /health Service + DB status (non-operational markers)
GET /events Paginated, filterable triaged event queue
GET /events/{id} Full event detail (conjunction, objects, triage, reproduction, missing flags)
GET /events/{id}/geometry Bounded relative-geometry samples for playback (requires a stored reproduction)
GET /events/{id}/evidence Stored Evidence Bundle (404 if none; never generated on read)
GET /events/{id}/cdm-like CDM-like non-operational export
GET /coverage Catalog coverage + missing-metadata counts
GET /calibration/latest Latest calibration report

Live workflow (bounded; respects fair use)

⚠️ Fair-use warning. --allow-network performs real CelesTrak requests. The client caches aggressively, never polls faster than the provider updates, stops on HTTP errors, and refuses rate-limited bulk groups by default. Keep --socrates-limit / --max-objects modest. Review docs/data_sources.md and docs/live_workflow_runbook.md first.

python -m tca_engine.cli live-workflow `
  --db data/live.sqlite --out data/runs `
  --socrates-limit 500 --max-objects 200 --top-reproduce 25 --top-evidence 25 `
  --allow-network

Without --allow-network the same command runs offline over already-stored data (no fetch). Re-runs reuse the cache and skip already-enriched objects.

Tests & checks

python -m pytest -q                 # backend suite (offline; no network)
python -m ruff check src tests scripts

cd web
npm run typecheck                   # tsc --noEmit
npm run build                       # type-check + production bundle
npm run test:e2e                    # Playwright workbench smoke tests (mocked API)

The backend suite is fully offline (the CelesTrak client is exercised via httpx.MockTransport). The frontend smoke tests run against the Vite dev server with the API mocked, so they need no backend and no network.

Docker

The multi-stage Dockerfile builds the workbench and serves it from FastAPI on a single port; docker-compose.yml bind-mounts ./data.

docker compose build
docker compose run --rm tca-engine \
  python -m tca_engine.cli build-demo --db /data/tca_engine.sqlite --out /data/demo_run
docker compose up -d                # read-only API + workbench: http://localhost:8000/

See docs/deployment.md. PostgreSQL schema parity is prepared under migrations/postgres/ (SQLite remains the default).

Non-operational limitations

These are intrinsic and stated by design — the engine surfaces them rather than hiding them:

  • No covariance, no probability. Public GP/OMM elements carry no covariance; every confidence statement is a derived heuristic, not a risk figure.
  • SGP4 reproduction is a consistency check, not validation — approximate (typically kilometers, worse with epoch age), bounded to a window around the screening TCA, and never a collision assessment.
  • Triage is a heuristic prioritization, not an operational decision. Thresholds are explicit and human-owned; calibration only proposes candidates.
  • Geometry playback is evidence, not prediction — a relative TEME (ECI-like, not Earth-fixed) view of one stored event; no uncertainty is implied.
  • Not real-time, not full-catalog. Deliberately bounded and cache-aware.

Project status

Feature complete for this milestone. Phases 0–10 are done: ingestion, enrichment, classification, triage, Evidence Bundles, CDM-like export, calibration, SGP4 reproduction, read-only API, analyst workbench, bounded live workflow, single-event geometry playback, and release hardening (demo flow, frontend smoke tests, container packaging, documentation).

This repository is under a feature freeze. Further work should be real-data validation and deployment, not feature expansion — no new orbital-analysis surfaces, no dashboards, no globe.

Documentation

Data attribution

Orbital data and conjunction screenings courtesy of CelesTrak (Dr. T.S. Kelso). Orbital-regime background references the ESA Space Debris Office DISCOS statistics. This project is independent and not affiliated with or endorsed by either. Use of all data is subject to the providers' terms.

License

Apache-2.0.

About

Non-operational conjunction-triage & orbital-data-reliability engine over public catalogs (CelesTrak GP/OMM, SOCRATES, SATCAT): classification, triage, SGP4 consistency checks, and reproducible evidence bundles. Engine-first, not a globe.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages