| @@ -8,7 +8,7 @@ import ( | |||||
| func TestPhaseStateCarriesPhaseResults(t *testing.T) { | func TestPhaseStateCarriesPhaseResults(t *testing.T) { | ||||
| ps := &phaseState{ | ps := &phaseState{ | ||||
| surveillance: pipeline.SurveillanceResult{NoiseFloor: -90, Scheduled: []pipeline.ScheduledCandidate{{Candidate: pipeline.Candidate{ID: 1}, Priority: 5}}}, | |||||
| surveillance: pipeline.SurveillanceResult{Level: pipeline.AnalysisLevel{Name: "surveillance"}, NoiseFloor: -90, Scheduled: []pipeline.ScheduledCandidate{{Candidate: pipeline.Candidate{ID: 1}, Priority: 5}}}, | |||||
| refinementInput: pipeline.RefinementInput{Scheduled: []pipeline.ScheduledCandidate{{Candidate: pipeline.Candidate{ID: 1}, Priority: 5}}, SampleRate: 2048000, FFTSize: 2048, CenterHz: 7.1e6}, | refinementInput: pipeline.RefinementInput{Scheduled: []pipeline.ScheduledCandidate{{Candidate: pipeline.Candidate{ID: 1}, Priority: 5}}, SampleRate: 2048000, FFTSize: 2048, CenterHz: 7.1e6}, | ||||
| refinement: pipeline.RefinementResult{Level: pipeline.AnalysisLevel{Name: "refinement"}, Decisions: []pipeline.SignalDecision{{ShouldRecord: true}}, Candidates: []pipeline.Candidate{{ID: 1}}}, | refinement: pipeline.RefinementResult{Level: pipeline.AnalysisLevel{Name: "refinement"}, Decisions: []pipeline.SignalDecision{{ShouldRecord: true}}, Candidates: []pipeline.Candidate{{ID: 1}}}, | ||||
| queueStats: decisionQueueStats{RecordQueued: 1}, | queueStats: decisionQueueStats{RecordQueued: 1}, | ||||
| @@ -229,14 +229,24 @@ func (rt *dspRuntime) buildSurveillanceResult(art *spectrumArtifacts) pipeline.S | |||||
| SpanHz: float64(rt.cfg.SampleRate), | SpanHz: float64(rt.cfg.SampleRate), | ||||
| Source: "baseband", | Source: "baseband", | ||||
| } | } | ||||
| displayLevel := pipeline.AnalysisLevel{ | |||||
| Name: "presentation", | |||||
| SampleRate: rt.cfg.SampleRate, | |||||
| FFTSize: rt.cfg.Surveillance.DisplayBins, | |||||
| CenterHz: rt.cfg.CenterHz, | |||||
| SpanHz: float64(rt.cfg.SampleRate), | |||||
| Source: "display", | |||||
| } | |||||
| return pipeline.SurveillanceResult{ | return pipeline.SurveillanceResult{ | ||||
| Level: level, | |||||
| Candidates: candidates, | |||||
| Scheduled: scheduled, | |||||
| Finished: art.finished, | |||||
| Signals: art.detected, | |||||
| NoiseFloor: art.noiseFloor, | |||||
| Thresholds: art.thresholds, | |||||
| Level: level, | |||||
| Levels: []pipeline.AnalysisLevel{level}, | |||||
| DisplayLevel: displayLevel, | |||||
| Candidates: candidates, | |||||
| Scheduled: scheduled, | |||||
| Finished: art.finished, | |||||
| Signals: art.detected, | |||||
| NoiseFloor: art.noiseFloor, | |||||
| Thresholds: art.thresholds, | |||||
| } | } | ||||
| } | } | ||||
| @@ -12,13 +12,15 @@ type AnalysisLevel struct { | |||||
| } | } | ||||
| type SurveillanceResult struct { | type SurveillanceResult struct { | ||||
| Level AnalysisLevel `json:"level"` | |||||
| Candidates []Candidate `json:"candidates"` | |||||
| Scheduled []ScheduledCandidate `json:"scheduled,omitempty"` | |||||
| Finished []detector.Event `json:"finished"` | |||||
| Signals []detector.Signal `json:"signals"` | |||||
| NoiseFloor float64 `json:"noise_floor"` | |||||
| Thresholds []float64 `json:"thresholds,omitempty"` | |||||
| Level AnalysisLevel `json:"level"` | |||||
| Levels []AnalysisLevel `json:"levels,omitempty"` | |||||
| Candidates []Candidate `json:"candidates"` | |||||
| Scheduled []ScheduledCandidate `json:"scheduled,omitempty"` | |||||
| Finished []detector.Event `json:"finished"` | |||||
| Signals []detector.Signal `json:"signals"` | |||||
| NoiseFloor float64 `json:"noise_floor"` | |||||
| Thresholds []float64 `json:"thresholds,omitempty"` | |||||
| DisplayLevel AnalysisLevel `json:"display_level"` | |||||
| } | } | ||||
| type RefinementPlan struct { | type RefinementPlan struct { | ||||