Merge pull request #3 from softwareradiosystems/next_new_feature

Next new feature
master
Ismael Gomez 8 years ago committed by GitHub
commit e71f761442

@ -7,7 +7,7 @@ if(NOT SOAPYSDR_FOUND)
NAMES Device.h
PATHS ${SOAPYSDR_PKG_INCLUDE_DIRS}
/usr/include/SoapySDR
/usr/include/local/SoapySDR
/usr/local/include/SoapySDR
)
find_library(SOAPYSDR_LIBRARIES
@ -15,9 +15,10 @@ if(NOT SOAPYSDR_FOUND)
PATHS ${LIMESDR_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
/usr/lib/arm-linux-gnueabihf
)
if(SOAPYSDR_INCLUDE_DIRS AND SOAPYSDR_LIBRARIES)
set(SOAPYSDR_FOUND TRUE CACHE INTERNAL "libSOAPYSDR found")
message(STATUS "Found libSOAPYSDR: ${SOAPYSDR_INCLUDE_DIRS}, ${SOAPYSDR_LIBRARIES}")

@ -348,7 +348,7 @@ int main(int argc, char **argv) {
if ((nframes%100) == 0 || rx_gain_offset == 0) {
if (srslte_rf_has_rssi(&rf)) {
rx_gain_offset = 10*log10(rssi)-srslte_rf_get_rssi(&rf);
rx_gain_offset = 10*log10(rssi*1000)-srslte_rf_get_rssi(&rf);
} else {
rx_gain_offset = srslte_rf_get_rx_gain(&rf);
}
@ -357,10 +357,10 @@ int main(int argc, char **argv) {
// Plot and Printf
if ((nframes%10) == 0) {
printf("CFO: %+8.4f kHz, SFO: %+8.4f kHz, RSSI: %5.1f dBm, RSSI/ref-symbol: %+5.1f dBm, "
printf("CFO: %+8.4f kHz, SFO: %+8.4f Hz, RSSI: %5.1f dBm, RSSI/ref-symbol: %+5.1f dBm, "
"RSRP: %+5.1f dBm, RSRQ: %5.1f dB, SNR: %5.1f dB\r",
srslte_ue_sync_get_cfo(&ue_sync)/1000, srslte_ue_sync_get_sfo(&ue_sync),
10*log10(rssi*1000) - rx_gain_offset,
10*log10(rssi*1000) - rx_gain_offset,
10*log10(rssi_utra*1000)- rx_gain_offset,
10*log10(rsrp*1000) - rx_gain_offset,
10*log10(rsrq), 10*log10(snr));

@ -418,10 +418,10 @@ float srslte_chest_dl_get_rsrq(srslte_chest_dl_t *q) {
}
float srslte_chest_dl_get_rsrp(srslte_chest_dl_t *q) {
// return sum of power received from all tx ports
// Note: use only port 0 but average across antennas
float n = 0;
for (int i=0;i<q->last_nof_antennas;i++) {
n += srslte_vec_acc_ff(q->rsrp[i], q->cell.nof_ports);
n += q->rsrp[i][0];
}
return n/q->last_nof_antennas;
}

Loading…
Cancel
Save