| @@ -12,16 +12,16 @@ import ( | |||||
| "sync/atomic" | "sync/atomic" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-visual-suite/internal/dsp" | |||||
| fftutil "sdr-visual-suite/internal/fft" | |||||
| "sdr-visual-suite/internal/fft/gpufft" | |||||
| "sdr-visual-suite/internal/rds" | |||||
| "sdr-visual-suite/internal/recorder" | |||||
| "sdr-visual-suite/internal/pipeline" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| fftutil "sdr-wideband-suite/internal/fft" | |||||
| "sdr-wideband-suite/internal/fft/gpufft" | |||||
| "sdr-wideband-suite/internal/rds" | |||||
| "sdr-wideband-suite/internal/recorder" | |||||
| "sdr-wideband-suite/internal/pipeline" | |||||
| ) | ) | ||||
| func runDSP(ctx context.Context, srcMgr *sourceManager, cfg config.Config, det *detector.Detector, window []float64, h *hub, eventFile *os.File, eventMu *sync.RWMutex, updates <-chan dspUpdate, gpuState *gpuStatus, rec *recorder.Manager, sigSnap *signalSnapshot, extractMgr *extractionManager) { | func runDSP(ctx context.Context, srcMgr *sourceManager, cfg config.Config, det *detector.Detector, window []float64, h *hub, eventFile *os.File, eventMu *sync.RWMutex, updates <-chan dspUpdate, gpuState *gpuStatus, rec *recorder.Manager, sigSnap *signalSnapshot, extractMgr *extractionManager) { | ||||
| @@ -7,10 +7,10 @@ import ( | |||||
| "strconv" | "strconv" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-visual-suite/internal/demod/gpudemod" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/demod/gpudemod" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| func mustParseDuration(raw string, fallback time.Duration) time.Duration { | func mustParseDuration(raw string, fallback time.Duration) time.Duration { | ||||
| @@ -12,13 +12,13 @@ import ( | |||||
| "sync" | "sync" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-visual-suite/internal/events" | |||||
| "sdr-visual-suite/internal/pipeline" | |||||
| fftutil "sdr-visual-suite/internal/fft" | |||||
| "sdr-visual-suite/internal/recorder" | |||||
| "sdr-visual-suite/internal/runtime" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/events" | |||||
| "sdr-wideband-suite/internal/pipeline" | |||||
| fftutil "sdr-wideband-suite/internal/fft" | |||||
| "sdr-wideband-suite/internal/recorder" | |||||
| "sdr-wideband-suite/internal/runtime" | |||||
| ) | ) | ||||
| func registerAPIHandlers(mux *http.ServeMux, cfgPath string, cfgManager *runtime.Manager, srcMgr *sourceManager, dspUpdates chan dspUpdate, gpuState *gpuStatus, recMgr *recorder.Manager, sigSnap *signalSnapshot, eventMu *sync.RWMutex) { | func registerAPIHandlers(mux *http.ServeMux, cfgPath string, cfgManager *runtime.Manager, srcMgr *sourceManager, dspUpdates chan dspUpdate, gpuState *gpuStatus, recMgr *recorder.Manager, sigSnap *signalSnapshot, eventMu *sync.RWMutex) { | ||||
| @@ -7,7 +7,7 @@ import ( | |||||
| "math" | "math" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| func (s *signalSnapshot) set(sig []detector.Signal) { | func (s *signalSnapshot) set(sig []detector.Signal) { | ||||
| @@ -13,15 +13,15 @@ import ( | |||||
| "syscall" | "syscall" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| fftutil "sdr-visual-suite/internal/fft" | |||||
| "sdr-visual-suite/internal/fft/gpufft" | |||||
| "sdr-visual-suite/internal/mock" | |||||
| "sdr-visual-suite/internal/recorder" | |||||
| "sdr-visual-suite/internal/runtime" | |||||
| "sdr-visual-suite/internal/sdr" | |||||
| "sdr-visual-suite/internal/sdrplay" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| fftutil "sdr-wideband-suite/internal/fft" | |||||
| "sdr-wideband-suite/internal/fft/gpufft" | |||||
| "sdr-wideband-suite/internal/mock" | |||||
| "sdr-wideband-suite/internal/recorder" | |||||
| "sdr-wideband-suite/internal/runtime" | |||||
| "sdr-wideband-suite/internal/sdr" | |||||
| "sdr-wideband-suite/internal/sdrplay" | |||||
| ) | ) | ||||
| func main() { | func main() { | ||||
| @@ -1,8 +1,8 @@ | |||||
| package main | package main | ||||
| import ( | import ( | ||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-visual-suite/internal/sdr" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/sdr" | |||||
| ) | ) | ||||
| func (m *sourceManager) Restart(cfg config.Config) error { | func (m *sourceManager) Restart(cfg config.Config) error { | ||||
| @@ -6,10 +6,10 @@ import ( | |||||
| "github.com/gorilla/websocket" | "github.com/gorilla/websocket" | ||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-visual-suite/internal/demod/gpudemod" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-visual-suite/internal/sdr" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/demod/gpudemod" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/sdr" | |||||
| ) | ) | ||||
| type SpectrumDebug struct { | type SpectrumDebug struct { | ||||
| @@ -9,7 +9,7 @@ import ( | |||||
| "github.com/gorilla/websocket" | "github.com/gorilla/websocket" | ||||
| "sdr-visual-suite/internal/recorder" | |||||
| "sdr-wideband-suite/internal/recorder" | |||||
| ) | ) | ||||
| func registerWSHandlers(mux *http.ServeMux, h *hub, recMgr *recorder.Manager) { | func registerWSHandlers(mux *http.ServeMux, h *hub, recMgr *recorder.Manager) { | ||||
| @@ -1,4 +1,4 @@ | |||||
| module sdr-visual-suite | |||||
| module sdr-wideband-suite | |||||
| go 1.22 | go 1.22 | ||||
| @@ -3,7 +3,7 @@ package demod | |||||
| import ( | import ( | ||||
| "math" | "math" | ||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| type NFM struct{} | type NFM struct{} | ||||
| @@ -5,7 +5,7 @@ import ( | |||||
| "math/cmplx" | "math/cmplx" | ||||
| "testing" | "testing" | ||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| func TestMixedBandwidthBatch(t *testing.T) { | func TestMixedBandwidthBatch(t *testing.T) { | ||||
| @@ -12,7 +12,7 @@ import ( | |||||
| "math" | "math" | ||||
| "unsafe" | "unsafe" | ||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| type slotBuffers struct { | type slotBuffers struct { | ||||
| @@ -74,8 +74,8 @@ import ( | |||||
| "math" | "math" | ||||
| "unsafe" | "unsafe" | ||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| type DemodType int | type DemodType int | ||||
| @@ -19,8 +19,8 @@ import ( | |||||
| "sync" | "sync" | ||||
| "unsafe" | "unsafe" | ||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| type DemodType int | type DemodType int | ||||
| @@ -5,7 +5,7 @@ package gpudemod | |||||
| import ( | import ( | ||||
| "math/cmplx" | "math/cmplx" | ||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| // ValidateFreqShift compares a candidate shifted IQ stream against the CPU DSP | // ValidateFreqShift compares a candidate shifted IQ stream against the CPU DSP | ||||
| @@ -5,7 +5,7 @@ package gpudemod | |||||
| import ( | import ( | ||||
| "math/cmplx" | "math/cmplx" | ||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| func ValidateFIR(iq []complex64, taps []float32, filtered []complex64, tol float64) bool { | func ValidateFIR(iq []complex64, taps []float32, filtered []complex64, tol float64) bool { | ||||
| @@ -5,7 +5,7 @@ package gpudemod | |||||
| import ( | import ( | ||||
| "testing" | "testing" | ||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| func TestValidateFreqShiftRejectsMismatchedLength(t *testing.T) { | func TestValidateFreqShiftRejectsMismatchedLength(t *testing.T) { | ||||
| @@ -5,9 +5,9 @@ import ( | |||||
| "sort" | "sort" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/cfar" | |||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/cfar" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| ) | ) | ||||
| type Event struct { | type Event struct { | ||||
| @@ -4,8 +4,8 @@ import ( | |||||
| "testing" | "testing" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| ) | ) | ||||
| func TestDetectorCreatesEvent(t *testing.T) { | func TestDetectorCreatesEvent(t *testing.T) { | ||||
| @@ -8,7 +8,7 @@ import ( | |||||
| "os" | "os" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| const ( | const ( | ||||
| @@ -7,7 +7,7 @@ import ( | |||||
| "testing" | "testing" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| func TestReadRecent(t *testing.T) { | func TestReadRecent(t *testing.T) { | ||||
| @@ -6,7 +6,7 @@ import ( | |||||
| "sync" | "sync" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/sdr" | |||||
| "sdr-wideband-suite/internal/sdr" | |||||
| ) | ) | ||||
| type Source struct { | type Source struct { | ||||
| @@ -1,8 +1,8 @@ | |||||
| package pipeline | package pipeline | ||||
| import ( | import ( | ||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| // RefineCandidates upgrades coarse detector candidates into refined signals | // RefineCandidates upgrades coarse detector candidates into refined signals | ||||
| @@ -1,8 +1,8 @@ | |||||
| package pipeline | package pipeline | ||||
| import ( | import ( | ||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| // Candidate is the coarse output of the surveillance detector. | // Candidate is the coarse output of the surveillance detector. | ||||
| @@ -3,8 +3,8 @@ package recorder | |||||
| import ( | import ( | ||||
| "math" | "math" | ||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| func demodAudioCPU(d demod.Demodulator, iq []complex64, sampleRate int, offset float64, bw float64) ([]float32, int) { | func demodAudioCPU(d demod.Demodulator, iq []complex64, sampleRate int, offset float64, bw float64) ([]float32, int) { | ||||
| @@ -4,7 +4,7 @@ import ( | |||||
| "encoding/json" | "encoding/json" | ||||
| "path/filepath" | "path/filepath" | ||||
| "sdr-visual-suite/internal/decoder" | |||||
| "sdr-wideband-suite/internal/decoder" | |||||
| ) | ) | ||||
| func (m *Manager) runDecodeIfConfigured(mod string, iqPath string, sampleRate int, files map[string]any, dir string) { | func (m *Manager) runDecodeIfConfigured(mod string, iqPath string, sampleRate int, files map[string]any, dir string) { | ||||
| @@ -3,7 +3,7 @@ package recorder | |||||
| import ( | import ( | ||||
| "errors" | "errors" | ||||
| "sdr-visual-suite/internal/decoder" | |||||
| "sdr-wideband-suite/internal/decoder" | |||||
| ) | ) | ||||
| func DecodeOnDemand(cmd string, iqPath string, sampleRate int, audioPath string) (decoder.Result, error) { | func DecodeOnDemand(cmd string, iqPath string, sampleRate int, audioPath string) (decoder.Result, error) { | ||||
| @@ -5,9 +5,9 @@ import ( | |||||
| "log" | "log" | ||||
| "path/filepath" | "path/filepath" | ||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| func (m *Manager) demodAndWrite(dir string, ev detector.Event, iq []complex64, files map[string]any) error { | func (m *Manager) demodAndWrite(dir string, ev detector.Event, iq []complex64, files map[string]any) error { | ||||
| @@ -1,6 +1,6 @@ | |||||
| package recorder | package recorder | ||||
| import "sdr-visual-suite/internal/demod/gpudemod" | |||||
| import "sdr-wideband-suite/internal/demod/gpudemod" | |||||
| func gpuModeFor(name string) (gpudemod.DemodType, bool) { | func gpuModeFor(name string) (gpudemod.DemodType, bool) { | ||||
| switch name { | switch name { | ||||
| @@ -7,7 +7,7 @@ import ( | |||||
| "math" | "math" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| ) | ) | ||||
| // DemodLive demodulates a recent window and returns WAV bytes. | // DemodLive demodulates a recent window and returns WAV bytes. | ||||
| @@ -3,7 +3,7 @@ package recorder | |||||
| import ( | import ( | ||||
| "log" | "log" | ||||
| "sdr-visual-suite/internal/demod/gpudemod" | |||||
| "sdr-wideband-suite/internal/demod/gpudemod" | |||||
| ) | ) | ||||
| func tryGPUAudio(gpu *gpudemod.Engine, label string, iq []complex64, offset float64, bw float64, gpuMode gpudemod.DemodType) ([]float32, int, bool) { | func tryGPUAudio(gpu *gpudemod.Engine, label string, iq []complex64, offset float64, bw float64, gpuMode gpudemod.DemodType) ([]float32, int, bool) { | ||||
| @@ -6,8 +6,8 @@ import ( | |||||
| "path/filepath" | "path/filepath" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| type Meta struct { | type Meta struct { | ||||
| @@ -1,6 +1,6 @@ | |||||
| package recorder | package recorder | ||||
| import "sdr-visual-suite/internal/rds" | |||||
| import "sdr-wideband-suite/internal/rds" | |||||
| type rdsdecoder struct{ rds.Decoder } | type rdsdecoder struct{ rds.Decoder } | ||||
| @@ -10,8 +10,8 @@ import ( | |||||
| "sync" | "sync" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/demod/gpudemod" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/demod/gpudemod" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| ) | ) | ||||
| type Policy struct { | type Policy struct { | ||||
| @@ -14,10 +14,10 @@ import ( | |||||
| "sync" | "sync" | ||||
| "time" | "time" | ||||
| "sdr-visual-suite/internal/classifier" | |||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-visual-suite/internal/detector" | |||||
| "sdr-visual-suite/internal/dsp" | |||||
| "sdr-wideband-suite/internal/classifier" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/detector" | |||||
| "sdr-wideband-suite/internal/dsp" | |||||
| ) | ) | ||||
| // --------------------------------------------------------------------------- | // --------------------------------------------------------------------------- | ||||
| @@ -3,8 +3,8 @@ package recorder | |||||
| import ( | import ( | ||||
| "log" | "log" | ||||
| "sdr-visual-suite/internal/demod" | |||||
| "sdr-visual-suite/internal/demod/gpudemod" | |||||
| "sdr-wideband-suite/internal/demod" | |||||
| "sdr-wideband-suite/internal/demod/gpudemod" | |||||
| ) | ) | ||||
| type wfmHybridResult struct { | type wfmHybridResult struct { | ||||
| @@ -6,7 +6,7 @@ import ( | |||||
| "strings" | "strings" | ||||
| "sync" | "sync" | ||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| ) | ) | ||||
| type ConfigUpdate struct { | type ConfigUpdate struct { | ||||
| @@ -3,7 +3,7 @@ package runtime | |||||
| import ( | import ( | ||||
| "testing" | "testing" | ||||
| "sdr-visual-suite/internal/config" | |||||
| "sdr-wideband-suite/internal/config" | |||||
| ) | ) | ||||
| func TestApplyConfigUpdate(t *testing.T) { | func TestApplyConfigUpdate(t *testing.T) { | ||||
| @@ -77,7 +77,7 @@ import ( | |||||
| "time" | "time" | ||||
| "unsafe" | "unsafe" | ||||
| "sdr-visual-suite/internal/sdr" | |||||
| "sdr-wideband-suite/internal/sdr" | |||||
| ) | ) | ||||
| type Source struct { | type Source struct { | ||||
| @@ -2,7 +2,7 @@ | |||||
| package sdrplay | package sdrplay | ||||
| import "sdr-visual-suite/internal/sdr" | |||||
| import "sdr-wideband-suite/internal/sdr" | |||||
| func New(sampleRate int, centerHz float64, gainDb float64, bwKHz int) (sdr.Source, error) { | func New(sampleRate int, centerHz float64, gainDb float64, bwKHz int) (sdr.Source, error) { | ||||
| return nil, sdr.ErrNotImplemented | return nil, sdr.ErrNotImplemented | ||||