|
| Parameters to feed | python (pun very intended!) serial_ids |
| |
| | disp (hub_id) id_str |
| |
| obj | py_obj_array (ipy,:) |
| |
| end end end function | sdr_set_n_frame (obj, n_frame) obj.n_frame |
| |
| The trigger is set only on the fist node else obj py_obj_hub | set_trigger () |
| |
| | disp ('triggering FAROS hub...') end end function sdrsync(obj) if ~obj.use_hub obj.py_obj_array |
| |
| | sync_delays () |
| |
| end end function | sdr_setcorr (obj) for ipy |
| |
| | fprintf ('Beacon detected at UE %d ? %d \n', ipy, trig_found) |
| |
| end end function | sdr_unsetcorr (obj) for ipy |
| |
| end end function | sdr_settxgain (obj, tx_gain) for ipy |
| |
| end end function | sdr_configgainctrl (obj) for ipy |
| |
| end end function | sdr_setupbeacon (obj) % Assume Beacon only from the first Iris board in the BS array for ipy |
| |
| end end function | sdr_setupbeacon_single (obj) % Assume Beacon only from the first Iris board in the BS array obj.py_obj_array |
| |
| | burn_beacon () |
| |
| end function | set_tddconfig (obj, is_bs, tdd_sched) obj.is_bs |
| |
| end end function | set_tddconfig_single (obj, is_bs, tdd_sched, index) sched |
| |
| end function | sdrrxsetup (obj) for ipy |
| |
| end end function | sdr_activate_rx (obj) for ipy |
| |
| obj, data | ipy: (id py_obj_array) |
| |
| | burn_data (pyargs('data_r', real(data), 'data_i', imag(data))) |
| |
| end end function | sdrtx_single (obj, data, index) obj.py_obj_array |
| |
| | data_raw (ipy,(jf-1) *n_samp+1:jf *n_samp) |
| |
| end end if | ~exist ('choose_best_frame', 'var') data |
| |
| | data_raw (ipy, :) |
| |
| end function | sdr_close (obj) for ipy |
| |
| | delete (obj.py_obj_array{ipy}) |
| |
| | lts_corr_dr (:, nc) |
| |
| id | peaks: (lts_corr_sum< 0.2 lts_corr_sum) |
| |
| | elseif (obj.n_sdrs > 1) &&length(lts_corr_frm) > |
| |
| obj.n_samp, obj.n_sdrs, obj.n_frame | zeros () |
| |
| | data_split (:,:, nf) |
| |
| | fprintf ('Returning frame number %d with max mean correlation=%f \n', m_idx, max_corr) |
| |
|
| Author(s) pyhton object array This array decribes Iris board or a collection of Iris boards that belong to the same entity E | g |
| |
| Author(s) pyhton object array This array decribes Iris board or a collection of Iris boards that belong to the same entity E a BS | py_obj_array = {} |
| |
| | use_hub = 0 |
| |
| | py_obj_hub = py.hub_py.Hub_py( pyargs('serial_id',id_str)) |
| |
| | n_sdrs = 0 |
| |
| number of Iris boards in a chain | sample_rate = 0 |
| |
| | tx_freq = 0 |
| |
| | rx_freq = 0 |
| |
| | bw = 0 |
| |
| | tx_gain = 0 |
| |
| | rx_gain = 0 |
| |
| | n_samp = 0 |
| |
| | tdd_sched = "" |
| |
| | n_zpad_samp = 0 |
| |
| | is_bs = 1 |
| |
| end methods function | obj |
| |
| end obj | sdr_params = sdr_params |
| |
| obj | serial_ids = sdr_params.id |
| |
| obj | n_frame = sdr_params.n_frame |
| |
| for | ipy |
| |
| | py_obj |
| |
| end | NB |
| |
| | sched = convertStringsToChars(tdd_sched) |
| |
| end Read n_frame x n_samp data | function [data, len] |
| |
| end | data_raw = zeros(obj.n_sdrs, obj.n_frame * n_samp) |
| |
| Change this to max frame ! for | jf |
| |
| elseif | choose_best_frame |
| |
| end | len = length(data) |
| |
| end | data = data_raw.' |
| |
| TD LTS | lts_t = ifft(lts_f, 64) |
| |
| Add CP and a second TD LTS | lts_cp = lts_t(33:end) |
| |
| Correlation through filtering | lts_corr_dr = zeros(size(data_frame)) |
| |
| | unos = ones(size(lts_t)) |
| |
| | a = 1 |
| |
| for | nc |
| |
| | v1 = filter(unos,a,abs(data_frame(:,nc)).^2) |
| |
| normalized correlation end Sum accross antennas | lts_corr_sum = sum(lts_corr_dr,2) |
| |
| Assume peak in the first samples | lts_corr_frm = reshape(lts_corr_sum, [], obj.n_frame) |
| |
| end save my_data mat lts_corr_dr lts_corr_frm Avg corr value per frame | frm_avg_corr = sum(lts_corr_frm,1)./obj.n_sdrs |
| |
| Take index of maximum corr | value [max_corr, m_idx] = max(frm_avg_corr) |
| |
| for | nf |
| |
| | end_idx = nf*obj.n_samp |
| |
| end | data_frame = reshape(data_frame,n_samp, [], obj.n_frame ) |
| |