pub struct DownsampleCfg {
pub input_rate: u32,
pub fft1_size: usize,
pub fft2_size: usize,
pub tone_spacing_hz: f32,
pub leading_pad_tones: f32,
pub trailing_pad_tones: f32,
pub ntones: u32,
pub edge_taper_bins: usize,
}Expand description
Runtime parameters shared by downsample, downsample_cached, and
build_fft_cache. Callers typically keep one instance per protocol.
Fields§
§input_rate: u32Input sample rate in Hz (12 000 for the WSJT pipeline).
fft1_size: usizeZero-padded forward-FFT length.
fft2_size: usizeInverse-FFT length = output sample count per call.
tone_spacing_hz: f32Tone spacing of the modulation in Hz (passed as the bandwidth unit so the extracted band scales with the protocol).
leading_pad_tones: f32Bins of headroom below f0 in tone-spacing units (FT8 uses 1.5).
trailing_pad_tones: f32Bins of headroom above f0 + (ntones-1)·tone_spacing in tone-spacing
units (FT8 uses 1.5 past tone 7 → 8.5 total).
ntones: u32Number of data tones; used together with trailing_pad_tones to
determine the upper edge of the extracted band.
edge_taper_bins: usizeLength of the raised-cosine taper applied to each edge (typically 101).
Trait Implementations§
Source§impl Clone for DownsampleCfg
impl Clone for DownsampleCfg
Source§fn clone(&self) -> DownsampleCfg
fn clone(&self) -> DownsampleCfg
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DownsampleCfg
impl Debug for DownsampleCfg
impl Copy for DownsampleCfg
Auto Trait Implementations§
impl Freeze for DownsampleCfg
impl RefUnwindSafe for DownsampleCfg
impl Send for DownsampleCfg
impl Sync for DownsampleCfg
impl Unpin for DownsampleCfg
impl UnsafeUnpin for DownsampleCfg
impl UnwindSafe for DownsampleCfg
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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