mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-22 18:14:53 +00:00
Merge branch 'contrib' of https://github.com/odrisci/gnss-sdr into
odrisci-contrib # Conflicts: # src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc # src/algorithms/tracking/libs/tracking_discriminators.cc
This commit is contained in:
@@ -91,7 +91,7 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1)
|
||||
/*
|
||||
* DLL Noncoherent Early minus Late envelope normalized discriminator:
|
||||
* \f{equation}
|
||||
* error=\frac{E-L}{E+L},
|
||||
* error=\frac{1}{2}\frac{E-L}{E+L},
|
||||
* \f}
|
||||
* where \f$E=\sqrt{I_{ES}^2+Q_{ES}^2}\f$ is the Early correlator output absolute value and
|
||||
* \f$L=\sqrt{I_{LS}^2+Q_{LS}^2}\f$ is the Late correlator output absolute value. The output is in [chips].
|
||||
@@ -101,7 +101,14 @@ double dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1)
|
||||
double P_early, P_late;
|
||||
P_early = std::abs(early_s1);
|
||||
P_late = std::abs(late_s1);
|
||||
return 0.5*(P_early - P_late) / ((P_early + P_late));
|
||||
if( P_early + P_late == 0.0 )
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0.5 * (P_early - P_late) / ((P_early + P_late));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -118,5 +125,12 @@ double dll_nc_vemlp_normalized(gr_complex very_early_s1, gr_complex early_s1, gr
|
||||
double P_early, P_late;
|
||||
P_early = std::sqrt(std::norm(very_early_s1) + std::norm(early_s1));
|
||||
P_late = std::sqrt(std::norm(very_late_s1) + std::norm(late_s1));
|
||||
return (P_early - P_late) / ((P_early + P_late));
|
||||
if( P_early + P_late == 0.0 )
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (P_early - P_late) / ((P_early + P_late));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user