Skip to content

Commit 757925e

Browse files
authored
Merge pull request #898 from projecthorus/testing
v1.7.4 Release
2 parents b8f4335 + 86866a5 commit 757925e

File tree

6 files changed

+36
-9
lines changed

6 files changed

+36
-9
lines changed

auto_rx/auto_rx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,8 @@ def telemetry_filter(telemetry):
631631
vaisala_callsign_valid = re.match(r"[C-Z][\d][\d][\d]\d{4}", _serial)
632632

633633
# Just make sure we're not getting the 'xxxxxxxx' unknown serial from the DFM decoder.
634-
if "DFM" in telemetry["type"]:
634+
# Also applies to PS15 sondes.
635+
if "DFM" in telemetry["type"] or "PS15" in telemetry["type"]:
635636
dfm_callsign_valid = "x" not in _serial.split("-")[1]
636637
else:
637638
dfm_callsign_valid = False

auto_rx/autorx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
1313
# PATCH - Small changes, or minor feature additions.
1414

15-
__version__ = "1.7.3"
15+
__version__ = "1.7.4"
1616

1717
# Global Variables
1818

auto_rx/autorx/decode.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,8 @@ def generate_decoder_command_experimental(self):
977977
if self.save_decode_iq:
978978
demod_cmd += f" tee {self.save_decode_iq_path} |"
979979

980-
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s --stats=%d 2 %d %d - -" % (
980+
# NOTE - Using inverted soft decision outputs, so DFM type detection works correctly.
981+
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s -i --stats=%d 2 %d %d - -" % (
981982
_lower,
982983
_upper,
983984
_stats_rate,
@@ -991,7 +992,7 @@ def generate_decoder_command_experimental(self):
991992
self.raw_file_option = "--rawecc"
992993

993994
decode_cmd = (
994-
f"./dfm09mod -vv --ecc --json --dist --auto --softin -i {self.raw_file_option} 2>/dev/null"
995+
f"./dfm09mod -vv --ecc --json --dist --auto --softin {self.raw_file_option} 2>/dev/null"
995996
)
996997

997998
# DFM sondes transmit continuously - average over the last 2 frames, and peak hold

auto_rx/autorx/sondehub.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,18 @@ def reformat_data(self, telemetry):
168168
# for our packets to pass the Sondehub z-check.
169169
self.slower_uploads = True
170170

171+
elif telemetry["type"] == "PS15":
172+
_output["manufacturer"] = "Graw"
173+
_output["type"] = "PS-15"
174+
_output["subtype"] = "PS-15"
175+
_output["serial"] = telemetry["id"].split("-")[1]
176+
if "dfmcode" in telemetry:
177+
_output["dfmcode"] = telemetry["dfmcode"]
178+
179+
# We are handling DFM packets. We need a few more of these in an upload
180+
# for our packets to pass the Sondehub z-check.
181+
self.slower_uploads = True
182+
171183
elif telemetry["type"].startswith("M10") or telemetry["type"].startswith("M20"):
172184
_output["manufacturer"] = "Meteomodem"
173185
_output["type"] = telemetry["type"]

auto_rx/autorx/utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ def short_type_lookup(type_name):
186186
return "Vaisala " + type_name
187187
elif type_name.startswith("DFM"):
188188
return "Graw " + type_name
189+
elif type_name == "PS15":
190+
return "Graw PS15"
189191
elif type_name.startswith("M10"):
190192
return "Meteomodem M10"
191193
elif type_name.startswith("M20"):
@@ -260,6 +262,8 @@ def short_short_type_lookup(type_name):
260262
return "WXR301"
261263
elif type_name == "WXRPN9":
262264
return "WXR301(PN9)"
265+
elif type_name == "PS15":
266+
return "PS15"
263267
else:
264268
return "Unknown"
265269

@@ -273,7 +277,7 @@ def generate_aprs_id(sonde_data):
273277
if ("RS92" in sonde_data["type"]) or ("RS41" in sonde_data["type"]):
274278
# We can use the Vaisala sonde ID directly.
275279
_object_name = sonde_data["id"].strip()
276-
elif "DFM" in sonde_data["type"]:
280+
elif "DFM" in sonde_data["type"] or "PS15" in sonde_data["type"]:
277281
# As per agreement with other radiosonde decoding software developers, we will now
278282
# use the DFM serial number verbatim in the APRS ID, prefixed with 'D'.
279283
# For recent DFM sondes, this will result in a object ID of: Dyynnnnnn
@@ -288,9 +292,6 @@ def generate_aprs_id(sonde_data):
288292
# Create the object name
289293
_object_name = "D%d" % _dfm_id
290294

291-
# Convert to upper-case hex, and take the last 5 nibbles.
292-
_id_suffix = hex(_dfm_id).upper()[-5:]
293-
294295
elif "M10" in sonde_data["type"]:
295296
# Use the generated id same as dxlAPRS
296297
_object_name = sonde_data["aprsid"]

utils/fsk_demod.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ int main(int argc,char *argv[]){
7777
int nsym = FSK_DEFAULT_NSYM;
7878
int mask = 0;
7979
int tx_tone_separation = 100;
80+
int softinv = 0;
8081

8182
int o = 0;
8283
int opt_idx = 0;
8384
while( o != -1 ){
8485
static struct option long_opts[] = {
8586
{"help", no_argument, 0, 'h'},
87+
{"softinv", no_argument, 0, 'i'},
8688
{"conv", required_argument, 0, 'p'},
8789
{"cs16", no_argument, 0, 'c'},
8890
{"cu8", no_argument, 0, 'd'},
@@ -96,7 +98,7 @@ int main(int argc,char *argv[]){
9698
{0, 0, 0, 0}
9799
};
98100

99-
o = getopt_long(argc,argv,"fhlp:cdt::sb:u:m",long_opts,&opt_idx);
101+
o = getopt_long(argc,argv,"fhilp:cdt::sb:u:m",long_opts,&opt_idx);
100102

101103
switch(o){
102104
case 'c':
@@ -110,6 +112,9 @@ int main(int argc,char *argv[]){
110112
case 'f':
111113
testframe_mode = 1;
112114
break;
115+
case 'i':
116+
softinv = 1;
117+
break;
113118
case 't':
114119
enable_stats = 1;
115120
if(optarg != NULL){
@@ -415,6 +420,13 @@ int main(int argc,char *argv[]){
415420
}
416421

417422
if(soft_dec_mode){
423+
// Invert soft decision polarity.
424+
if(softinv){
425+
for(j=0; j<fsk->Nbits; j++) {
426+
sdbuf[j] = sdbuf[j]*-1.0;
427+
}
428+
}
429+
418430
fwrite(sdbuf,sizeof(float),fsk->Nbits,fout);
419431
}else{
420432
fwrite(bitbuf,sizeof(uint8_t),fsk->Nbits,fout);

0 commit comments

Comments
 (0)