Skip to content

Commit

Permalink
Merge pull request #1371 from anarkiwi/frequp
Browse files Browse the repository at this point in the history
stare mode initial frequency
  • Loading branch information
anarkiwi authored Aug 4, 2024
2 parents 18cb9c9 + eb53c82 commit fba5f7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libvulkan-dev \
pybind11-dev
WORKDIR /root
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.114
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.115
COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs
WORKDIR /root/gr-iqtlabs/build
COPY --from=iqtlabs/gamutrf-sigmf:latest /usr/local /usr/local
Expand Down
9 changes: 6 additions & 3 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ def __init__(
description = description.strip('"')
tune_step_hz = int(samp_rate * tuneoverlap)
stare = False
initial_freq = freq_start

if freq_end == 0:
stare = True
freq_end = freq_start + (tune_step_hz - 1)
initial_freq += int((freq_end - freq_start) / 2)
logging.info(
f"using stare mode, scan from {freq_start/1e6}MHz to {freq_end/1e6}MHz"
)
Expand Down Expand Up @@ -167,7 +169,7 @@ def __init__(
nfft,
tune_step_fft,
agc=False,
center_freq=freq_start,
center_freq=initial_freq,
sdrargs=sdrargs,
dc_ettus_auto_offset=dc_ettus_auto_offset,
)
Expand Down Expand Up @@ -202,6 +204,7 @@ def __init__(
if write_fft_points:
fft_dir = sample_dir
Path(sample_dir).mkdir(parents=True, exist_ok=True)
samples_vlen = fft_batch_size * nfft
self.samples_blocks.extend(
[
# blocks.vector_to_stream(
Expand All @@ -213,10 +216,10 @@ def __init__(
"rx_freq",
gr.sizeof_gr_complex,
"_".join(("cf32", endianstr())),
fft_batch_size * nfft,
samples_vlen,
sample_dir,
"samples",
write_samples,
int(write_samples / samples_vlen),
skip_tune_step,
int(samp_rate),
rotate_secs,
Expand Down

0 comments on commit fba5f7a

Please sign in to comment.