Adding separate folders for SatDump runs.
This commit is contained in:
parent
eafdd6bd73
commit
6c1a9e43ed
|
|
@ -215,12 +215,18 @@ class RdsDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
|||
|
||||
class NoaaAptDemodulator(ServiceDemodulator):
|
||||
def __init__(self, satellite: int = 19, service: bool = False):
|
||||
d = datetime.utcnow()
|
||||
self.outFolder = "/tmp/satdump/NOAA{0}-{1}".format(satellite, d.strftime('%y%m%d-%H%M%S'))
|
||||
self.sampleRate = 50000
|
||||
workers = [
|
||||
SatDumpModule(mode = "noaa_apt", sampleRate = self.sampleRate, options = {
|
||||
"satellite_number" : satellite,
|
||||
"start_timestamp" : int(datetime.utcnow().timestamp())
|
||||
})
|
||||
SatDumpModule(mode = "noaa_apt",
|
||||
sampleRate = self.sampleRate,
|
||||
outFolder = self.outFolder,
|
||||
options = {
|
||||
"satellite_number" : satellite,
|
||||
"start_timestamp" : int(d.timestamp())
|
||||
}
|
||||
)
|
||||
]
|
||||
# Connect all the workers
|
||||
super().__init__(workers)
|
||||
|
|
@ -234,11 +240,15 @@ class NoaaAptDemodulator(ServiceDemodulator):
|
|||
|
||||
class MeteorLrptDemodulator(ServiceDemodulator):
|
||||
def __init__(self, service: bool = False):
|
||||
d = datetime.utcnow()
|
||||
self.outFolder = "/tmp/satdump/METEOR-{0}".format(d.strftime('%y%m%d-%H%M%S'))
|
||||
self.sampleRate = 150000
|
||||
workers = [
|
||||
SatDumpModule(mode = "meteor_m2-x_lrpt", sampleRate = self.sampleRate, options = {
|
||||
"start_timestamp" : int(datetime.utcnow().timestamp())
|
||||
})
|
||||
SatDumpModule(mode = "meteor_m2-x_lrpt",
|
||||
sampleRate = self.sampleRate,
|
||||
outFolder = self.outFolder,
|
||||
options = { "start_timestamp" : int(d.timestamp()) }
|
||||
)
|
||||
]
|
||||
# Connect all the workers
|
||||
super().__init__(workers)
|
||||
|
|
|
|||
|
|
@ -177,21 +177,21 @@ class DablinModule(ExecModule):
|
|||
|
||||
|
||||
class SatDumpModule(ExecModule):
|
||||
def __init__(self, mode: str = "noaa_apt", sampleRate: int = 50000, frequency: int = 137100000, options = None):
|
||||
def __init__(self, mode: str = "noaa_apt", sampleRate: int = 50000, frequency: int = 137100000, outFolder: str = "/tmp/satdump", options = None):
|
||||
# Make sure we have output folder
|
||||
self.outFolder = "/tmp/satdump"
|
||||
try:
|
||||
os.makedirs(self.outFolder, exist_ok = True)
|
||||
os.makedirs(outFolder, exist_ok = True)
|
||||
except:
|
||||
self.outFolder = "/tmp"
|
||||
outFolder = "/tmp"
|
||||
# Compose command line
|
||||
cmd = [
|
||||
"satdump", "live", mode, self.outFolder,
|
||||
"satdump", "live", mode, outFolder,
|
||||
"--source", "file", "--file_path", "/dev/stdin",
|
||||
"--samplerate", str(sampleRate),
|
||||
"--frequency", str(frequency),
|
||||
"--baseband_format", "f32",
|
||||
"--finish_processing",
|
||||
# Not trying to decode actual imagery for now, leaving .CADU file instead
|
||||
# "--finish_processing",
|
||||
]
|
||||
# Add pipeline-specific options
|
||||
if options:
|
||||
|
|
|
|||
|
|
@ -11,12 +11,11 @@ class Bandpass(object):
|
|||
|
||||
|
||||
class Mode:
|
||||
def __init__(self, modulation: str, name: str, bandpass: Bandpass = None, ifRate=None, requirements=None, service=False, client=True, squelch=True):
|
||||
def __init__(self, modulation: str, name: str, bandpass: Bandpass = None, ifRate=None, requirements=None, service=False, squelch=True):
|
||||
self.modulation = modulation
|
||||
self.name = name
|
||||
self.requirements = requirements if requirements is not None else []
|
||||
self.service = service
|
||||
self.client = client
|
||||
self.bandpass = bandpass
|
||||
self.ifRate = ifRate
|
||||
self.squelch = squelch
|
||||
|
|
@ -278,7 +277,6 @@ class Modes(object):
|
|||
requirements=["wxsat"],
|
||||
service=True,
|
||||
squelch=False,
|
||||
client=False,
|
||||
secondaryFft=False
|
||||
),
|
||||
DigitalMode(
|
||||
|
|
@ -289,7 +287,6 @@ class Modes(object):
|
|||
requirements=["wxsat"],
|
||||
service=True,
|
||||
squelch=False,
|
||||
client=False,
|
||||
secondaryFft=False
|
||||
),
|
||||
DigitalMode(
|
||||
|
|
@ -300,7 +297,6 @@ class Modes(object):
|
|||
requirements=["wxsat"],
|
||||
service=True,
|
||||
squelch=False,
|
||||
client=False,
|
||||
secondaryFft=False
|
||||
),
|
||||
DigitalMode(
|
||||
|
|
@ -311,7 +307,6 @@ class Modes(object):
|
|||
requirements=["wxsat"],
|
||||
service=True,
|
||||
squelch=False,
|
||||
client=False,
|
||||
secondaryFft=False
|
||||
),
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue