kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Merge pull request #1019 from darksidelemm/testing
v1.8.2-beta4 - RS41 updates, preliminary RD94/RD41 supporttesting
commit
c3d4c25f3d
1
Makefile
1
Makefile
|
@ -12,6 +12,7 @@ SUBDIRS := \
|
|||
imet \
|
||||
mk2a \
|
||||
scan \
|
||||
dropsonde \
|
||||
utils \
|
||||
weathex \
|
||||
|
||||
|
|
|
@ -757,7 +757,7 @@ def main():
|
|||
"--type",
|
||||
type=str,
|
||||
default=None,
|
||||
help="Immediately start a decoder for a provided sonde type (Valid Types: RS41, RS92, DFM, M10, M20, IMET, IMETWIDE, IMET5, LMS6, MK2LMS, MEISEI, MRZ)",
|
||||
help="Immediately start a decoder for a provided sonde type (Valid Types: RS41, RS92, DFM, M10, M20, IMET, IMETWIDE, IMET5, LMS6, MK2LMS, MEISEI, MRZ, RD94RD41)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-t",
|
||||
|
|
|
@ -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.8.2-beta3"
|
||||
__version__ = "1.8.2-beta4"
|
||||
|
||||
# Global Variables
|
||||
|
||||
|
|
|
@ -434,6 +434,7 @@ def read_auto_rx_config(filename, no_sdr_test=False):
|
|||
"WXR301": True,
|
||||
"WXRPN9": True,
|
||||
"IMETWIDE": False,
|
||||
"RD94RD41": True,
|
||||
"UDP": False,
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ VALID_SONDE_TYPES = [
|
|||
"UDP",
|
||||
"WXR301",
|
||||
"WXRPN9",
|
||||
"IMETWIDE"
|
||||
"IMETWIDE",
|
||||
"RD94RD41"
|
||||
]
|
||||
|
||||
# Known 'Drifty' Radiosonde types
|
||||
|
@ -124,7 +125,8 @@ class SondeDecoder(object):
|
|||
"UDP",
|
||||
"WXR301",
|
||||
"WXRPN9",
|
||||
"IMETWIDE"
|
||||
"IMETWIDE",
|
||||
"RD94RD41"
|
||||
]
|
||||
|
||||
def __init__(
|
||||
|
@ -834,7 +836,7 @@ class SondeDecoder(object):
|
|||
""" Generate the shell command which runs the relevant radiosonde decoder - Experimental Decoders
|
||||
|
||||
Returns:
|
||||
Tuple(str, str, FSKDemodState) / None: The demod & decoder commands, and a FSKDemodStats object to process the demodulator statistics.
|
||||
Tuple(str, str, FSKDemodStats) / None: The demod & decoder commands, and a FSKDemodStats object to process the demodulator statistics.
|
||||
|
||||
"""
|
||||
|
||||
|
@ -977,6 +979,49 @@ class SondeDecoder(object):
|
|||
demod_stats = FSKDemodStats(averaging_time=2.0, peak_hold=True)
|
||||
self.rx_frequency = self.sonde_freq
|
||||
|
||||
elif self.sonde_type == "RD94RD41":
|
||||
# RD94 / RD41 Dropsondes
|
||||
_baud_rate = 4800
|
||||
|
||||
_sample_rate = 48000
|
||||
_lower = -20000
|
||||
_upper = 20000
|
||||
|
||||
|
||||
demod_cmd = get_sdr_iq_cmd(
|
||||
sdr_type = self.sdr_type,
|
||||
frequency = self.sonde_freq,
|
||||
sample_rate = _sample_rate,
|
||||
sdr_hostname = self.sdr_hostname,
|
||||
sdr_port = self.sdr_port,
|
||||
ss_iq_path = self.ss_iq_path,
|
||||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
||||
# Add in tee command to save IQ to disk if debugging is enabled.
|
||||
if self.save_decode_iq:
|
||||
demod_cmd += f" tee {self.save_decode_iq_path} |"
|
||||
|
||||
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s --stats=%d 2 %d %d - -" % (
|
||||
_lower,
|
||||
_upper,
|
||||
_stats_rate,
|
||||
_sample_rate,
|
||||
_baud_rate,
|
||||
)
|
||||
|
||||
decode_cmd = (
|
||||
"./rd94rd41drop --json --softin 2>/dev/null"
|
||||
)
|
||||
|
||||
# RD94/RD41s transmit continuously - average over the last 2 frames, and use a mean
|
||||
demod_stats = FSKDemodStats(averaging_time=2.0, peak_hold=True)
|
||||
self.rx_frequency = self.sonde_freq
|
||||
|
||||
elif self.sonde_type == "DFM":
|
||||
# DFM06/DFM09/DFM17 Sondes.
|
||||
|
||||
|
@ -1647,9 +1692,10 @@ class SondeDecoder(object):
|
|||
)
|
||||
return False
|
||||
|
||||
if self.udp_mode:
|
||||
# If we are accepting sondes via UDP, we make use of the 'type' field provided by
|
||||
# the decoder.
|
||||
if self.udp_mode or (self.sonde_type == "RD94RD41"):
|
||||
# Cases where we need to accept a type field from the decoder
|
||||
# - UDP mode, where we could be getting packets from multiple decoders.
|
||||
# - Dropsonde decoder, which decodes both RD94 and RD41 dropsondes.
|
||||
self.sonde_type = _telemetry["type"]
|
||||
|
||||
# If frequency has been provided, make used of it.
|
||||
|
@ -1809,6 +1855,17 @@ class SondeDecoder(object):
|
|||
"%Y-%m-%dT%H:%M:%SZ"
|
||||
)
|
||||
|
||||
# Dropsonde actions
|
||||
# Same datetime issues as other sondes (no date provided)
|
||||
if (self.sonde_type == "RD94") or (self.sonde_type == "RD41"):
|
||||
# Fix up the time.
|
||||
_telemetry["datetime_dt"] = fix_datetime(_telemetry["datetime"])
|
||||
# Re-generate the datetime string.
|
||||
_telemetry["datetime"] = _telemetry["datetime_dt"].strftime(
|
||||
"%Y-%m-%dT%H:%M:%SZ"
|
||||
)
|
||||
|
||||
|
||||
# RS41 Subframe Data Actions
|
||||
# We only upload the subframe data once.
|
||||
if 'rs41_calconf51x16' in _telemetry:
|
||||
|
|
|
@ -618,7 +618,14 @@ def detect_sonde(
|
|||
% (_sdr_name, _score, _offset_est)
|
||||
)
|
||||
_sonde_type = "WXRPN9"
|
||||
|
||||
|
||||
elif "RD94RD41" in _type:
|
||||
logging.debug(
|
||||
"Scanner (%s) - Detected a RD94 or RD41 Dropsonde! (Score: %.2f, Offset: %.1f Hz)"
|
||||
% (_sdr_name, _score, _offset_est)
|
||||
)
|
||||
_sonde_type = "RD94RD41"
|
||||
|
||||
else:
|
||||
_sonde_type = None
|
||||
|
||||
|
|
|
@ -156,6 +156,16 @@ class SondehubUploader(object):
|
|||
if "subtype" in telemetry:
|
||||
_output["subtype"] = telemetry["subtype"]
|
||||
|
||||
elif telemetry["type"] == "RD94":
|
||||
_output["manufacturer"] = "Vaisala"
|
||||
_output["type"] = "RD94"
|
||||
_output["serial"] = telemetry["id"]
|
||||
|
||||
elif telemetry["type"] == "RD41":
|
||||
_output["manufacturer"] = "Vaisala"
|
||||
_output["type"] = "RD41"
|
||||
_output["serial"] = telemetry["id"]
|
||||
|
||||
elif telemetry["type"].startswith("DFM"):
|
||||
_output["manufacturer"] = "Graw"
|
||||
_output["type"] = "DFM"
|
||||
|
|
|
@ -1664,6 +1664,7 @@
|
|||
<option value="MTS01">MTS01</option>
|
||||
<option value="WXR301">WXR301</option>
|
||||
<option value="WXRPN9">WXR301 (PN9 variant)</option>
|
||||
<option value="RD94RD41">RD94/RD41 Dropsonde</option>
|
||||
</select>
|
||||
<div style="display:inline;vertical-align:middle;">
|
||||
<button id="start-decoder" onclick="start_decoder();">Start</button>
|
||||
|
|
|
@ -216,6 +216,10 @@ def short_type_lookup(type_name):
|
|||
return "Weathex WxR-301D"
|
||||
elif type_name == "WXRPN9":
|
||||
return "Weathex WxR-301D (PN9 Variant)"
|
||||
elif type_name == "RD41":
|
||||
return "Vaisala RD41 Dropsonde"
|
||||
elif type_name == "RD94":
|
||||
return "Vaisala RD94 Dropsonde"
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
|
@ -264,6 +268,10 @@ def short_short_type_lookup(type_name):
|
|||
return "WXR301(PN9)"
|
||||
elif type_name == "PS15":
|
||||
return "PS15"
|
||||
elif type_name == "RD41":
|
||||
return "RD41"
|
||||
elif type_name == "RD94":
|
||||
return "RD94"
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
|
@ -956,6 +964,7 @@ def rtlsdr_test(device_idx="0", rtl_sdr_path="rtl_sdr", retries=5):
|
|||
while _rtlsdr_retries > 0:
|
||||
try:
|
||||
FNULL = open(os.devnull, "w") # Inhibit stderr output
|
||||
logging.debug(f"Testing RTLSDR with command: {_rtl_cmd}")
|
||||
_ret_code = subprocess.check_call(_rtl_cmd, shell=True, stderr=FNULL)
|
||||
FNULL.close()
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
|
|
@ -41,5 +41,6 @@ mv ../demod/mod/mp3h1mod .
|
|||
mv ../demod/mod/mts01mod .
|
||||
mv ../demod/mod/iq_dec .
|
||||
mv ../weathex/weathex301d .
|
||||
mv ../dropsonde/rd94rd41drop .
|
||||
|
||||
echo "Done!"
|
||||
|
|
|
@ -708,7 +708,38 @@ static void prn_table(void) {
|
|||
|
||||
|
||||
INCSTAT
|
||||
int rs_init_RS255(RS_t *RS) {
|
||||
int rs_init_RS(RS_t *RS) {
|
||||
GF_t *gf = &RS->GF;
|
||||
int i, check_gen;
|
||||
ui8_t Xalp[MAX_DEG+1];
|
||||
|
||||
check_gen = GF_genTab(gf);
|
||||
|
||||
for (i = 0; i <= MAX_DEG; i++) RS->g[i] = 0;
|
||||
for (i = 0; i <= MAX_DEG; i++) Xalp[i] = 0;
|
||||
|
||||
// beta=alpha^p primitive root of g(X)
|
||||
// beta^ip=alpha
|
||||
for (i = 1; i < gf->ord-1; i++) {
|
||||
if ( (RS->p * i) % (gf->ord-1) == 1 ) {
|
||||
RS->ip = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// g(X)=(X-(alpha^p)^b)...(X-(alpha^p)^(b+2t-1))
|
||||
RS->g[0] = 0x01;
|
||||
Xalp[1] = 0x01; // X
|
||||
for (i = 0; i < 2*RS->t; i++) {
|
||||
Xalp[0] = gf->exp_a[(RS->p*(RS->b+i)) % (gf->ord-1)]; // Xalp[0..1]: X - (alpha^p)^(b+i)
|
||||
poly_mul(gf, RS->g, Xalp, RS->g);
|
||||
}
|
||||
|
||||
return check_gen;
|
||||
}
|
||||
|
||||
INCSTAT
|
||||
int rs_init_RS255(RS_t *RS) { // RS(255, 231)
|
||||
GF_t *gf = &RS->GF;
|
||||
int i, check_gen;
|
||||
ui8_t Xalp[MAX_DEG+1];
|
||||
|
@ -732,7 +763,7 @@ int rs_init_RS255(RS_t *RS) {
|
|||
}
|
||||
|
||||
INCSTAT
|
||||
int rs_init_RS255ccsds(RS_t *RS) {
|
||||
int rs_init_RS255ccsds(RS_t *RS) { // RS(255, 223)
|
||||
GF_t *gf = &RS->GF;
|
||||
int i, check_gen;
|
||||
ui8_t Xalp[MAX_DEG+1];
|
||||
|
|
|
@ -13,8 +13,17 @@
|
|||
#ifdef INCLUDESTATIC
|
||||
#define INCSTAT static
|
||||
#else
|
||||
#ifndef INTTYPES
|
||||
#define INTTYPES
|
||||
typedef unsigned char ui8_t;
|
||||
typedef unsigned int ui32_t;
|
||||
typedef unsigned short ui16_t;
|
||||
typedef unsigned int ui32_t;
|
||||
typedef char i8_t;
|
||||
typedef short i16_t;
|
||||
typedef int i32_t;
|
||||
#endif
|
||||
//typedef unsigned char ui8_t;
|
||||
//typedef unsigned int ui32_t;
|
||||
#define INCSTAT
|
||||
#endif
|
||||
|
||||
|
@ -83,8 +92,9 @@ static RS_t RS16ccsds = { 15, 2, 4, 11, 6, 1, 1, {0}, {0} };
|
|||
|
||||
#ifndef INCLUDESTATIC
|
||||
|
||||
int rs_init_RS255(RS_t *RS);
|
||||
int rs_init_RS255ccsds(RS_t *RS);
|
||||
int rs_init_RS(RS_t *RS);
|
||||
int rs_init_RS255(RS_t *RS); // RS(255, 231)
|
||||
int rs_init_RS255ccsds(RS_t *RS); // RS(255, 223)
|
||||
int rs_init_RS15ccsds(RS_t *RS);
|
||||
int rs_init_BCH64(RS_t *RS);
|
||||
|
||||
|
|
|
@ -151,7 +151,8 @@ typedef struct {
|
|||
ui16_t conf_bt; // burst timer (sec)
|
||||
ui16_t conf_cd; // kill countdown (sec) (kt or bt)
|
||||
ui8_t conf_bk; // burst kill
|
||||
char rstyp[9]; // RS41-SG, RS41-SGP
|
||||
char rstyp[10]; // RS41-SG, RS41-SGP, RS41-SGPE
|
||||
char rstmp[10]; // RS41-SG, RS41-SGP, RS41-SGPE
|
||||
char rsm[10]; // RSM421
|
||||
int aux;
|
||||
char xdata[XDATA_LEN+16]; // xdata: aux_str1#aux_str2 ...
|
||||
|
@ -343,7 +344,8 @@ GPS chip: ublox UBX-G6010-ST
|
|||
#define pos_Calfreq 0x055 // 2 byte, calfr 0x00
|
||||
#define pos_Calburst 0x05E // 1 byte, calfr 0x02
|
||||
// ? #define pos_Caltimer 0x05A // 2 byte, calfr 0x02 ?
|
||||
#define pos_CalRSTyp 0x05B // 8 byte, calfr 0x21 (+2 byte in 0x22?)
|
||||
#define pos_CalRSTyp 0x05B // 8 byte, calfr 0x21 (+2 byte in 0x22)
|
||||
#define pos_CalRSTyp2 0x053 // 1+1 byte, calfr 0x22
|
||||
// weitere chars in calfr 0x22/0x23; weitere ID (RSM)
|
||||
#define pos_CalRSM 0x055 // 6 byte, calfr 0x22
|
||||
|
||||
|
@ -468,7 +470,8 @@ static int get_SondeID(gpx_t *gpx, int crc, int ofs) {
|
|||
//for (i = 0; i < 51; i++) gpx->calfrchk[i] = 0;
|
||||
memset(gpx->calfrchk, 0, 51); // 0x00..0x32
|
||||
// reset conf data
|
||||
memset(gpx->rstyp, 0, 9);
|
||||
memset(gpx->rstyp, 0, 10);
|
||||
memset(gpx->rstmp, 0, 10);
|
||||
memset(gpx->rsm, 0, 10);
|
||||
gpx->calconf_complete = 0;
|
||||
gpx->calconf_sent = 0;
|
||||
|
@ -1551,8 +1554,6 @@ static int get_Calconf(gpx_t *gpx, int out, int ofs) {
|
|||
ui8_t calfr = 0;
|
||||
ui16_t fw = 0;
|
||||
int freq = 0, f0 = 0, f1 = 0;
|
||||
char sondetyp[9];
|
||||
char rsmtyp[10];
|
||||
int err = 0;
|
||||
|
||||
gpx->calconf_subfrm = gpx->frame+pos_CalData+ofs;
|
||||
|
@ -1621,14 +1622,13 @@ static int get_Calconf(gpx_t *gpx, int out, int ofs) {
|
|||
}
|
||||
|
||||
if (calfr == 0x21) { // ... eventuell noch 2 bytes in 0x22
|
||||
for (i = 0; i < 9; i++) sondetyp[i] = 0;
|
||||
memset(gpx->rstmp, 0, 10);
|
||||
for (i = 0; i < 8; i++) {
|
||||
byte = gpx->frame[pos_CalRSTyp+ofs + i];
|
||||
if ((byte >= 0x20) && (byte < 0x7F)) sondetyp[i] = byte;
|
||||
else if (byte == 0x00) sondetyp[i] = '\0';
|
||||
if ((byte >= 0x20) && (byte < 0x7F)) gpx->rstmp[i] = byte;
|
||||
else if (byte == 0x00) gpx->rstmp[i] = '\0';
|
||||
}
|
||||
if (out && gpx->option.vbs) fprintf(stdout, ": %s ", sondetyp);
|
||||
strcpy(gpx->rstyp, sondetyp);
|
||||
|
||||
if (out && gpx->option.vbs == 3) { // Stationsdruck QFE
|
||||
float qfe1 = 0.0, qfe2 = 0.0;
|
||||
memcpy(&qfe1, gpx->frame+pos_CalData+1, 4);
|
||||
|
@ -1642,14 +1642,21 @@ static int get_Calconf(gpx_t *gpx, int out, int ofs) {
|
|||
}
|
||||
|
||||
if (calfr == 0x22) {
|
||||
for (i = 0; i < 10; i++) rsmtyp[i] = 0;
|
||||
// CalRSTyp-part2
|
||||
byte = gpx->frame[pos_CalRSTyp2+ofs + 0]; // gpx->frame[pos_CalRSTyp2+ofs + 1] = 0x00
|
||||
if ((byte >= 0x20) && (byte < 0x7F)) gpx->rstmp[8] = byte;
|
||||
else if (byte == 0x00) gpx->rstmp[8] = '\0';
|
||||
strcpy(gpx->rstyp, gpx->rstmp);
|
||||
memset(gpx->rstmp, 0, 10);
|
||||
if (out && gpx->option.vbs && *gpx->rstyp) fprintf(stdout, ": %s ", gpx->rstyp);
|
||||
|
||||
memset(gpx->rsm, 0, 10);
|
||||
for (i = 0; i < 8; i++) {
|
||||
byte = gpx->frame[pos_CalRSM+ofs + i];
|
||||
if ((byte >= 0x20) && (byte < 0x7F)) rsmtyp[i] = byte;
|
||||
else /*if (byte == 0x00)*/ rsmtyp[i] = '\0';
|
||||
if ((byte >= 0x20) && (byte < 0x7F)) gpx->rsm[i] = byte;
|
||||
else /*if (byte == 0x00)*/ gpx->rsm[i] = '\0';
|
||||
}
|
||||
if (out && gpx->option.vbs) fprintf(stdout, ": %s ", rsmtyp);
|
||||
strcpy(gpx->rsm, rsmtyp);
|
||||
if (out && gpx->option.vbs) fprintf(stdout, ": %s ", gpx->rsm);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
CFLAGS = -O3 -w -Wno-unused-variable
|
||||
LDLIBS = -lm
|
||||
|
||||
PROGRAMS := rd94rd41drop
|
||||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
rd94rd41drop: rd94rd41drop.o
|
||||
|
||||
rd94rd41drop.o : CFLAGS += -O3
|
||||
|
||||
clean:
|
||||
$(RM) $(PROGRAMS) $(PROGRAMS:=.o)
|
Plik diff jest za duży
Load Diff
|
@ -50,6 +50,10 @@ static char rs92_header[] = //"10100110011001101001"
|
|||
"10100110011001101001"
|
||||
"10100110011001101001"
|
||||
"1010011001100110100110101010100110101001";
|
||||
static char rd94rd41_header[] = "10100110010110101001" // 0x1A = 0 01011000 1
|
||||
"10010101011010010101" // 0xCF = 0 11110011 1
|
||||
"10101001010101010101" // 0xFC = 0 00111111 1
|
||||
"10011001010110101001"; // 0x1D = 0 10111000 1
|
||||
|
||||
//int lms_sps = 4800; // lms6_403MHz
|
||||
static char lms6_header[] = "0101011000001000""0001110010010111"
|
||||
|
@ -64,6 +68,7 @@ static char m10_header[] = //"10011001100110010100110010011001";
|
|||
// frame byte[0..1]: byte[0]=framelen-1, byte[1]=type(8F=M2K2,9F=M10,AF=M10+,20=M20)
|
||||
// M2K2 : 64 8F : 01100100 10001111
|
||||
// M10 : 64 9F : 01100100 10011111 (framelen 0x64+1) (baud=9616)
|
||||
// M10 : 66 9F : 01100110 10011111 (framelen 0x66+1) (baud=9600) (2025)
|
||||
// M10-aux: 76 9F : 01110110 10011111 (framelen 0x76+1)
|
||||
// M10+ : 64 AF : 01100100 10101111 (w/ gtop-GPS)
|
||||
// M20 : 45 20 : 01000101 00100000 (framelen 0x45+1) (baud=9600)
|
||||
|
@ -151,6 +156,7 @@ static float set_lpIQ = 0.0;
|
|||
#define tn_M20 6
|
||||
#define tn_LMS6 8
|
||||
#define tn_MEISEI 9
|
||||
#define tn_RD94RD41 10
|
||||
#define tn_MRZ 12
|
||||
#define tn_MTS01 13
|
||||
#define tn_C34C50 15
|
||||
|
@ -163,28 +169,29 @@ static float set_lpIQ = 0.0;
|
|||
#define tn_IMET1rs 28
|
||||
#define tn_IMET1ab 29
|
||||
|
||||
#define Nrs 17
|
||||
#define idxIMETafsk 14
|
||||
#define idxRS 15
|
||||
#define idxI4 16
|
||||
#define idxIMETafsk 15
|
||||
#define idxRS 16
|
||||
#define idxI4 17
|
||||
#define Nrs 18
|
||||
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},
|
||||
{ 4800, 0, 0, rs92_header, 0.5, 0.0, 0.70, 3, NULL, "RS92", tn_RS92, 0, 1, 0.0, 0.0}, // RS92NGP: 1680/400=4.2
|
||||
{ 4800, 0, 0, lms6_header, 1.0, 0.0, 0.60, 8, NULL, "LMS6", tn_LMS6, 0, 1, 0.0, 0.0}, // lmsX: 7?
|
||||
{ 4800, 0, 0, imet54_header, 0.5, 0.0, 0.80, 2, NULL, "IMET5", tn_IMET5, 0, 1, 0.0, 0.0}, // (rs_hdr[idxI5])
|
||||
{ 9616, 0, 0, mk2a_header, 1.0, 0.0, 0.70, 2, NULL, "MK2LMS", tn_MK2LMS, 1, 2, 0.0, 0.0}, // Mk2a/LMS6-1680 , --IQ: decimate > 170kHz ...
|
||||
{ 9608, 0, 0, m10_header, 1.0, 0.0, 0.76, 2, NULL, "M10", tn_M10, 1, 2, 0.0, 0.0}, // M10.tn=5 (baud=9616) , M20.tn=6 (baud=9600)
|
||||
{ 2400, 0, 0, meisei_header, 1.0, 0.0, 0.70, 2, NULL, "MEISEI", tn_MEISEI, 0, 2, 0.0, 0.0},
|
||||
{ 2400, 0, 0, mrz_header, 1.5, 0.0, 0.80, 2, NULL, "MRZ", tn_MRZ, 0, 1, 0.0, 0.0},
|
||||
{ 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 ...
|
||||
{ 9600, 0, 0, imet1rs_header, 0.5, 0.0, 0.80, 2, NULL, "IMET4", tn_IMET4, 1, 1, 0.0, 0.0}, // (rs_hdr[idxI4])
|
||||
{ 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},
|
||||
{ 4800, 0, 0, rs92_header, 0.5, 0.0, 0.70, 3, NULL, "RS92", tn_RS92, 0, 1, 0.0, 0.0}, // RS92NGP: 1680/400=4.2
|
||||
{ 4800, 0, 0, lms6_header, 1.0, 0.0, 0.60, 8, NULL, "LMS6", tn_LMS6, 0, 1, 0.0, 0.0}, // lmsX: 7?
|
||||
{ 4800, 0, 0, imet54_header, 0.5, 0.0, 0.80, 2, NULL, "IMET5", tn_IMET5, 0, 1, 0.0, 0.0}, // (rs_hdr[idxI5])
|
||||
{ 9616, 0, 0, mk2a_header, 1.0, 0.0, 0.70, 2, NULL, "MK2LMS", tn_MK2LMS, 1, 2, 0.0, 0.0}, // Mk2a/LMS6-1680 , --IQ: decimate > 170kHz ...
|
||||
{ 9608, 0, 0, m10_header, 1.0, 0.0, 0.76, 2, NULL, "M10", tn_M10, 1, 2, 0.0, 0.0}, // M10.tn=5 (baud=9616) , M20.tn=6 (baud=9600)
|
||||
{ 2400, 0, 0, meisei_header, 1.0, 0.0, 0.70, 2, NULL, "MEISEI", tn_MEISEI, 0, 2, 0.0, 0.0},
|
||||
{ 4800, 0, 0, rd94rd41_header, 1.0, 0.0, 0.70, 2, NULL, "RD94RD41", tn_RD94RD41, 0, 1, 0.0, 0.0}, // Dropsonde RD94/RD41
|
||||
{ 2400, 0, 0, mrz_header, 1.5, 0.0, 0.80, 2, NULL, "MRZ", tn_MRZ, 0, 1, 0.0, 0.0},
|
||||
{ 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 ...
|
||||
{ 9600, 0, 0, imet1rs_header, 0.5, 0.0, 0.80, 2, NULL, "IMET4", tn_IMET4, 1, 1, 0.0, 0.0}, // (rs_hdr[idxI4])
|
||||
};
|
||||
|
||||
static int idx_MTS01 = -1,
|
||||
|
@ -1349,6 +1356,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
int d2_tn = Nrs;
|
||||
|
||||
ui32_t frm2_M10M20 = 0;
|
||||
|
||||
#ifdef CYGWIN
|
||||
_setmode(fileno(stdin), _O_BINARY); // _setmode(_fileno(stdin), _O_BINARY);
|
||||
|
@ -1515,7 +1523,7 @@ int main(int argc, char **argv) {
|
|||
herrs = headcmp(1, mv_pos[j], mv[j]<0, rs_hdr+j);
|
||||
if (herrs < rs_hdr[j].herrs) // max bit-errors in header
|
||||
{
|
||||
if ( strncmp(rs_hdr[j].type, "M10", 3) == 0 || strncmp(rs_hdr[j].type, "M20", 3) == 0)
|
||||
if (strncmp(rs_hdr[j].type, "M10", 3) == 0 || strncmp(rs_hdr[j].type, "M20", 3) == 0)
|
||||
{
|
||||
ui32_t bytes = frm_M10(mv_pos[j], mv[j]<0, rs_hdr+j);
|
||||
int len = (bytes >> 8) & 0xFF;
|
||||
|
@ -1528,6 +1536,7 @@ int main(int argc, char **argv) {
|
|||
rs_hdr[j].type = "M10";
|
||||
rs_hdr[j].tn = tn_M10; // M10: 64 9F , M10+: 64 AF , M10-dop: 64 49 (len > 0x60)
|
||||
}
|
||||
frm2_M10M20 = bytes;
|
||||
}
|
||||
|
||||
if ( strncmp(rs_hdr[j].type, "IMETafsk", 8) == 0 ) // ? j == idxIMETafsk
|
||||
|
@ -1610,6 +1619,11 @@ int main(int argc, char **argv) {
|
|||
if ( !option_d2 || j == d2_tn ) {
|
||||
if (option_verbose) fprintf(stdout, "sample: %d\n", mv_pos[j]);
|
||||
fprintf(stdout, "%s: %.4f", rs_hdr[j].type, mv[j]);
|
||||
if (strncmp(rs_hdr[j].type, "M10", 3) == 0 || strncmp(rs_hdr[j].type, "M20", 3) == 0)
|
||||
{
|
||||
if (option_verbose) fprintf(stdout, " [%04X]", frm2_M10M20 & 0xFFFF);
|
||||
frm2_M10M20 = 0;
|
||||
}
|
||||
if (option_dc && option_iq) {
|
||||
fprintf(stdout, " , %+.1fHz", rs_hdr[j].df*sr_base);
|
||||
if (option_verbose) {
|
||||
|
|
Ładowanie…
Reference in New Issue