From d1281644b1a9305ca17664f19941a4d121a2d7fe Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sat, 1 Oct 2022 10:01:46 +0930 Subject: [PATCH] Rebase demodulators, bump version --- auto_rx/autorx/__init__.py | 2 +- demod/mod/demod_mod.c | 27 +++++++++---- demod/mod/meisei100mod.c | 80 ++++++++++++++++++++++++-------------- imet/imet4iq.c | 20 +++++++--- mk2a/mk2a1680mod.c | 28 ++++++++----- scan/dft_detect.c | 19 ++++----- 6 files changed, 115 insertions(+), 61 deletions(-) diff --git a/auto_rx/autorx/__init__.py b/auto_rx/autorx/__init__.py index 19b1ce5..e364e7b 100644 --- a/auto_rx/autorx/__init__.py +++ b/auto_rx/autorx/__init__.py @@ -12,7 +12,7 @@ from queue import Queue # MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus. # PATCH - Small changes, or minor feature additions. -__version__ = "1.6.0-beta11" +__version__ = "1.6.0-beta12" # Global Variables diff --git a/demod/mod/demod_mod.c b/demod/mod/demod_mod.c index 285eadb..0b1dc0c 100644 --- a/demod/mod/demod_mod.c +++ b/demod/mod/demod_mod.c @@ -465,7 +465,7 @@ static int f32read_cblock(dsp_t *dsp) { int n; int len; float x, y; - ui8_t s[4*2*dsp->decM]; //uin8,int16,flot32 + ui8_t s[4*2*dsp->decM]; //uin8,int16,float32 ui8_t *u = (ui8_t*)s; short *b = (short*)s; float *f = (float*)s; @@ -625,20 +625,31 @@ static float complex lowpass0(float complex buffer[], ui32_t sample, ui32_t taps } return (float complex)w; } -static float complex lowpass1(float complex buffer[], ui32_t sample, ui32_t taps, float *ws) { - ui32_t n; - ui32_t s = sample % taps; +static float complex lowpass1a(float complex buffer[], ui32_t sample, ui32_t taps, float *ws) { double complex w = 0; + ui32_t n; + ui32_t S = taps + (sample % taps); for (n = 0; n < taps; n++) { - w += buffer[n]*ws[taps+s-n]; // ws[taps+s-n] = ws[(taps+sample-n)%taps] + w += buffer[n]*ws[S-n]; // ws[taps+s-n] = ws[(taps+sample-n)%taps] } return (float complex)w; // symmetry: ws[n] == ws[taps-1-n] } +//static __attribute__((optimize("-ffast-math"))) float complex lowpass() static float complex lowpass(float complex buffer[], ui32_t sample, ui32_t taps, float *ws) { - float complex w = 0; // -Ofast - int n; - int s = sample % taps; // lpIQ + float complex w = 0; + int n; // -Ofast + int S = taps-1 - (sample % taps); + for (n = 0; n < taps; n++) { + w += buffer[n]*ws[S+n]; // ws[taps+s-n] = ws[(taps+sample-n)%taps] + } + return w; +// symmetry: ws[n] == ws[taps-1-n] +} +static float complex lowpass2(float complex buffer[], ui32_t sample, ui32_t taps, float *ws) { + float complex w = 0; + int n; // -Ofast + int s = sample % taps; int S1 = s+1; int S1N = S1-taps; int n0 = taps-1-s; diff --git a/demod/mod/meisei100mod.c b/demod/mod/meisei100mod.c index 0d73a42..be144ef 100644 --- a/demod/mod/meisei100mod.c +++ b/demod/mod/meisei100mod.c @@ -23,7 +23,7 @@ PCM-FM, 1200 baud biphase-S 1200 bit pro Sekunde: zwei Frames, die wiederum in zwei Subframes unterteilt werden koennen, d.h. 4 mal 300 bit. -Variante 1 (RS-11G ?) +Variante 1 (RS-11G)