pub struct ApHint {
pub call1: Option<String>,
pub call2: Option<String>,
pub grid: Option<String>,
pub report: Option<String>,
}Expand description
A Priori information to bias decoding.
Fields§
§call1: Option<String>Known first callsign (e.g. “CQ”, “JA1ABC”). Locks message bits 0–28.
call2: Option<String>Known second callsign (e.g. “3Y0Z”). Locks message bits 29–57.
grid: Option<String>Known grid locator (e.g. “PM95”). Locks bits 58–73.
report: Option<String>Known response token: “RRR”, “RR73”, or “73”. Locks bits 58–73.
Implementations§
Source§impl ApHint
impl ApHint
pub fn new() -> Self
pub fn with_call1(self, call: &str) -> Self
pub fn with_call2(self, call: &str) -> Self
pub fn with_grid(self, grid: &str) -> Self
pub fn with_report(self, rpt: &str) -> Self
Sourcepub fn build_bits(&self, n_codeword: usize) -> (Vec<u8>, Vec<u8>)
pub fn build_bits(&self, n_codeword: usize) -> (Vec<u8>, Vec<u8>)
Build the (mask, bit_values) bit vectors of length n_codeword for
a downstream FEC codec. Bits 0–76 (the message payload) are populated
from the hint fields; bits 77..N are left unmasked.
mask[i] == 1 means bit i is AP-locked; values[i] is the target
bit value (0 or 1). The FEC codec clamps its LLR at these positions
to ±apmag accordingly.
Sourcepub fn locked_bits(&self, n_codeword: usize) -> usize
pub fn locked_bits(&self, n_codeword: usize) -> usize
Number of AP-locked message bits (informational; callers use it to scale per-pass confidence thresholds).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApHint
impl RefUnwindSafe for ApHint
impl Send for ApHint
impl Sync for ApHint
impl Unpin for ApHint
impl UnsafeUnpin for ApHint
impl UnwindSafe for ApHint
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