From fd17ef3c1ed56ab3c28dfa81b0102c1eddc47e04 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sat, 8 Jun 2024 01:57:43 +0200 Subject: [PATCH] Use full preamble for frequency estimation --- impl/src/layer1/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl/src/layer1/rx.c b/impl/src/layer1/rx.c index 8c9e81a..0944088 100644 --- a/impl/src/layer1/rx.c +++ b/impl/src/layer1/rx.c @@ -88,7 +88,7 @@ static bool acquire_preamble(layer1_rx_t *rx, const float complex sample, bool d rx->packet_debug_info.preamble_correlation_peak = abs_corr_out; float phase_offset; - float mean_frequency_error = correlator_get_mean_frequency_deviation(&rx->preamble_correlator, FREQ_EST_L, &phase_offset); + float mean_frequency_error = correlator_get_mean_frequency_deviation(&rx->preamble_correlator, preamble_get_symbol_count(), &phase_offset); LOG(LVL_DEBUG, "@%zu: Phase offset: %.6f rad", rx->sample_index, phase_offset); LOG(LVL_DEBUG, "@%zu: Preamble frequency deviation: %.6f rad/symbol", rx->sample_index, mean_frequency_error);