1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Copyright (c) 2025-2026 G & R Associates LLC
// SPDX-License-Identifier: MIT OR Apache-2.0
// src/multicarrier/symbol_fft.rs
use FftBlock;
use crateBlock;
use Complex32 as C32;
/// RX front end for one OFDM symbol: select the `n_fft`-sample FFT window
/// within the `n_fft + cp_len` symbol, then [`FftBlock`] it — producing the
/// frequency-domain symbol (natural rustfft bin order).
///
/// This is the single shared window-select + FFT kernel every RX path runs
/// before it diverges (grid extraction, equalization, pilot installation, or
/// `|X|²` accumulation). Consolidating it here gives one place that owns the
/// `time`/`freq` scratch and — crucially — the one place the FFT-window
/// position is chosen, so the window **back-off** is set here rather than
/// replicated across every demodulator.
///
/// **Window position.** With back-off `b = 0` (the default) the window is the
/// last `n_fft` samples of the symbol, `input[cp_len .. cp_len + n_fft]` — the
/// standard CP-removal position, bit-identical to a plain
/// [`CyclicPrefixRemove`](super::CyclicPrefixRemove). A back-off `b > 0` slides
/// the window `b` samples *earlier*, into the guard interval:
/// `input[cp_len - b .. cp_len - b + n_fft]`. This is standard receiver
/// practice for multipath/pre-echo robustness (guard on both sides of the
/// useful part) and is the enabler for RX-transparent TX symbol windowing (a
/// TX taper confined to the outer guard then falls outside the window). The
/// back-off is bounded by `cp_len` and clamped to it on construction.
///
/// Input consumption is always `symbol_len() = n_fft + cp_len` regardless of
/// back-off — only the *window within* that span moves — so symbol boundaries
/// and the strided RX cursor are unaffected. A shorter input is a no-op
/// returning `None`.