diff --git a/scan/dft_detect.c b/scan/dft_detect.c index 32ea4cd..ea39222 100644 --- a/scan/dft_detect.c +++ b/scan/dft_detect.c @@ -116,6 +116,10 @@ static char weathex_header[] = "10101010""10101010""10101010" // AA AA AA (preamble) "00101101""11010100"; //"10101010"; // 2D D4 55/AA +static char wxr2pn9_header[] = + "10101010""10101010""10101010" // AA AA AA (preamble) + "11000001""10010100"; //"11000001"; // C1 94 C1 + typedef struct { int sps; // header: symbol rate, baud @@ -140,28 +144,29 @@ static float lpFM_bw[2] = { 4e3, 10e3 }; // FM-audio lowpass bandwidth static float lpIQ_bw[N_bwIQ] = { 6e3, 12e3, 22e3, 200e3 }; // IF iq lowpass bandwidth static float set_lpIQ = 0.0; -#define tn_DFM 2 -#define tn_RS41 3 -#define tn_RS92 4 -#define tn_M10 5 -#define tn_M20 6 -#define tn_LMS6 8 -#define tn_MEISEI 9 -#define tn_MRZ 12 -#define tn_MTS01 13 -#define tn_C34C50 15 -#define tn_WXR301 16 -#define tn_MK2LMS 18 -#define tn_IMET5 24 -#define tn_IMETa 25 -#define tn_IMET4 26 -#define tn_IMET1rs 28 -#define tn_IMET1ab 29 +#define tn_DFM 2 +#define tn_RS41 3 +#define tn_RS92 4 +#define tn_M10 5 +#define tn_M20 6 +#define tn_LMS6 8 +#define tn_MEISEI 9 +#define tn_MRZ 12 +#define tn_MTS01 13 +#define tn_C34C50 15 +#define tn_WXR301 16 +#define tn_WXRpn9 17 +#define tn_MK2LMS 18 +#define tn_IMET5 24 +#define tn_IMETa 25 +#define tn_IMET4 26 +#define tn_IMET1rs 28 +#define tn_IMET1ab 29 -#define Nrs 16 -#define idxIMETafsk 13 -#define idxRS 14 -#define idxI4 15 +#define Nrs 17 +#define idxIMETafsk 14 +#define idxRS 15 +#define idxI4 16 static rsheader_t rs_hdr[Nrs] = { { 2500, 0, 0, dfm_header, 1.0, 0.0, 0.65, 2, NULL, "DFM9", tn_DFM, 0, 1, 0.0, 0.0}, // DFM6: -2 ? { 4800, 0, 0, rs41_header, 0.5, 0.0, 0.70, 2, NULL, "RS41", tn_RS41, 0, 1, 0.0, 0.0}, @@ -175,6 +180,7 @@ static rsheader_t rs_hdr[Nrs] = { { 1200, 0, 0, mts01_header, 1.0, 0.0, 0.65, 2, NULL, "MTS01", tn_MTS01, 0, 0, 0.0, 0.0}, { 5800, 0, 0, c34_preheader, 1.5, 0.0, 0.80, 2, NULL, "C34C50", tn_C34C50, 0, 2, 0.0, 0.0}, // C34/C50 2900 Hz tone { 4800, 0, 0, weathex_header, 1.0, 0.0, 0.65, 2, NULL, "WXR301", tn_WXR301, 0, 3, 0.0, 0.0}, + { 5000, 0, 0, wxr2pn9_header, 1.0, 0.0, 0.65, 2, NULL, "WXRPN9", tn_WXRpn9, 0, 3, 0.0, 0.0}, { 9600, 0, 0, imet1ab_header, 1.0, 0.0, 0.80, 2, NULL, "IMET1AB", tn_IMET1ab, 1, 3, 0.0, 0.0}, // (rs_hdr[idxAB]) { 9600, 0, 0, imet_preamble, 0.5, 0.0, 0.80, 4, NULL, "IMETafsk", tn_IMETa , 1, 1, 0.0, 0.0}, // IMET1AB, IMET1RS (IQ)IMET4 { 9600, 0, 0, imet1rs_header, 0.5, 0.0, 0.80, 2, NULL, "IMET1RS", tn_IMET1rs, 0, 3, 0.0, 0.0}, // (rs_hdr[idxRS]) IMET4: lpIQ=0 ... @@ -184,6 +190,7 @@ static rsheader_t rs_hdr[Nrs] = { static int idx_MTS01 = -1, idx_C34C50 = -1, idx_WXR301 = -1, + idx_WXRPN9 = -1, idx_IMET1AB = -1; @@ -1143,6 +1150,7 @@ static int init_buffers() { #endif #ifdef NOWXR301 if ( strncmp(rs_hdr[j].type, "WXR301", 5) == 0 ) idx_WXR301 = j; + if ( strncmp(rs_hdr[j].type, "WXRPN9", 5) == 0 ) idx_WXRPN9 = j; #endif #ifdef NOIMET1AB if ( strncmp(rs_hdr[j].type, "IMET1AB", 7) == 0 ) idx_IMET1AB = j; @@ -1153,7 +1161,7 @@ static int init_buffers() { rs_hdr[j].spb = sample_rate/(float)rs_hdr[j].sps; rs_hdr[j].hLen = strlen(rs_hdr[j].header); rs_hdr[j].L = rs_hdr[j].hLen * rs_hdr[j].spb + 0.5; - if (j != idx_MTS01 && j != idx_C34C50 && j != idx_WXR301 && j != idx_IMET1AB) { + if (j != idx_MTS01 && j != idx_C34C50 && j != idx_WXR301 && j != idx_WXRPN9 && j != idx_IMET1AB) { if (rs_hdr[j].hLen > hLen) hLen = rs_hdr[j].hLen; if (rs_hdr[j].L > Lmax) Lmax = rs_hdr[j].L; } @@ -1477,6 +1485,7 @@ int main(int argc, char **argv) { if ( j == idx_MTS01 ) continue; // only ifdef NOMTS01 if ( j == idx_C34C50 ) continue; // only ifdef NOC34C50 if ( j == idx_WXR301 ) continue; // only ifdef NOWXR301 + if ( j == idx_WXRPN9 ) continue; // only ifdef NOWXR301 if ( j == idx_IMET1AB ) continue; // only ifdef NOIMET1AB mv0_pos[j] = mv_pos[j];