Bladeren bron

feat: add surveillance/display level metadata

master
Jan Svabenik 6 uur geleden
bovenliggende
commit
d16b6cd3cc
3 gewijzigde bestanden met toevoegingen van 27 en 15 verwijderingen
  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 Bestand weergeven

@@ -8,7 +8,7 @@ import (

func TestPhaseStateCarriesPhaseResults(t *testing.T) {
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},
refinement: pipeline.RefinementResult{Level: pipeline.AnalysisLevel{Name: "refinement"}, Decisions: []pipeline.SignalDecision{{ShouldRecord: true}}, Candidates: []pipeline.Candidate{{ID: 1}}},
queueStats: decisionQueueStats{RecordQueued: 1},


+ 17
- 7
cmd/sdrd/pipeline_runtime.go Bestand weergeven

@@ -229,14 +229,24 @@ func (rt *dspRuntime) buildSurveillanceResult(art *spectrumArtifacts) pipeline.S
SpanHz: float64(rt.cfg.SampleRate),
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{
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 Bestand weergeven

@@ -12,13 +12,15 @@ type AnalysisLevel 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 {


Laden…
Annuleren
Opslaan