pub struct Wspr;Expand description
WSPR-2 (the standard 2-minute slot variant). WSPR-15 differs in slot length and NSPS; a separate ZST can be added later sharing everything except the few timing constants.
Trait Implementations§
Source§impl FrameLayout for Wspr
impl FrameLayout for Wspr
Source§const T_SLOT_S: f32 = 120.0
const T_SLOT_S: f32 = 120.0
Nominal slot length — the “2” in “WSPR-2”. Matches WSJT-X’s 120-s schedule. The actual frame transmission is ≈ 110.6 s inside this slot.
Source§const TX_START_OFFSET_S: f32 = 1.0
const TX_START_OFFSET_S: f32 = 1.0
Frame begins ~1 s after the slot boundary (WSJT-X convention).
Source§const N_SYMBOLS: u32 = 162
const N_SYMBOLS: u32 = 162
Total channel symbols per frame (= N_DATA + N_SYNC). Excludes any
GFSK ramp-up / ramp-down symbols that are a shaping artifact.
Source§const N_RAMP: u32 = 0
const N_RAMP: u32 = 0
Extra symbol slots on each side of the frame reserved for amplitude
ramp (FT4 has 1 each side = 2; FT8 has 0 — ramp absorbed into the
first/last data symbol envelope). Applied at the transmitter.
Source§const SYNC_MODE: SyncMode
const SYNC_MODE: SyncMode
Sync-symbol layout. Most WSJT protocols use
SyncMode::Block with
dedicated Costas blocks (FT8/FT4/FST4); WSPR uses SyncMode::Interleaved
with a per-symbol sync bit. Callers that only support block sync should
read SYNC_MODE.blocks() and treat an empty slice as “unsupported”.Source§impl ModulationParams for Wspr
impl ModulationParams for Wspr
Source§const NSPS: u32 = 8192
const NSPS: u32 = 8192
8192 samples at 12 kHz = 0.6827 s per symbol. WSJT-X demodulates at 375 Hz after a 32× decimation (12000/32 = 375), where one symbol is 256 samples; we keep the pipeline-standard 12 kHz convention here.
Source§const GRAY_MAP: &'static [u8]
const GRAY_MAP: &'static [u8]
Gray map for 4-FSK. WSPR tones map naturally (no Gray conversion in the WSJT-X reference), so this is the identity — the data bit just picks the top bit of the tone index.
Source§const BITS_PER_SYMBOL: u32 = 2
const BITS_PER_SYMBOL: u32 = 2
Information bits carried per modulated symbol (= log2(NTONES)).
Source§const TONE_SPACING_HZ: f32
const TONE_SPACING_HZ: f32
Spacing between adjacent tones, in Hz.
Source§const GFSK_HMOD: f32 = 1.0
const GFSK_HMOD: f32 = 1.0
Modulation index h — the phase increment per symbol is
2π · h.
FT8 and FT4 both use 1.0 (orthogonal tones at 1/T spacing).Source§const NFFT_PER_SYMBOL_FACTOR: u32 = 1
const NFFT_PER_SYMBOL_FACTOR: u32 = 1
Per-symbol FFT size =
NSPS * NFFT_PER_SYMBOL_FACTOR.
FT8 = 2 (window is 2·NSPS), FT4 = 4 (window is 4·NSPS) — trade-off
between frequency resolution and time localisation.Source§const NSTEP_PER_SYMBOL: u32 = 16
const NSTEP_PER_SYMBOL: u32 = 16
Coarse-sync time-step =
NSPS / NSTEP_PER_SYMBOL.
FT8 = 4 (quarter-symbol resolution), FT4 = 1 (symbol-granular).impl Copy for Wspr
Auto Trait Implementations§
impl Freeze for Wspr
impl RefUnwindSafe for Wspr
impl Send for Wspr
impl Sync for Wspr
impl Unpin for Wspr
impl UnsafeUnpin for Wspr
impl UnwindSafe for Wspr
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