goat-processors

>_ explain 04-separation-dissolves.json

goat-processors

Correlation, fusion, filtering and track quality, with every decision traced.

Each function is a written specification, packs of settings and test vectors. Seven engines, written apart in seven languages, reproduce every vector exactly, down to the record of each test they run.

$ cd engines/python && PYTHONPATH=src python3 -m unittest discover -s tests
7enginesls engines | wc -l
121scenario vectorsls packs/*/vectors/*.json | wc -l
4,333trace records, all reproducedsite/build.py counts every vector's trace
24settings packsls packs/*/pack.def | wc -l

What it is

The functions that work on track data after it is translated. goat-transformers translates messages into one shared report model; goat-processors reads that model.

A function is a specification

correlate, fuse, filter and quality are each one document in spec/. Each runs as load_pack, then ingest(report) and tick(now_ms), and snapshot() returns its whole state.

A pack is a settings file

packs/<function>-<name>/pack.def names which specified tests run and with which limits. A pack holds no code and no expressions.

Seven engines must agree

Python, Rust, Go, Java, C++, Erlang and Zig, each standard library only, each written from the specification and the vectors alone. Every pull request runs every vector in all seven.

Message formats are translated by goat-transformers into one shared report model. goat-processors reads that model and runs filter, correlate, fuse and quality on it. Each function returns events, a trace record for every test, and a snapshot of its whole state.
Drawn by docs/figures/make-figures.py from the tree.

How it decides which tracks are the same aircraft

Every track is predicted with a Kalman filter and must pass a statistical gate to be considered. The default method then goes past sequential gating: it assigns all of a sensor’s tracks at once and checks each choice against the next update before committing it.

Six steps: three sensors report their own tracks with different uncertainty; sensor position and clock offsets are removed; each track is predicted ahead with a Kalman filter that switches between a quiet and a maneuver model; only tracks inside the predicted 99 percent region are candidates; all of one sensor's tracks are assigned together at the least total cost; the result is one system track per aircraft, committed one update later.

1 Each sensor tracks

A radar, a beacon and a passive sensor each report their own tracks of the same aircraft, each with its own uncertainty.

2 Remove offsets

For each pair of sensors, a position offset and a clock offset are estimated, so a sensor that is off or late still joins.

3 Predict ahead

A constant-velocity Kalman filter per track; for turning targets, an interacting multiple model filter with a quiet and a maneuver model.

4 Gate the candidates

Only a track inside the other’s predicted 99 % region, in units of their combined uncertainty, is a candidate.

5 Assign all at once

All of one sensor’s tracks are placed together at the least total cost, so one close track cannot take another’s match.

6 Commit one tick later

Up to three candidate histories are kept over two ticks; a choice the next reports contradict is never committed.

The explainer · the specification

What goat adds

The processing works on one shared model of every sensor’s reports, carries the quality of each sensor’s clock with every report, and explains every decision it makes.

Sensor formats feed goat-transformers, which writes one model in fixed units including time error. Each report carries its clock's error and state, with a wider position region the looser the clock. goat-processors runs filter, correlate, fuse and quality without reading a clock, set by a pack of settings, and publishes system tracks on the Zenoh fabric with a record of why each decision was made.

One shared model

goat-transformers translates thousands of formats into typed keys in fixed units; a new sensor format needs no change here.

Clock quality on every report

Each report can state its clock’s error bound and state; clock error becomes position uncertainty, and a clock offset is fitted between sensors.

Never reads a clock

The only time is the time in the reports, so a recording replayed later gives exactly the same decisions.

Behavior set by packs

A pack is a settings file with no code; a mission changes behavior by choosing one.

Every decision explained

A trace record for every test: what was compared, the value, the limit and the result.

On the goat data fabric

Reports in and system tracks out over Zenoh, as droppable live data; each node runs its own processing.

The explainer · measured in the open

Every decision is in the trace

Each test is one record: what it compared, the value it computed, the limit and the result. This is step 3 of 04-separation-dissolves.json, copied from the vector:

{"stage": "gate", "a": "radar-1/T1", "b": "adsb/A7",
 "test": "mahalanobis", "value": 0.10957452680004903,
 "limit": 9.21, "pass": true}

