Compare commits

..

No commits in common. "57e36203aa4ef0d2d86fa90cfb7390fe7f23127b" and "1c3ec5cb4904d61648c0f2fe45d99234886e75f5" have entirely different histories.

3 changed files with 32 additions and 102 deletions

View file

@ -205,7 +205,7 @@ blocks:
ant8: ''
ant9: ''
args: '"rtl_tcp"'
bb_gain0: '0'
bb_gain0: '20'
bb_gain1: '20'
bb_gain10: '20'
bb_gain11: '20'
@ -374,7 +374,7 @@ blocks:
freq7: 100e6
freq8: 100e6
freq9: 100e6
gain0: '0'
gain0: '10'
gain1: '10'
gain10: '10'
gain11: '10'
@ -438,7 +438,7 @@ blocks:
gain_mode7: 'False'
gain_mode8: 'False'
gain_mode9: 'False'
if_gain0: '0'
if_gain0: '20'
if_gain1: '20'
if_gain10: '20'
if_gain11: '20'

View file

@ -45,23 +45,11 @@ blocks:
coordinate: [168, 8.0]
rotation: 0
state: enabled
- name: decimation
- name: samp_rate
id: variable
parameters:
comment: ''
value: '4'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [352, 8.0]
rotation: 0
state: enabled
- name: rf_rate
id: variable
parameters:
comment: ''
value: '200_000'
value: '50_000'
states:
bus_sink: false
bus_source: false
@ -69,38 +57,6 @@ blocks:
coordinate: [264, 8.0]
rotation: 0
state: enabled
- name: samp_rate
id: variable
parameters:
comment: ''
value: rf_rate // decimation
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [456, 8.0]
rotation: 0
state: enabled
- name: analog_agc_xx_0
id: analog_agc_xx
parameters:
affinity: ''
alias: ''
comment: ''
gain: '1.0'
max_gain: '65536'
maxoutbuf: '0'
minoutbuf: '0'
rate: 1e-4
reference: '0.7'
type: complex
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [360, 312.0]
rotation: 0
state: enabled
- name: analog_quadrature_demod_cf_0
id: analog_quadrature_demod_cf
parameters:
@ -114,7 +70,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [768, 616.0]
coordinate: [640, 536.0]
rotation: 0
state: true
- name: blocks_message_debug_0
@ -129,7 +85,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1056, 112.0]
coordinate: [928, 32.0]
rotation: 0
state: true
- name: blocks_probe_rate_0
@ -149,7 +105,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [768, 120.0]
coordinate: [640, 40.0]
rotation: 0
state: true
- name: digital_costas_loop_cc_0
@ -167,33 +123,9 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [768, 424.0]
coordinate: [640, 344.0]
rotation: 0
state: true
- name: low_pass_filter_0
id: low_pass_filter
parameters:
affinity: ''
alias: ''
beta: '6.76'
comment: ''
cutoff_freq: samp_rate / 8
decim: decimation
gain: '1'
interp: '1'
maxoutbuf: '0'
minoutbuf: '0'
samp_rate: rf_rate
type: fir_filter_ccf
width: samp_rate / 8
win: window.WIN_HAMMING
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [520, 284.0]
rotation: 0
state: enabled
- name: osmosdr_source_0
id: osmosdr_source
parameters:
@ -232,7 +164,7 @@ blocks:
ant8: ''
ant9: ''
args: '"rtl_tcp"'
bb_gain0: '0'
bb_gain0: '20'
bb_gain1: '20'
bb_gain10: '20'
bb_gain11: '20'
@ -401,7 +333,7 @@ blocks:
freq7: 100e6
freq8: 100e6
freq9: 100e6
gain0: '0'
gain0: '10'
gain1: '10'
gain10: '10'
gain11: '10'
@ -465,7 +397,7 @@ blocks:
gain_mode7: 'False'
gain_mode8: 'False'
gain_mode9: 'False'
if_gain0: '0'
if_gain0: '20'
if_gain1: '20'
if_gain10: '20'
if_gain11: '20'
@ -533,7 +465,7 @@ blocks:
minoutbuf: '0'
nchan: '1'
num_mboards: '1'
sample_rate: rf_rate
sample_rate: samp_rate
sync: sync
time_source0: ''
time_source1: ''
@ -548,7 +480,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [104, 244.0]
coordinate: [152, 164.0]
rotation: 0
state: enabled
- name: qtgui_const_sink_x_0
@ -640,7 +572,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1056, 408.0]
coordinate: [928, 328.0]
rotation: 0
state: true
- name: qtgui_time_sink_x_0
@ -737,7 +669,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [768, 312.0]
coordinate: [640, 232.0]
rotation: 0
state: true
- name: qtgui_time_sink_x_0_0
@ -834,7 +766,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1056, 592.0]
coordinate: [928, 512.0]
rotation: 0
state: true
- name: qtgui_time_sink_x_0_1
@ -931,7 +863,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1056, 480.0]
coordinate: [928, 400.0]
rotation: 0
state: true
- name: qtgui_waterfall_sink_x_0_0
@ -992,22 +924,20 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [768, 208.0]
coordinate: [640, 128.0]
rotation: 0
state: true
connections:
- [analog_agc_xx_0, '0', low_pass_filter_0, '0']
- [analog_quadrature_demod_cf_0, '0', qtgui_time_sink_x_0_0, '0']
- [blocks_probe_rate_0, rate, blocks_message_debug_0, print]
- [digital_costas_loop_cc_0, '0', qtgui_const_sink_x_0, '0']
- [digital_costas_loop_cc_0, '0', qtgui_time_sink_x_0_1, '0']
- [low_pass_filter_0, '0', analog_quadrature_demod_cf_0, '0']
- [low_pass_filter_0, '0', blocks_probe_rate_0, '0']
- [low_pass_filter_0, '0', digital_costas_loop_cc_0, '0']
- [low_pass_filter_0, '0', qtgui_time_sink_x_0, '0']
- [low_pass_filter_0, '0', qtgui_waterfall_sink_x_0_0, '0']
- [osmosdr_source_0, '0', analog_agc_xx_0, '0']
- [osmosdr_source_0, '0', analog_quadrature_demod_cf_0, '0']
- [osmosdr_source_0, '0', blocks_probe_rate_0, '0']
- [osmosdr_source_0, '0', digital_costas_loop_cc_0, '0']
- [osmosdr_source_0, '0', qtgui_time_sink_x_0, '0']
- [osmosdr_source_0, '0', qtgui_waterfall_sink_x_0_0, '0']
metadata:
file_format: 1

