pub struct OfdmFrame {
pub ofdm: Ofdm,
pub grid: ResourceGrid,
pub n_grids: usize,
pub n_ports: usize,
pub n_data_symbols: usize,
pub scale: f64,
}Expand description
An OFDM frame: what the receiver needs to undo transmit.
Fields§
§ofdm: OfdmThe modulator.
grid: ResourceGridThe resource grid of every group of n_symbols OFDM symbols.
n_grids: usizeGrids in the frame.
n_ports: usizeTransmit antennas (ports).
n_data_symbols: usizeData symbols per antenna before the padding of the last grid.
scale: f64Amplitude of the time samples, $\sqrt{K/(L N)}$.
Implementations§
Source§impl OfdmFrame
impl OfdmFrame
Sourcepub fn data_res(&self) -> Vec<usize>
pub fn data_res(&self) -> Vec<usize>
The data resource elements of a grid, symbol after symbol (indices l K + k,
ResourceGrid::data_indices).
Sourcepub fn symbol_middles(&self, g: usize) -> Vec<usize>
pub fn symbol_middles(&self, g: usize) -> Vec<usize>
The sample at the middle of every OFDM symbol of grid g (after the prefix): the
instant at which a genie-aided receiver takes the channel.
Sourcepub fn active_bins(&self) -> Vec<usize>
pub fn active_bins(&self) -> Vec<usize>
The FFT bins of the active subcarriers.
Sourcepub fn received_grid(
&self,
streams: &[Vec<C64>],
g: usize,
) -> Result<Vec<Vec<C64>>>
pub fn received_grid( &self, streams: &[Vec<C64>], g: usize, ) -> Result<Vec<Vec<C64>>>
The demodulated grid g of every receive antenna, [rx][l K + k].
§Errors
comnum_core::Error::Shape if a stream is shorter than the frame.
Sourcepub fn estimate(
&self,
rx: &[Vec<C64>],
noise_var: f64,
method: &FrequencyInterpolation,
) -> Result<Vec<C64>>
pub fn estimate( &self, rx: &[Vec<C64>], noise_var: f64, method: &FrequencyInterpolation, ) -> Result<Vec<C64>>
The channel of every resource element estimated from the pilots of every port,
[re][rx][tx] flattened, from the received grids rx (OfdmFrame::received_grid).
§Errors
The errors of estimate_port.
Sourcepub fn detect<F>(
&self,
streams: &[Vec<C64>],
channel: F,
receiver: &Receiver,
settings: &FrameDetection,
) -> Result<SoftOutput>
pub fn detect<F>( &self, streams: &[Vec<C64>], channel: F, receiver: &Receiver, settings: &FrameDetection, ) -> Result<SoftOutput>
Detect every data resource element of the frame received on streams: the
channel of grid g is channel(g, rx) ([re][rx][tx] flattened, from the
received grids rx), multiplied by the gain of settings. The padding of the
last grid is left out.
§Errors
The errors of FrameDetection::check, of channel and of
Receiver::detect_uses (an odd number of data resource elements with Alamouti’s
code).