mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-25 06:32:51 +00:00
Added check for zero denominator in dll discrim.
This commit is contained in:
parent
086118c4aa
commit
e6d5fe35ea
@ -101,7 +101,14 @@ float dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1)
|
|||||||
float P_early, P_late;
|
float P_early, P_late;
|
||||||
P_early = std::abs(early_s1);
|
P_early = std::abs(early_s1);
|
||||||
P_late = std::abs(late_s1);
|
P_late = std::abs(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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user