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<Complex<f64>>],
g: usize,
) -> Result<Vec<Vec<Complex<f64>>>, Error>
pub fn received_grid( &self, streams: &[Vec<Complex<f64>>], g: usize, ) -> Result<Vec<Vec<Complex<f64>>>, Error>
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<Complex<f64>>],
noise_var: f64,
method: &FrequencyInterpolation,
) -> Result<Vec<Complex<f64>>, Error>
pub fn estimate( &self, rx: &[Vec<Complex<f64>>], noise_var: f64, method: &FrequencyInterpolation, ) -> Result<Vec<Complex<f64>>, Error>
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<Complex<f64>>],
channel: F,
receiver: &Receiver,
settings: &FrameDetection,
) -> Result<SoftOutput, Error>
pub fn detect<F>( &self, streams: &[Vec<Complex<f64>>], channel: F, receiver: &Receiver, settings: &FrameDetection, ) -> Result<SoftOutput, Error>
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).
Trait Implementations§
impl StructuralPartialEq for OfdmFrame
Auto Trait Implementations§
impl Forget for OfdmFrame
impl Freeze for OfdmFrame
impl RefUnwindSafe for OfdmFrame
impl Send for OfdmFrame
impl Sync for OfdmFrame
impl Unpin for OfdmFrame
impl UnsafeUnpin for OfdmFrame
impl UnwindSafe for OfdmFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more