Merge remote-tracking branch 'origin/develop-simL1-fixes' into develop_integration_2018_w15

This commit is contained in:
Cedric Roux
2018-04-11 15:15:54 +02:00
13 changed files with 55 additions and 57 deletions
+4 -6
View File
@@ -91,10 +91,8 @@ double dac_fixed_gain(double *s_re[2],
int i;
int aa;
double amp,amp1_local,*amp1p;
amp = //sqrt(NB_RE)*pow(10.0,.05*txpwr_dBm)/sqrt(nb_tx_antennas); //this is amp per tx antenna
pow(10.0,.05*txpwr_dBm)/sqrt(nb_tx_antennas); //this is amp per tx antenna
double amp1_local,*amp1p;
double amp = pow(10.0,.05*txpwr_dBm)/sqrt(nb_tx_antennas); //this is amp per tx antenna
if (amp1==NULL) amp1p = &amp1_local;
else amp1p = amp1;
@@ -123,7 +121,7 @@ double dac_fixed_gain(double *s_re[2],
//printf("DL: amp1 %f dB (%d,%d), tx_power %f\n",20*log10(amp1),input_offset,input_offset_meas,txpwr_dBm);
*/
// printf("DAC: amp/amp1p %f amp1 %f dB (%d,%d), tx_power %f\n",amp/(*amp1p),20*log10(*amp1p),input_offset,input_offset_meas,txpwr_dBm);
for (i=0; i<length; i++) {
for (aa=0; aa<nb_tx_antennas; aa++) {
s_re[aa][i] = amp*((double)(((short *)input[aa]))[((i+input_offset)<<1)])/(*amp1p);
@@ -131,7 +129,7 @@ double dac_fixed_gain(double *s_re[2],
}
}
// printf("ener %e\n",signal_energy_fp(s_re,s_im,nb_tx_antennas,length,0));
// printf("ener %e\n",signal_energy_fp(s_re,s_im,nb_tx_antennas,length<length_meas?length:length_meas,0));
return(signal_energy_fp(s_re,s_im,nb_tx_antennas,length<length_meas?length:length_meas,0)/NB_RE);
}