Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e18dbd1
Move telem/scan plot/map to HTML details method
ke5gdb Dec 17, 2024
316ed76
Bump to beta1
ke5gdb Dec 17, 2024
1466682
Added mapid_details conditional
ke5gdb Dec 19, 2024
7f013a8
Merge pull request #961 from ke5gdb/testing
darksidelemm Dec 21, 2024
bd994f6
Add channel filter option for KA9Q sources, tweak decode settings for…
Dec 23, 2024
f995c6d
Change default map/table behavior to open
ke5gdb Dec 23, 2024
045ba43
Invert logic per suggestion from @argilo
ke5gdb Dec 23, 2024
8dfaef2
Merge pull request #963 from ke5gdb/testing
darksidelemm Dec 23, 2024
705576b
Change default minimum decoder spacing for network decoder example
Dec 24, 2024
8c666ed
Merge pull request #962 from darksidelemm/testing
darksidelemm Dec 24, 2024
3795d3b
Increase default SDR test timeout to 20 seconds.
Dec 26, 2024
17ae4ad
Merge pull request #964 from darksidelemm/testing
darksidelemm Dec 26, 2024
08d137f
Comment out lsusb parsing errors
Dec 29, 2024
4cdef6b
Use pcmrecord instead of pcmcat
argilo Dec 30, 2024
fd135c1
Revert "Work around ka9q-radio powers locale bug"
argilo Dec 31, 2024
154cf95
Add libogg-dev dependency
argilo Dec 31, 2024
85307ed
Testing some more decoder tweaks
Dec 31, 2024
bdf2e90
Merge pull request #971 from argilo/use-pcmrecord
darksidelemm Jan 1, 2025
45af5cb
Merge remote-tracking branch 'upstream/testing' into testing
Jan 1, 2025
cbd4b55
Bump testing version
Jan 1, 2025
468e65d
Merge pull request #972 from darksidelemm/testing
darksidelemm Jan 1, 2025
263ae31
Narrow detection bandwidth to avoid adjacent-channel interference
argilo Jan 3, 2025
42afb46
Merge pull request #973 from argilo/narrow-detection-bw
darksidelemm Jan 3, 2025
db9e20a
Bump testing version
Jan 3, 2025
5922652
Merge pull request #974 from darksidelemm/testing
darksidelemm Jan 3, 2025
dba32fc
Specify image sizes in img tag
argilo Jan 12, 2025
df832f3
Use qemu8 for builds
snh Feb 7, 2025
9bdfd65
Merge pull request #978 from projecthorus/snh/qemu8
darksidelemm Feb 7, 2025
5c082ea
Merge pull request #976 from argilo/table-height-fix
darksidelemm Feb 7, 2025
f1462c8
Rebase RS41 decoder, adding X-series decode support. Add mod to extra…
Feb 7, 2025
62c4894
Revert back to previous known working ka9q-radio commit
Feb 7, 2025
f7ec4d7
Merge pull request #979 from darksidelemm/testing
darksidelemm Feb 8, 2025
fca246f
Update to the latest ka9q-radio commit
argilo Feb 8, 2025
604b729
Merge pull request #980 from argilo/update-ka9q
darksidelemm Feb 10, 2025
4a1f231
Rebase RS41 and M20 demodulators to rs1729 latest testing
Feb 10, 2025
12ae2ba
Merge pull request #982 from darksidelemm/testing
darksidelemm Feb 10, 2025
a02b3b5
Update to latest ka9q-radio commit
argilo Feb 12, 2025
355eddc
Merge pull request #983 from argilo/update-ka9q-2
darksidelemm Feb 12, 2025
927befa
Rebase rs41mod to latest, includes fractional seconds
Feb 14, 2025
82af407
Merge pull request #984 from darksidelemm/testing
darksidelemm Feb 14, 2025
d587edc
Bump ka9q-radio version
Feb 14, 2025
54f82a3
Merge remote-tracking branch 'upstream/testing' into testing
Feb 14, 2025
a1b9c54
Merge pull request #985 from darksidelemm/testing
darksidelemm Feb 14, 2025
9a788e8
Remove commented out code
Feb 16, 2025
564c11e
Update version prior to merge
Feb 21, 2025
73cc869
Merge pull request #988 from darksidelemm/testing
darksidelemm Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v8.1.5

- name: Setup Buildx
uses: docker/setup-buildx-action@v3
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN apt-get update && \
libbsd-dev \
libfftw3-dev \
libiniparser-dev \
libogg-dev \
libopus-dev && \
rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -61,11 +62,11 @@ RUN git clone https://github.com/miweber67/spyserver_client.git /root/spyserver_
# Compile ka9q-radio from source
RUN git clone https://github.com/ka9q/ka9q-radio.git /root/ka9q-radio && \
cd /root/ka9q-radio && \
git checkout ff7fe26a12909317b26bdb24a0576db87c15baf2 && \
git checkout d0febaa033e1d53b9b53078cfe17457ac3676d20 && \
make \
-f Makefile.linux \
"COPTS=-std=gnu11 -pthread -Wall -funsafe-math-optimizations -fno-math-errno -fcx-limited-range -D_GNU_SOURCE=1" \
tune powers pcmcat
ARCHOPTS= \
tune powers pcmrecord

