wsjt decoding depth configuration
This commit is contained in:
parent
392c226cbe
commit
5b6edd110d
@ -260,6 +260,13 @@ wsjt_queue_workers = 2
|
||||
# if you are running background services, make sure this number is high enough to accept the task influx during peaks
|
||||
# i.e. this should be higher than the number of wsjt services running at the same time
|
||||
wsjt_queue_length = 10
|
||||
# wsjt decoding depth will allow more results, but will also consume more cpu
|
||||
wsjt_decoding_depth = 3
|
||||
# can also be set for each mode separately
|
||||
# jt65 seems to be somewhat prone to erroneous decodes, this setting handles that to some extent
|
||||
wsjt_decoding_depths = {
|
||||
"jt65": 1
|
||||
}
|
||||
|
||||
temporary_directory = "/tmp"
|
||||
|
||||
|
30
owrx/wsjt.py
30
owrx/wsjt.py
@ -180,6 +180,17 @@ class WsjtChopper(threading.Thread):
|
||||
except EOFError:
|
||||
return None
|
||||
|
||||
def decoding_depth(self, mode):
|
||||
pm = PropertyManager.getSharedInstance()
|
||||
# mode-specific setting?
|
||||
if "wsjt_decoding_depths" in pm and mode in pm["wsjt_decoding_depths"]:
|
||||
return pm["wsjt_decoding_depths"][mode]
|
||||
# return global default
|
||||
if "wsjt_decoding_depth" in pm:
|
||||
return pm["wsjt_decoding_depth"]
|
||||
# default when no setting is provided
|
||||
return 3
|
||||
|
||||
|
||||
class Ft8Chopper(WsjtChopper):
|
||||
def __init__(self, source):
|
||||
@ -188,8 +199,7 @@ class Ft8Chopper(WsjtChopper):
|
||||
super().__init__(source)
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
# TODO expose decoding quality parameters through config
|
||||
return ["jt9", "--ft8", "-d", "3", file]
|
||||
return ["jt9", "--ft8", "-d", str(self.decoding_depth("ft8")), file]
|
||||
|
||||
|
||||
class WsprChopper(WsjtChopper):
|
||||
@ -199,8 +209,11 @@ class WsprChopper(WsjtChopper):
|
||||
super().__init__(source)
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
# TODO expose decoding quality parameters through config
|
||||
return ["wsprd", "-d", file]
|
||||
cmd = ["wsprd"]
|
||||
if self.decoding_depth("wspr") > 1:
|
||||
cmd += ["-d"]
|
||||
cmd += [file]
|
||||
return cmd
|
||||
|
||||
|
||||
class Jt65Chopper(WsjtChopper):
|
||||
@ -210,8 +223,7 @@ class Jt65Chopper(WsjtChopper):
|
||||
super().__init__(source)
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
# TODO expose decoding quality parameters through config
|
||||
return ["jt9", "--jt65", "-d", "1", file]
|
||||
return ["jt9", "--jt65", "-d", str(self.decoding_depth("jt65")), file]
|
||||
|
||||
|
||||
class Jt9Chopper(WsjtChopper):
|
||||
@ -221,8 +233,7 @@ class Jt9Chopper(WsjtChopper):
|
||||
super().__init__(source)
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
# TODO expose decoding quality parameters through config
|
||||
return ["jt9", "--jt9", "-d", "3", file]
|
||||
return ["jt9", "--jt9", "-d", str(self.decoding_depth("jt9")), file]
|
||||
|
||||
|
||||
class Ft4Chopper(WsjtChopper):
|
||||
@ -232,8 +243,7 @@ class Ft4Chopper(WsjtChopper):
|
||||
super().__init__(source)
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
# TODO expose decoding quality parameters through config
|
||||
return ["jt9", "--ft4", "-d", "3", file]
|
||||
return ["jt9", "--ft4", "-d", str(self.decoding_depth("ft4")), file]
|
||||
|
||||
|
||||
class WsjtParser(object):
|
||||
|
Loading…
Reference in New Issue
Block a user