From 9f4a849115c6fa90f96ef4243b8a7deeff843520 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Thu, 18 Aug 2016 12:46:02 +0200 Subject: [PATCH] added prototypes to compute beamforming weights --- cmake_targets/CMakeLists.txt | 1 + openair1/PHY/MODULATION/beamforming.c | 1 - openair1/PHY/MODULATION/compute_bf_weights.c | 54 ++++++++++++++++++++ openair1/PHY/MODULATION/defs.h | 7 +++ openair1/PHY/impl_defs_lte.h | 9 ++++ 5 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 openair1/PHY/MODULATION/compute_bf_weights.c diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 02a6ac5151..1027718d48 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -976,6 +976,7 @@ set(PHY_SRC ${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c ${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c ${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c + ${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.c diff --git a/openair1/PHY/MODULATION/beamforming.c b/openair1/PHY/MODULATION/beamforming.c index 2e38b7cb93..00bb9e5dca 100644 --- a/openair1/PHY/MODULATION/beamforming.c +++ b/openair1/PHY/MODULATION/beamforming.c @@ -120,4 +120,3 @@ int beam_precoding(int32_t **txdataF, } } } - diff --git a/openair1/PHY/MODULATION/compute_bf_weights.c b/openair1/PHY/MODULATION/compute_bf_weights.c new file mode 100644 index 0000000000..620380737c --- /dev/null +++ b/openair1/PHY/MODULATION/compute_bf_weights.c @@ -0,0 +1,54 @@ +#include +#include +#include "PHY/impl_defs_lte.h" + +int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs){ + + FILE *calibF_fd; + int i,j,l,calibF_e; + + calibF_fd = fopen(calibF_fname,"r"); + + if (calibF_fd) { + printf("Loading Calibration matrix from %s\n", calibF_fname); + + for(i=0;irx_vars[a].RX_DMA_BUFFER.