Files
openairinterface5g/openair1/PHY/TOOLS/read_F.c
T
Cedric Roux aea6b4b5a6 fix a lot of file mode
For whatever reason most of the files had their permission
changed from 644 to 755, which is not wanted.
2019-01-07 16:22:28 +01:00

25 lines
623 B
C

#include<stdio.h>
#include<stdint.h>
int f_read(char *calibF_fname, int nb_antM, int nb_freq, int16_t (*calibF_mtx)[nb_freq*2]){
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;i<nb_antM;i++){
for(j=0;j<nb_freq*2;j++){
fscanf(calibF_fd, "%d", &calibF_e);
calibF_mtx[i][j] = (int16_t)calibF_e;
}
}
printf("%d\n",(int)calibF_mtx[0][0]);
printf("%d\n",(int)calibF_mtx[1][599]);
} else
printf("%s not found, running with defaults\n",calibF_fname);
}