You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pick THREAT call format from on-frequency receivers (#656)
Closes#654.
## Summary
- `radar.Threats` now filters the receiver set to friendlies on the
controller's SRS frequency before deciding the call format, so AI
wingmen and off-frequency friendlies no longer inflate the count.
- BRAA or bulleye is used based on the receivers: 1 receiver → BRAA from
that receiver; 2+ receivers within ≤5° bearing spread and ≤1 nm range
spread of each other's BRAAs → BRAA from the geographic midpoint;
otherwise bullseye.
- `radar.New` takes a `*simpleradio.Client` for checking who's on
frequency.
- `broadcastThreat` trusts the filtered map and no longer checks
frequency.
- New helper `bearings.AngularDistance` for wrap-around-safe bearing
differences.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
skyeye.Flags().DurationVar(&threatMonitoringInterval, "threat-monitoring-interval", 3*time.Minute, "How often to broadcast THREAT")
153
155
skyeye.Flags().Float64Var(&mandatoryThreatRadiusNM, "mandatory-threat-radius", 25, "Briefed radius for mandatory THREAT calls, in nautical miles")
156
+
skyeye.Flags().Float64Var(&threatBRAABearingSpreadDeg, "threat-braa-bearing-spread", 5, "Bearing spread threshold for THREAT call BRAA-vs-bullseye decision, in degrees")
157
+
skyeye.Flags().Float64Var(&threatBRAARangeSpreadNM, "threat-braa-range-spread", 1, "Range spread threshold for THREAT call BRAA-vs-bullseye decision, in nautical miles")
154
158
skyeye.Flags().BoolVar(&threatMonitoringRequiresSRS, "threat-monitoring-requires-srs", true, "Require aircraft to be on SRS to receive THREAT calls. Only useful to disable when debugging")
0 commit comments