feat(cluster): Chase New — a panel for what is new and audible here

PSK Reporter tells you what is actually being decoded in your region, which
is a larger set than what somebody chose to spot: nobody spots the FT8 caller
running ten watts from a rare square.

Almost all of it existed. The MQTT payload already carries frequency, mode,
transmitter and both grids; the watcher already drops any report collected
further than NearKm from the operator, which is exactly the question worth
asking — the station is being heard HERE, not in Japan; and with grid chasing
on the subscription is already every band, filtered at the broker by receiver
square, measured at 0.2 to 1.2 messages a second. This reads messages that
were arriving and being discarded.

"New" is not decided here. Every spot goes through ClusterSpotStatuses, the
same function the DX cluster grid uses and the same cached index, so the two
panels cannot drift apart the way the county columns did. Cost per message is
map lookups behind an option cached in an atomic, because the MQTT goroutine
must never wait on the settings store.

The option is its own, not nested under grid chasing: chasing squares and
chasing entities are different wants, and the feed now has three consumers,
any one of which brings it up and none of which cuts the others loose when it
goes down.

The panel says "digital modes only" in its footer. An empty list has to mean
"nothing new on FT8/FT4/JS8 near you", not "the band is dead" — it will never
show a new entity on CW.
This commit is contained in:
2026-08-14 15:20:18 +02:00
parent 7c781bf793
commit a9e3a159d9
13 changed files with 549 additions and 19 deletions
+16 -7
View File
@@ -138,7 +138,10 @@ func (a *App) startBandOpenFeed() {
a.clearBandOpenings()
}
chaseGrids := a.gridStore != nil
if !s.Enabled && !chaseGrids {
chaseNew := a.chaseNewEnabled()
// Three consumers, one feed. Any one of them is reason enough to bring it up,
// and turning one off must not cut the others loose.
if !s.Enabled && !chaseGrids && !chaseNew {
return
}
// Every spot is measured from the operator's position. Without one there is
@@ -149,10 +152,11 @@ func (a *App) startBandOpenFeed() {
return
}
// Grid chasing wants every band; the opening watch wants its four. "+" is the
// MQTT single-level wildcard, so one subscription per square covers the lot.
// Grid chasing and new-chasing want every band; the opening watch wants its
// four. "+" is the MQTT single-level wildcard, so one subscription per square
// covers the lot.
bands := s.Bands
if chaseGrids {
if chaseGrids || chaseNew {
bands = []string{"+"}
}
// Filter at the BROKER on the receiver's square rather than receiving the
@@ -168,8 +172,13 @@ func (a *App) startBandOpenFeed() {
onGrid = func(call, grid string) { a.rememberDecodeGrid(call, grid, gridcache.SourceMQTT) }
}
var onSpot func(pskr.Spot)
if s.Enabled {
switch {
case s.Enabled && chaseNew:
onSpot = func(sp pskr.Spot) { a.feedBandOpen(sp); a.feedChaseNew(sp) }
case s.Enabled:
onSpot = a.feedBandOpen
case chaseNew:
onSpot = a.feedChaseNew
}
a.pskr = pskr.New(pskr.Config{
@@ -195,8 +204,8 @@ func (a *App) startBandOpenFeed() {
applog.Printf("pskr: feed did not start: %v", err)
return
}
applog.Printf("pskr: feed up — bands %v, %d receiver squares (openings=%v, grids=%v)",
bands, len(rxGrids), s.Enabled, chaseGrids)
applog.Printf("pskr: feed up — bands %v, %d receiver squares (openings=%v, grids=%v, chase-new=%v)",
bands, len(rxGrids), s.Enabled, chaseGrids, chaseNew)
}
// feedBandOpen hands one PSK Reporter decode to the detector.