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§
Sourceconst BITS_PER_SYMBOL: u32
const BITS_PER_SYMBOL: u32
Information bits carried per modulated symbol (= log2(NTONES)).
Sourceconst TONE_SPACING_HZ: f32
const TONE_SPACING_HZ: f32
Spacing between adjacent tones, in Hz.
Sourceconst GRAY_MAP: &'static [u8]
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.
Sourceconst GFSK_HMOD: f32
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).
Sourceconst NFFT_PER_SYMBOL_FACTOR: u32
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.
Sourceconst NSTEP_PER_SYMBOL: u32
const NSTEP_PER_SYMBOL: u32
Coarse-sync time-step = NSPS / NSTEP_PER_SYMBOL.
FT8 = 4 (quarter-symbol resolution), FT4 = 1 (symbol-granular).
Provided Associated Constants§
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.