Skip to content

Stats and Learnings

joergsflow edited this page Jun 17, 2026 · 4 revisions

πŸ“Š Statistics & Learnings

The service records every near-miss, transit and prediction into a local SQLite history DB (data/history.db). From v0.41.0 you can turn that into a founded, all-time statistical report β€” in absolute and percentage terms β€” either in the browser or on the command line. The report also derives recommended default settings from your own data.

How to generate it

In the browser (no SSH): click πŸ“Š Stats in the header. The report is generated on demand, shown as text, and downloadable as TXT / CSV / JSON.

On the Pi (CLI):

npm run analyze                 # text report
node scripts/analyze-history.js --csv > transit-stats.csv
node scripts/analyze-history.js --json > transit-stats.json

Both paths call the same core (src/stats.js) β€” the API endpoints are /api/stats/report, /api/stats/report.csv, /api/stats/report.txt.

What it answers

Question Key metric
a How many aircraft come by regularly visits β‰₯2 / β‰₯5 / β‰₯10, returned-on-another-day
b What % of transits were serious candidates projected and time-confirmed sep <0.1/0.2/0.3/0.5/1/2Β°
c How often a capture would (theoretically) have triggered imminent-stage episodes/day + actual arms/day
d Typical computational drift of a candidate sep |finalβˆ’best| and closest-approach time shift
e Aircraft per day distinct ICAO in the corridor/day
f Typical altitude / distance / elevation of a real candidate medians + p10–p90
g When the sep prediction is most exact error at β‰₯90 s / 30–60 s / <15 s lead
h Sun vs Moon, best hour, lead time, grazes, top routes/flights β€”
i Directional corridor (v0.42.0) which compass axis (N-S/E-W/…) produces your transits β€” antenna-aiming insight
j Capture yield (v0.42.0) of the captures actually fired, what % hit a genuine on-disc transit

Apply & self-tune (v0.42.0)

The report's recommended defaults are interactive in the πŸ“Š Stats modal: tick the ones you want and Apply selected β€” it writes them straight to the live SharpCap config (no Settings round-trip). The measure β†’ recommend β†’ apply loop, in two clicks.

For hands-off operation there are two opt-in self-tuning toggles in Settings β†’ Scopes (default off):

  • Self-tune drift window (sharpcap.adaptiveDrift) β€” every ~6 h, re-derives maxDriftS from your measured closest-approach time error (p95).
  • Self-tune elevation floor (sharpcap.adaptiveElevation) β€” every ~6 h, lowers minElevationDeg to a site-specific floor that keeps ~90 % of your confirmed candidates (it only ever lowers it, never raises).

Both are strictly opt-in, clamped, and logged β€” a hand-set value is only ever changed while its toggle is on.

Example learnings (a real ~37-day dataset, Rheine / NW-Germany)

A busy site directly under the NW-European corridor. Your numbers will differ β€” the point is how to read them.

Traffic is dense, not the bottleneck. ~275 new aircraft/day, 10 000 in 37 days, 79 % return at least once (one regular logged 148 visits β‰ˆ 4Γ—/day). At a site like this, selection matters more than opportunity.

The honest "serious candidate" rate is small. Of all aircraft ever seen, ~9 % came within 0.5Β° of the Sun or Moon. The funnel against the β‰₯30Β°-overhead subset reads much higher (~46 %) but is apples-to-oranges β€” most real transits happen below 30Β° (see elevation, below), so that denominator doesn't match the numerator. Use the "of all seen" figure.

Projected β‰  confirmed. Projected closest separations look tight β€” half of recorded episodes project <0.3Β°. But only a fraction are time-confirmed that tight, because the projection drifts (next point). The report shows both columns side by side; the confirmed one is reality.

Time is predicted superbly; separation drifts. Closest-approach time error: median ~1.5 s (p95 ~27 s). Separation drift |final βˆ’ best|: median ~0.32Β° β€” large against a 0.5Β° disc. Don't trust an early "0.05Β°!" projection; expect it ~0.3Β° wider by transit time. This single fact drives most of the recommended defaults below.

Predictions sharpen toward the event, then plateau. Sep error β‰₯90 s β‰ˆ 0.20Β° β†’ 30–60 s β‰ˆ 0.13Β° β†’ <15 s β‰ˆ 0.13Β°. Past ~60 s out, it's about as good as it gets; high-elevation cruise traffic is measurably steadier than low, maneuvering traffic.

The typical real candidate is a cruising jet, fairly low in the sky. ~36 000 ft, ~27 km slant range, median elevation only ~24Β° (p10 ~7Β°). Low elevation = worse seeing/haze; the sharpest images come from the high-elevation tail. Filter by elevation, not only by separation.

Genuine disc transits are ~3/day (confirmed on-disc <0.27Β°), with ~16 imminent-stage arms/day. Sun vs Moon β‰ˆ 56/44. Best local hour here: ~10:00. First-warning lead time: median ~8 min.

Recommended defaults the report derives from your data

The report ends with concrete suggestions (current β†’ suggested + the rationale). The shipped v0.41.0 defaults were re-tuned on the data above:

Setting Old New (v0.41.0) Why
sharpcap.preBufferS 10 s 5 s Closest-approach time error is tiny (~1.5 s) β€” a long lead just wastes frames.
sharpcap.postBufferS 10 s 15 s A late aircraft is the common miss; bias the window to the tail.
sharpcap.leadDriftFrac 0.5 0.25 0.5 doubled the clip for early arms; re-arming already corrects a moved prediction.
sharpcap.maxDriftS 45 s 30 s Just above the measured time p95 (~27 s) β€” covers 95 %, the rest via re-arm.
sharpcap.minElevationDeg 20Β° recommended per site Many confirmed candidates sit below 20Β°; the report suggests a site-specific floor (e.g. 15Β°) so you re-include the 10–20Β° passes you like, best on clear days.

The elevation floor stays a recommendation, not a forced global default β€” it's site-specific. A south-facing site under an E-W corridor sees a very different elevation distribution than a site under an N-S corridor, so the report learns your floor from your confirmed candidates rather than imposing one number on everyone.

How an "episode" and the outcomes are defined

  • Episode = one aircraft flyby, grouped across its radio β†’ candidate β†’ imminent stages (so a single transit isn't counted three times). ISS is excluded from episode stats.
  • Projected separation = tightest value the tracker ever projected; confirmed = tightest value at the time-confirmed imminent stage.
  • Capture arm (v0.41.0): every time the SharpCap trigger actually fired is logged to capture_arms, so arms/day and the re-arm rate are real history, not just the session counter in the header.

See also: βš™οΈ Advanced β†’ SharpCap capture trigger Β· πŸ“š Reference β†’ Configuration.

Clone this wiki locally