Wideband autonomous SDR analysis engine forked from sdr-visual-suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.9KB

  1. package pipeline
  2. import "sdr-wideband-suite/internal/detector"
  3. type AnalysisLevel struct {
  4. Name string `json:"name"`
  5. Role string `json:"role,omitempty"`
  6. Truth string `json:"truth,omitempty"`
  7. SampleRate int `json:"sample_rate"`
  8. FFTSize int `json:"fft_size"`
  9. CenterHz float64 `json:"center_hz"`
  10. SpanHz float64 `json:"span_hz"`
  11. Source string `json:"source,omitempty"`
  12. }
  13. type AnalysisContext struct {
  14. Surveillance AnalysisLevel `json:"surveillance,omitempty"`
  15. Refinement AnalysisLevel `json:"refinement,omitempty"`
  16. Presentation AnalysisLevel `json:"presentation,omitempty"`
  17. Detail AnalysisLevel `json:"detail,omitempty"`
  18. Derived []AnalysisLevel `json:"derived,omitempty"`
  19. }
  20. type SurveillanceResult struct {
  21. Level AnalysisLevel `json:"level"`
  22. Levels []AnalysisLevel `json:"levels,omitempty"`
  23. Candidates []Candidate `json:"candidates"`
  24. Scheduled []ScheduledCandidate `json:"scheduled,omitempty"`
  25. Finished []detector.Event `json:"finished"`
  26. Signals []detector.Signal `json:"signals"`
  27. NoiseFloor float64 `json:"noise_floor"`
  28. Thresholds []float64 `json:"thresholds,omitempty"`
  29. DisplayLevel AnalysisLevel `json:"display_level"`
  30. Context AnalysisContext `json:"context,omitempty"`
  31. }
  32. type RefinementPlan struct {
  33. TotalCandidates int `json:"total_candidates"`
  34. MinCandidateSNRDb float64 `json:"min_candidate_snr_db"`
  35. Budget int `json:"budget"`
  36. Strategy string `json:"strategy,omitempty"`
  37. StrategyReason string `json:"strategy_reason,omitempty"`
  38. MonitorStartHz float64 `json:"monitor_start_hz,omitempty"`
  39. MonitorEndHz float64 `json:"monitor_end_hz,omitempty"`
  40. MonitorSpanHz float64 `json:"monitor_span_hz,omitempty"`
  41. DroppedByMonitor int `json:"dropped_by_monitor"`
  42. DroppedBySNR int `json:"dropped_by_snr"`
  43. DroppedByBudget int `json:"dropped_by_budget"`
  44. ScoreModel RefinementScoreModel `json:"score_model,omitempty"`
  45. PriorityMin float64 `json:"priority_min,omitempty"`
  46. PriorityMax float64 `json:"priority_max,omitempty"`
  47. PriorityAvg float64 `json:"priority_avg,omitempty"`
  48. PriorityCutoff float64 `json:"priority_cutoff,omitempty"`
  49. Selected []ScheduledCandidate `json:"selected,omitempty"`
  50. WorkItems []RefinementWorkItem `json:"work_items,omitempty"`
  51. }
  52. type RefinementRequest struct {
  53. Strategy string `json:"strategy,omitempty"`
  54. Reason string `json:"reason,omitempty"`
  55. SpanHintHz float64 `json:"span_hint_hz,omitempty"`
  56. }
  57. type RefinementInput struct {
  58. Level AnalysisLevel `json:"level"`
  59. Detail AnalysisLevel `json:"detail,omitempty"`
  60. Context AnalysisContext `json:"context,omitempty"`
  61. Request RefinementRequest `json:"request,omitempty"`
  62. Budgets BudgetModel `json:"budgets,omitempty"`
  63. Candidates []Candidate `json:"candidates,omitempty"`
  64. Scheduled []ScheduledCandidate `json:"scheduled,omitempty"`
  65. WorkItems []RefinementWorkItem `json:"work_items,omitempty"`
  66. Plan RefinementPlan `json:"plan,omitempty"`
  67. Windows []RefinementWindow `json:"windows,omitempty"`
  68. SampleRate int `json:"sample_rate"`
  69. FFTSize int `json:"fft_size"`
  70. CenterHz float64 `json:"center_hz"`
  71. Source string `json:"source,omitempty"`
  72. }
  73. type RefinementResult struct {
  74. Level AnalysisLevel `json:"level"`
  75. Signals []detector.Signal `json:"signals"`
  76. Decisions []SignalDecision `json:"decisions,omitempty"`
  77. Candidates []Candidate `json:"candidates,omitempty"`
  78. }
  79. type RefinementStep struct {
  80. Input RefinementInput `json:"input"`
  81. Result RefinementResult `json:"result"`
  82. }