Skip to main content

ModulationParams

Trait ModulationParams 

Source
pub trait ModulationParams:
    Copy
    + Default
    + 'static {
    const NTONES: u32;
    const BITS_PER_SYMBOL: u32;
    const NSPS: u32;
    const SYMBOL_DT: f32;
    const TONE_SPACING_HZ: f32;
    const GRAY_MAP: &'static [u8];
    const GFSK_BT: f32;
    const GFSK_HMOD: f32;
    const NFFT_PER_SYMBOL_FACTOR: u32;
    const NSTEP_PER_SYMBOL: u32;
    const NDOWN: u32;
    const LLR_SCALE: f32 = 2.83;
}
Expand description

Baseband modulation parameters (tones, symbol rate, Gray mapping, Gaussian shaping and the tunable DSP ratios the pipeline reads per protocol).

All constants are evaluated at compile time; the trait carries no data so implementors are typically zero-sized types.

Required Associated Constants§

Source

const NTONES: u32

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

Source

const BITS_PER_SYMBOL: u32

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

Source

const NSPS: u32

Samples per symbol at the 12 kHz pipeline sample rate.

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 GRAY_MAP: &'static [u8]

Gray-code map: GRAY_MAP[tone_index] returns the NATURAL-bit pattern for that tone. The map covers at least the data alphabet (2^BITS_PER_SYMBOL entries) and at most the full tone set (NTONES entries). Protocols whose sync tones are part of the data alphabet (FT8 / FT4 / FST4 / WSPR) have len() == NTONES == 2^BITS_PER_SYMBOL; protocols that reserve additional sync-only tones (JT9, JT65, Q65) either trim the map to the data alphabet (JT9: 8 entries for 9 tones) or extend it with identity over the sync slots (JT65 / Q65). Pinned by tests/protocol_invariants.rs.

Source

const GFSK_BT: f32

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

Source

const GFSK_HMOD: f32

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

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

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

Source

const NDOWN: u32

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

Provided Associated Constants§

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ModulationParams for Fst4s60

Source§

impl ModulationParams for Ft4

Source§

impl ModulationParams for Ft8

Source§

impl ModulationParams for Jt9

Source§

impl ModulationParams for Jt65

Source§

impl ModulationParams for Q65a30

Source§

impl ModulationParams for Q65a60

Source§

impl ModulationParams for Q65b60

Source§

impl ModulationParams for Q65c60

Source§

impl ModulationParams for Q65d60

Source§

impl ModulationParams for Q65e60

Source§

impl ModulationParams for Wspr