View file

@ -251,11 +251,12 @@ static void lo_generate(uint32_t *buf, double freq, uint32_t phase)
{
freq_step = STEP_BASE * freq;
unsigned down = 2 + __builtin_clz(freq_step);
unsigned down = 4 + __builtin_clz(freq_step);
for (size_t i = 0; i < LO_WORDS; i++) {
uint32_t bits = 0;
int shift = (rnd_next() >> down) - (rnd_next() >> down);
int shift = (rnd_next() >> down) - (rnd_next() >> down) + (rnd_next() >> down) -
(rnd_next() >> down);
for (int j = 0; j < 32; j++) {
bits |= (phase + shift) >> 31;
@ -271,12 +272,13 @@ static void lo_tweak(uint32_t *buf, uint32_t phase)
{
static size_t i = 0;
uint32_t bits = 0;
unsigned down = 2 + __builtin_clz(freq_step);
unsigned down = 4 + __builtin_clz(freq_step);
phase += freq_step * i * 32;
for (int j = 0; j < 32; j++) {
int shift = (rnd_next() >> down) - (rnd_next() >> down);
int shift = (rnd_next() >> down) - (rnd_next() >> down) + (rnd_next() >> down) -
(rnd_next() >> down);
bits |= (phase + shift) >> 31;
bits <<= 1;
phase += freq_step;
@ -600,12 +602,10 @@ static void rf_rx(void)
iq_queue_pos = (iq_queue_pos + 1) & (IQ_QUEUE_LEN - 1);
}
for (int i = 0; i < 8; i++) {
lo_tweak(lo_cos, COS_PHASE);
lo_tweak(lo_sin, SIN_PHASE);
}
}
}
static void run_command(uint8_t cmd, uint32_t arg)
{