The value is the squared distance between the two tracks in units of their combined uncertainty. The limit is the pack line gate mahalanobis gate=9.21. Open any vector in the replay viewer, a single HTML page that works offline:

python3 -I tools/explain/explain.py \
  packs/correlate-gnn/vectors/04-separation-dissolves.json
Vector 04-separation-dissolves, step 3: radar-1/T1 at 1 s lies inside the 99 percent region where adsb/A7 was predicted to be (squared distance 0.1096, limit 9.21). Every confirm test passes, so the engine emits correlate with group g1, members adsb/A7 and radar-1/T1.
The generator recomputes the gate value from the snapshots and refuses to draw if it differs from the trace record.

Seven engines check each other

The specification and the hand-stated decisions are the reference. Every vector is computed by the Rust engine and accepted only when all seven engines agree: each generator, tools/make-*-vectors.py, states its scenarios' decisions by hand, refuses a vector whose events differ from them, and writes a vector only when every engine reproduces its events, trace and final snapshot. Every engine is written from the specification and the vectors alone, never from another engine's source. Numbers must match within a relative 1e-6.

EngineRuns every vector with
Pythoncd engines/python && PYTHONPATH=src python3 -m unittest discover -s tests
Rustcd engines/rust && cargo test
Gocd engines/go && go test ./...
Javaengines/java/build.sh
C++cmake -S engines/cpp -B build/cpp && cmake --build build/cpp && ctest --test-dir build/cpp
Erlangengines/erlang/run_tests
Zigcd engines/zig && zig build test
The scenario vectors and the load vectors sit at the center. The Python engine computes the numbers; the Rust, Go, Java, C++, Erlang and Zig engines are written from the specification and the vectors alone and must reproduce every event, trace record and final snapshot.
Counts in the figure are taken from the tree by docs/figures/make-figures.py.

Scored against ground truth

The correlate packs run on generated scenarios: crossing, formation, splitting and turning objects; sensors with bias, latency, low detection, track number swaps and false tracks; sensors whose clocks are offset or drifting. F1 runs from 0 to 1 and scores whether the output puts two tracks together exactly when they are one object. GOSPA is a mean position error that also charges missed and false tracks.

The default pack, assign-time, on the 500 random scenarios of the evaluation set, which no pack is tuned on: F1 0.947 (0.936 to 0.957), level with assign-full by the paired test; IDF1 0.819; GOSPA 255 m. A textbook tracker built with Stone Soup, the open tracking framework of the UK Defence Science and Technology Laboratory, scores F1 0.714 on the same scenarios.

python3 -I tools/bench/bench.py check   # docs/benchmark.md is current
python3 -I tools/bench/bench.py report  # rewrite it

Every score and its formula · Check them on your data, or against your tracker

Pooled scores over the random set of the benchmark, one bar per correlate pack.
Written by tools/bench/bench.py report.

Working with AI agents

The processors stay fast and exact, with no model inside the engines. AI agents connect at the edges, through the same doors a person uses, and every agent action is logged with the identity it acts for. Each tile says Built only when its code and tests are on main.

Built

Connect an AI assistant

An MCP server in the runner (Model Context Protocol, the common way an assistant calls a program's tools). An assistant reads tracks and quality marks and proposes changes, with no more authority than its user.

Built

Agents as sources

An agent publishes tracks under its own name, marked as agent-derived with its model, and the processors take them in like any sensor. Hints that settle a hard case ("keep A and B apart") are Designed.

Built

Proposals someone approves

An agent proposes another pack; a person approves it, or a site rule does, within the packs it allows and after its gate passes. Every call and change is logged and can be reverted.

Built

Ask "why?"

A plain-language answer to "why were these two tracks joined?", in which every sentence cites the trace record it comes from.

Each site chooses the model its agent features may use, local or hosted, and the highest level of data sent to it. The guide to building your own integration has one runnable example per built interface, each run in CI: Built.

The interfaces and their status

Quick start

Each engine and tool uses only its language's standard library.

git clone https://github.com/USAREUR-AF/goat-processors
cd goat-processors

# run every vector in one language
cd engines/python && PYTHONPATH=src python3 -m unittest discover -s tests && cd ../..

# replay every vector, with an index page
python3 -I tools/explain/explain.py --all build/explain

README · Add a function, a pack or an engine · Vector format