# Copy in radiosonde_auto_rx.
COPY . /root/radiosonde_auto_rx
Expand Down Expand Up @@ -118,7 +119,7 @@ RUN ln -s ss_client /opt/auto_rx/ss_iq && \
# Copy ka9q-radio utilities
COPY --from=build /root/ka9q-radio/tune /usr/local/bin/
COPY --from=build /root/ka9q-radio/powers /usr/local/bin/
COPY --from=build /root/ka9q-radio/pcmcat /usr/local/bin/
COPY --from=build /root/ka9q-radio/pcmrecord /usr/local/bin/

# Allow mDNS resolution for ka9q-radio utilities
RUN sed -i -e 's/files dns/files mdns4_minimal [NOTFOUND=return] dns/g' /etc/nsswitch.conf
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Improvements from the upstream RS codebase will be merged into this codebase whe
Please consider joining the Google Group to receive updates on new software features:
https://groups.google.com/forum/#!forum/radiosonde_auto_rx

We also have a channel in the SondeHub Discord server: https://sondehub.org/go/discord

## Presentations
* Linux.conf.au 2019 - https://www.youtube.com/watch?v=YBy-bXEWZeM
* UKHAS Conference 2019 - [Presented via Skype](https://youtu.be/azDJmMywBgw?t=643) which had some audio issues at the start. Slides [here](https://rfhead.net/sondes/auto_rx_presentation_UKHAS2019.pdf).
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.8.0"
__version__ = "1.8.1"

# Global Variables

Expand Down
30 changes: 15 additions & 15 deletions auto_rx/autorx/decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,10 @@ def generate_decoder_command_experimental(self):
_baud_rate = 4800
_sample_rate = 48000 # 10x Oversampling

# Limit FSK estimator window to roughly +/- 10 kHz
_lower = -10000
_upper = 10000
# Limit FSK estimator window to roughly +/- 5 kHz
_lower = -5000
_upper = 5000


demod_cmd = get_sdr_iq_cmd(
sdr_type = self.sdr_type,
Expand All @@ -844,14 +845,17 @@ def generate_decoder_command_experimental(self):
ppm = self.ppm,
gain = self.gain,
bias = self.bias,
dc_block = True
dc_block = True,
channel_filter = 5000 # +/- 5 kHz channel filter.
)

# Add in tee command to save IQ to disk if debugging is enabled.
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 - -" % (
# Use a 4800 Hz mask estimator to better avoid adjacent sonde issues.
# Also seems to give a small performance bump.
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s --mask 4800 --stats=%d 2 %d %d - -" % (
_lower,
_upper,
_stats_rate,
Expand Down Expand Up @@ -949,15 +953,9 @@ def generate_decoder_command_experimental(self):
_baud_rate = 2500
_sample_rate = 50000 # 10x Oversampling

# Limit FSK estimator window to roughly +/- 10 kHz
_lower = -10000
_upper = 10000

if (abs(403200000 - self.sonde_freq) < 20000) and (self.sdr_type == "RTLSDR"):
# Narrow up the frequency estimator window if we are close to
# the 403.2 MHz RTLSDR Spur.
_lower = -8000
_upper = 8000
# Limit FSK estimator window to roughly +/- 5 kHz
_lower = -5000
_upper = 5000

demod_cmd = get_sdr_iq_cmd(
sdr_type = self.sdr_type,
Expand All @@ -970,14 +968,16 @@ def generate_decoder_command_experimental(self):
ppm = self.ppm,
gain = self.gain,
bias = self.bias,
dc_block = True
dc_block = True,
channel_filter = 5000
)

# Add in tee command to save IQ to disk if debugging is enabled.
if self.save_decode_iq:
demod_cmd += f" tee {self.save_decode_iq_path} |"

# NOTE - Using inverted soft decision outputs, so DFM type detection works correctly.
# No mask estimator - DFMs seem to decode better without it!
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s -i --stats=%d 2 %d %d - -" % (
_lower,
_upper,
Expand Down
27 changes: 19 additions & 8 deletions auto_rx/autorx/ka9q.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,29 @@ def ka9q_setup_channel(
sdr_hostname,
frequency,
sample_rate,
scan
scan,
channel_filter = None
):
if scan:
ssrc="04"
else:
ssrc="01"

# tune --samprate 48000 --frequency 404m09 --mode iq --ssrc 404090000 --radio sonde.local

if channel_filter:
_low = int(channel_filter * -1.0)
_high = int(channel_filter)
else:
_low = int(int(sample_rate) / (-2.4))
_high = int(int(sample_rate) / 2.4)

_cmd = (
f"{timeout_cmd()} 5 " # Add a timeout, because connections to non-existing servers block for ages
f"tune "
f"--samprate {int(sample_rate)} "
f"--mode iq "
f"--low {int(int(sample_rate) / (-2.4))} --high {int(int(sample_rate) / 2.4)} "
f"--low {_low} --high {_high} "
f"--frequency {int(frequency)} "
f"--ssrc {round(frequency / 1000)}{ssrc} "
f"--radio {sdr_hostname}"
Expand Down Expand Up @@ -120,28 +129,30 @@ def ka9q_get_iq_cmd(
sdr_hostname,
frequency,
sample_rate,
scan
scan,
channel_filter = None
):
if scan:
ssrc="04"
else:
ssrc="01"

# We need to setup a channel before we can use it!
_setup_success = ka9q_setup_channel(sdr_hostname, frequency, sample_rate, scan)
_setup_success = ka9q_setup_channel(sdr_hostname, frequency, sample_rate, scan, channel_filter)

if not _setup_success:
logging.critical(f"KA9Q ({sdr_hostname}) - Could not setup rx channel! Decoder will likely timeout.")

# Get the 'PCM' version of the server name, where as assume -pcm is added to the first part of the hostname.
_pcm_host = sdr_hostname.split('.')[0] + "-pcm." + ".".join(sdr_hostname.split(".")[1:])

# Example: pcmcat -s 404090000 sonde-pcm.local
# Example: pcmrecord --ssrc 404090001 --catmode --raw sonde-pcm.local
# -2 option was removed sometime in early 2024.
_cmd = (
f"pcmcat "
f"-s {round(frequency / 1000)}{ssrc} "
f"-b 1 "
f"pcmrecord "
f"--ssrc {round(frequency / 1000)}{ssrc} "
f"--catmode "
f"--raw "
f"{_pcm_host} |"
)

Expand Down
8 changes: 1 addition & 7 deletions auto_rx/autorx/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,7 @@ def detect_sonde(
_if_bw = 64
else:
_iq_bw = 48000
_if_bw = 20

# Try and avoid the RTLSDR 403.2 MHz spur.
# Note that this is only goign to work if we are detecting on 403.210 or 403.190 MHz.
if (abs(403200000 - frequency) < 20000) and (sdr_type == "RTLSDR"):
logging.debug("Scanner - Narrowing detection IF BW to avoid RTLSDR spur.")
_if_bw = 15
_if_bw = 15

else:
# 1680 MHz sondes
Expand Down
17 changes: 9 additions & 8 deletions auto_rx/autorx/sdr_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_sdr(
ss_iq_path = "./ss_iq",
ss_power_path = "./ss_power",
check_freq = 401500000,
timeout = 5
timeout = 20
):
"""
Test the prescence / functionality of a SDR.
Expand Down Expand Up @@ -60,8 +60,8 @@ def test_sdr(
# if not os.path.isfile('tune'):
# logging.critical("Could not find KA9Q-Radio 'tune' binary! This may need to be compiled and installed.")
# return False
# if not os.path.isfile('pcmcat'):
# logging.critical("Could not find KA9Q-Radio 'pcmcat' binary! This may need to be compiled and installed.")
# if not os.path.isfile('pcmrecord'):
# logging.critical("Could not find KA9Q-Radio 'pcmrecord' binary! This may need to be compiled and installed.")
# return False
# TBD - whatever we need for spectrum use.
# if not os.path.isfile('TBD'):
Expand Down Expand Up @@ -281,7 +281,8 @@ def get_sdr_iq_cmd(
sdr_hostname = "",
sdr_port = 5555,
ss_iq_path = "./ss_iq",
scan = False
scan = False,
channel_filter = None
):
"""
Get a command-line argument to get IQ (signed 16-bit) from a SDR
Expand All @@ -303,7 +304,8 @@ def get_sdr_iq_cmd(
Arguments for KA9Q SDR Server / SpyServer:
sdr_hostname (str): Hostname of KA9Q Server
sdr_port (int): Port number of KA9Q Server
scan (bool): Create unique SSRC for scan attempts
scan (bool): Create unique SSRC for scan attempts (KA9Q Only)
channel_filter (int/float): Set a high/lowpass frequency for a KA9Q channel.

Arguments for SpyServer Client:
ss_iq_path (str): Path to spyserver IQ client utility.
Expand Down Expand Up @@ -361,9 +363,9 @@ def get_sdr_iq_cmd(
return _cmd

if sdr_type == "KA9Q":
_cmd = ka9q_get_iq_cmd(sdr_hostname, frequency, sample_rate, scan)
_cmd = ka9q_get_iq_cmd(sdr_hostname, frequency, sample_rate, scan, channel_filter)

if dc_block:
if dc_block and ("KA9Q" not in sdr_type):
_cmd += _dc_remove

return _cmd
Expand Down Expand Up @@ -779,7 +781,6 @@ def get_power_spectrum(
_ssrc = f"{round(_center_freq / 1000)}03"

_powers_cmd = (
f"LANG=C " # temporary workaround for https://github.com/ka9q/ka9q-radio/pull/65#issuecomment-2480243690
f"{_timeout_cmd} {ka9q_powers_path} "
f"{sdr_hostname} "
f"-f {_center_freq} "
Expand Down
Loading
Loading