Skip to main content

Wspr

Struct Wspr 

Source
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 Clone for Wspr

Source§

fn clone(&self) -> Wspr

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Wspr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Wspr

Source§

fn default() -> Wspr

Returns the “default value” for a type. Read more
Source§

impl FrameLayout for Wspr

Source§

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

Frame begins ~1 s after the slot boundary (WSJT-X convention).

Source§

const N_DATA: u32 = 162

Data symbols carrying FEC-coded payload.
Source§

const N_SYNC: u32 = 0

Sync symbols (sum of pattern.len() across SYNC_BLOCKS).
Source§

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

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

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§

const CODEWORD_INTERLEAVE: Option<&'static [u16]> = None

Optional bit interleaver: permutation table such that cw[CODEWORD_INTERLEAVE[j]] is the codeword bit transmitted at channel-bit position j. Length must equal <Self as Protocol>::Fec::N when Some. Read more
Source§

impl ModulationParams for Wspr

Source§

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]

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 NTONES: u32 = 4

Number of FSK tones (M in M-ary FSK).
Source§

const BITS_PER_SYMBOL: u32 = 2

Information bits carried per modulated symbol (= log2(NTONES)).
Source§

const SYMBOL_DT: f32

Symbol duration in seconds (= NSPS / 12000).
Source§

const TONE_SPACING_HZ: f32

Spacing between adjacent tones, in Hz.
Source§

const GFSK_BT: f32 = 1.0

Gaussian bandwidth-time product. FT8 = 2.0, FT4 = 1.0, FST4 ≈ 1.0.
Source§

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

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

Coarse-sync time-step = NSPS / NSTEP_PER_SYMBOL. FT8 = 4 (quarter-symbol resolution), FT4 = 1 (symbol-granular).
Source§

const NDOWN: u32 = 32

Downsample decimation factor: baseband rate = 12 000 / NDOWN Hz. FT8 = 60 (→200 Hz), FT4 = 18 (→667 Hz). Proportional to tone spacing.
Source§

const LLR_SCALE: f32 = 2.83

LLR scale factor applied after standard-deviation normalisation. FT8 uses 2.83 (empirical, from WSJT-X ft8b.f90). Different bits-per-symbol counts may shift the optimum — FT4’s 2-bit LLR dynamics are not identical to FT8’s 3-bit case.
Source§

impl Protocol for Wspr

Source§

const ID: ProtocolId = ProtocolId::Wspr

Runtime tag used at FFI / WASM boundaries.
Source§

type Fec = ConvFano

FEC codec carrying N_DATA * BITS_PER_SYMBOL coded bits.
Source§

type Msg = Wspr50Message

Message codec consuming the FEC-decoded information bits.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.