소스 검색

feat: add surveillance/display level metadata

master
Jan Svabenik 5 시간 전
부모
커밋
d16b6cd3cc
3개의 변경된 파일27개의 추가작업 그리고 15개의 파일을 삭제
  1. +1
    -1
      cmd/sdrd/phase_state_test.go
  2. +17
    -7
      cmd/sdrd/pipeline_runtime.go
  3. +9
    -7
      internal/pipeline/phases.go

+ 1
- 1
cmd/sdrd/phase_state_test.go 파일 보기

@@ -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},


+ 17
- 7
cmd/sdrd/pipeline_runtime.go 파일 보기

@@ -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,
} }
} }




+ 9
- 7
internal/pipeline/phases.go 파일 보기

@@ -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 {


불러오는 중...
취소
저장