-
Notifications
You must be signed in to change notification settings - Fork 163
JT4 enablement #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
JT4 enablement #374
Changes from 6 commits
c16ec8e
cde00a0
d494a59
14087c2
f8fb178
6e6100f
965287b
d4d4f72
cf7b81f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,13 @@ def decoding_depth(self): | |
| # default when no setting is provided | ||
| return 3 | ||
|
|
||
| def jt4_frequency_tolerance(self): | ||
| pm = Config.get() | ||
| if "jt4_frequency_tolerance" in pm: | ||
| return pm["jt4_frequency_tolerance"] | ||
| # default when no setting is provided | ||
| return 20 | ||
|
|
||
| def getTimestampFormat(self): | ||
| if self.getInterval() < 60: | ||
| return "%H%M%S" | ||
|
|
@@ -62,6 +69,16 @@ def getProfiles(self) -> List[AudioChopperProfile]: | |
| return [Fst4wProfile(i) for i in profiles if i in Fst4wProfile.availableIntervals] | ||
|
|
||
|
|
||
| class JT4ProfileSource(ConfigWiredProfileSource): | ||
| def getPropertiesToWire(self) -> List[str]: | ||
| return ["jt4_enabled_submodes"] | ||
|
|
||
| def getProfiles(self) -> List[AudioChopperProfile]: | ||
| config = Config.get() | ||
| profiles = config["jt4_enabled_submodes"] if "jt4_enabled_submodes" in config else [] | ||
| return [JT4Profile(i) for i in profiles if i in JT4Profile.availableSubmodes] | ||
|
|
||
|
|
||
| class Q65ProfileSource(ConfigWiredProfileSource): | ||
| def getPropertiesToWire(self) -> List[str]: | ||
| return ["q65_enabled_combinations"] | ||
|
|
@@ -102,6 +119,8 @@ def getSource(mode: str): | |
| return Fst4ProfileSource() | ||
| elif mode == "fst4w": | ||
| return Fst4wProfileSource() | ||
| elif mode == "jt4": | ||
| return JT4ProfileSource() | ||
| elif mode == "q65": | ||
| return Q65ProfileSource() | ||
|
|
||
|
|
@@ -197,6 +216,25 @@ def getMode(self): | |
| return "FST4W" | ||
|
|
||
|
|
||
| class JT4Profile(WsjtProfile): | ||
| availableSubmodes = ["A", "B", "C", "D", "E", "F", "G"] | ||
|
|
||
| def __init__(self, submode): | ||
| self.submode = submode | ||
|
|
||
| def getInterval(self): | ||
| return 60 | ||
|
|
||
| def getSubmode(self): | ||
|
||
| return self.submode | ||
|
|
||
| def decoder_commandline(self, file): | ||
| return ["jt9", "-4", "-b", str(self.submode), "-d", str(self.decoding_depth()), "-F", str(self.jt4_frequency_tolerance()), file] | ||
|
|
||
| def getMode(self): | ||
| return "JT4" | ||
|
|
||
|
|
||
| class Q65Mode(Enum): | ||
| # value is the bandwidth multiplier according to https://physics.princeton.edu/pulsar/k1jt/Q65_Quick_Start.pdf | ||
| A = 1 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has no business being on
WsjtProfileif it's only used inJt4Profile. Please move.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getInterval is used - as this mode is decoded every 60 seconds, if removed:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected.