freq_est: make ramp-up delta phase check more strict
This should help with occasional jumps in the estimated carrier frequency on receivers running frequency tracking.
This commit is contained in:
parent
eb802629a1
commit
706a1eb437
|
@ -143,7 +143,7 @@ float freq_est_in_rampup(const float complex *recv, size_t n, float *final_phase
|
||||||
|
|
||||||
// rotate every second symbol by 180°. As a plausibility check that we are
|
// rotate every second symbol by 180°. As a plausibility check that we are
|
||||||
// in fact inside the ramp-up, we verify that there is no phase rotation by
|
// in fact inside the ramp-up, we verify that there is no phase rotation by
|
||||||
// more than 90° between the symbols.
|
// more than 60° between the symbols.
|
||||||
for(size_t i = 0; i < n; i++) {
|
for(size_t i = 0; i < n; i++) {
|
||||||
if((i % 2) == 0) {
|
if((i % 2) == 0) {
|
||||||
rotated[i] = recv[i];
|
rotated[i] = recv[i];
|
||||||
|
@ -154,7 +154,7 @@ float freq_est_in_rampup(const float complex *recv, size_t n, float *final_phase
|
||||||
float phase = cargf(rotated[i]);
|
float phase = cargf(rotated[i]);
|
||||||
if(i > 0) {
|
if(i > 0) {
|
||||||
float phase_delta = phase - prev_phase;
|
float phase_delta = phase - prev_phase;
|
||||||
if(fabsf(phase_delta) > 3.14159f/2.0f) {
|
if(fabsf(phase_delta) > 3.14159f/3.0f) {
|
||||||
// abort because we either have the wrong signal or too much noise.
|
// abort because we either have the wrong signal or too much noise.
|
||||||
if(final_phase) {
|
if(final_phase) {
|
||||||
*final_phase = 0.0f;
|
*final_phase = 0.0f;
|
||||||
|
|
Loading…
Reference in a new issue