Skip to content

Commit

Permalink
Merge pull request #898 from projecthorus/testing
Browse files Browse the repository at this point in the history
v1.7.4 Release
  • Loading branch information
darksidelemm authored Jun 20, 2024
2 parents b8f4335 + 86866a5 commit 757925e
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 9 deletions.
3 changes: 2 additions & 1 deletion auto_rx/auto_rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@ def telemetry_filter(telemetry):
vaisala_callsign_valid = re.match(r"[C-Z][\d][\d][\d]\d{4}", _serial)

# Just make sure we're not getting the 'xxxxxxxx' unknown serial from the DFM decoder.
if "DFM" in telemetry["type"]:
# Also applies to PS15 sondes.
if "DFM" in telemetry["type"] or "PS15" in telemetry["type"]:
dfm_callsign_valid = "x" not in _serial.split("-")[1]
else:
dfm_callsign_valid = False
Expand Down
2 changes: 1 addition & 1 deletion auto_rx/autorx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 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.7.3"
__version__ = "1.7.4"

# Global Variables

Expand Down
5 changes: 3 additions & 2 deletions auto_rx/autorx/decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,8 @@ def generate_decoder_command_experimental(self):
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 - -" % (
# NOTE - Using inverted soft decision outputs, so DFM type detection works correctly.
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s -i --stats=%d 2 %d %d - -" % (
_lower,
_upper,
_stats_rate,
Expand All @@ -991,7 +992,7 @@ def generate_decoder_command_experimental(self):
self.raw_file_option = "--rawecc"

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

# DFM sondes transmit continuously - average over the last 2 frames, and peak hold
Expand Down
12 changes: 12 additions & 0 deletions auto_rx/autorx/sondehub.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ def reformat_data(self, telemetry):
# for our packets to pass the Sondehub z-check.
self.slower_uploads = True

elif telemetry["type"] == "PS15":
_output["manufacturer"] = "Graw"
_output["type"] = "PS-15"
_output["subtype"] = "PS-15"
_output["serial"] = telemetry["id"].split("-")[1]
if "dfmcode" in telemetry:
_output["dfmcode"] = telemetry["dfmcode"]

# We are handling DFM packets. We need a few more of these in an upload
# for our packets to pass the Sondehub z-check.
self.slower_uploads = True

elif telemetry["type"].startswith("M10") or telemetry["type"].startswith("M20"):
_output["manufacturer"] = "Meteomodem"
_output["type"] = telemetry["type"]
Expand Down
9 changes: 5 additions & 4 deletions auto_rx/autorx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def short_type_lookup(type_name):
return "Vaisala " + type_name
elif type_name.startswith("DFM"):
return "Graw " + type_name
elif type_name == "PS15":
return "Graw PS15"
elif type_name.startswith("M10"):
return "Meteomodem M10"
elif type_name.startswith("M20"):
Expand Down Expand Up @@ -260,6 +262,8 @@ def short_short_type_lookup(type_name):
return "WXR301"
elif type_name == "WXRPN9":
return "WXR301(PN9)"
elif type_name == "PS15":
return "PS15"
else:
return "Unknown"

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

# Convert to upper-case hex, and take the last 5 nibbles.
_id_suffix = hex(_dfm_id).upper()[-5:]

elif "M10" in sonde_data["type"]:
# Use the generated id same as dxlAPRS
_object_name = sonde_data["aprsid"]
Expand Down
14 changes: 13 additions & 1 deletion utils/fsk_demod.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ int main(int argc,char *argv[]){
int nsym = FSK_DEFAULT_NSYM;
int mask = 0;
int tx_tone_separation = 100;
int softinv = 0;

int o = 0;
int opt_idx = 0;
while( o != -1 ){
static struct option long_opts[] = {
{"help", no_argument, 0, 'h'},
{"softinv", no_argument, 0, 'i'},
{"conv", required_argument, 0, 'p'},
{"cs16", no_argument, 0, 'c'},
{"cu8", no_argument, 0, 'd'},
Expand All @@ -96,7 +98,7 @@ int main(int argc,char *argv[]){
{0, 0, 0, 0}
};

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

switch(o){
case 'c':
Expand All @@ -110,6 +112,9 @@ int main(int argc,char *argv[]){
case 'f':
testframe_mode = 1;
break;
case 'i':
softinv = 1;
break;
case 't':
enable_stats = 1;
if(optarg != NULL){
Expand Down Expand Up @@ -415,6 +420,13 @@ int main(int argc,char *argv[]){
}

if(soft_dec_mode){
// Invert soft decision polarity.
if(softinv){
for(j=0; j<fsk->Nbits; j++) {
sdbuf[j] = sdbuf[j]*-1.0;
}
}

fwrite(sdbuf,sizeof(float),fsk->Nbits,fout);
}else{
fwrite(bitbuf,sizeof(uint8_t),fsk->Nbits,fout);
Expand Down

0 comments on commit 757925e

Please sign in to comment.