mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-07 18:04:13 +00:00
compilation warning cleaned
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@152 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
c186828669
commit
a8f6695f58
@ -18,7 +18,7 @@
|
|||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2011 (see AUTHORS file for a list of contributors)
|
* Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors)
|
||||||
*
|
*
|
||||||
* GNSS-SDR is a software defined Global Navigation
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
* Satellite Systems receiver
|
* Satellite Systems receiver
|
||||||
@ -70,16 +70,14 @@ float gps_l1_ca_CN0_SNV(gr_complex* Prompt_buffer, int length, long fs_in)
|
|||||||
// SNR_SNV(count)=Psig/(Ptot-Psig);
|
// SNR_SNV(count)=Psig/(Ptot-Psig);
|
||||||
// CN0_SNV_dB=10*log10(SNR_SNV)+10*log10(BW)-10*log10(PRN_length);
|
// CN0_SNV_dB=10*log10(SNR_SNV)+10*log10(BW)-10*log10(PRN_length);
|
||||||
float SNR, SNR_dB_Hz;
|
float SNR, SNR_dB_Hz;
|
||||||
float tmp_abs_I, tmp_abs_Q;
|
float tmp_abs_imag;
|
||||||
float Psig, Ptot;
|
float Psig, Ptot;
|
||||||
//float M2,M4;
|
|
||||||
Psig = 0;
|
Psig = 0;
|
||||||
Ptot = 0;
|
Ptot = 0;
|
||||||
for (int i=0; i<length; i++)
|
for (int i=0; i<length; i++)
|
||||||
{
|
{
|
||||||
tmp_abs_I = std::abs(Prompt_buffer[i].imag());
|
tmp_abs_imag = std::abs(Prompt_buffer[i].imag());
|
||||||
tmp_abs_Q = std::abs(Prompt_buffer[i].real());
|
Psig += tmp_abs_imag;
|
||||||
Psig += tmp_abs_I;
|
|
||||||
Ptot += Prompt_buffer[i].imag() * Prompt_buffer[i].imag() + Prompt_buffer[i].real() * Prompt_buffer[i].real();
|
Ptot += Prompt_buffer[i].imag() * Prompt_buffer[i].imag() + Prompt_buffer[i].real() * Prompt_buffer[i].real();
|
||||||
}
|
}
|
||||||
Psig = Psig / (float)length;
|
Psig = Psig / (float)length;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user