pub struct ApHint {
pub call1: Option<String>,
pub call2: Option<String>,
pub grid: Option<String>,
pub report: Option<String>,
}Expand description
A Priori information for assisted decoding.
Known callsigns are converted to 28-bit packed tokens and injected as high-confidence LLR values into the BP decoder, effectively reducing the number of unknown bits. This lowers the decode threshold by several dB.
§Example
use mfsk_core::ft8::decode::ApHint;
// "I'm calling 3Y0Z, expecting a reply to my CQ"
let ap = ApHint::new().with_call1("CQ").with_call2("3Y0Z");Fields§
§call1: Option<String>Known first callsign (e.g. “CQ”, “JA1ABC”). Locks message bits 0–28 (28-bit call + 1-bit flag).
call2: Option<String>Known second callsign (e.g. “3Y0Z”). Locks message bits 29–57 (28-bit call + 1-bit flag).
grid: Option<String>Known grid locator (e.g. “JD34”). Locks message bits 58 (ir=0) + 59–73 (15-bit grid).
report: Option<String>Known report/response token (e.g. “RRR”, “RR73”, “73”). Locks bits 58–73 (ir flag + 15-bit report field) for full 77-bit lock.
Implementations§
Source§impl ApHint
impl ApHint
Sourcepub fn with_call1(self, call: &str) -> Self
pub fn with_call1(self, call: &str) -> Self
Pre-fill the first callsign (CALL1 in a standard FT8 message).
Sourcepub fn with_call2(self, call: &str) -> Self
pub fn with_call2(self, call: &str) -> Self
Pre-fill the second callsign (CALL2).
Sourcepub fn with_report(self, rpt: &str) -> Self
pub fn with_report(self, rpt: &str) -> Self
Pre-fill the signal report (e.g. "-12", "R+05", "73").
Sourcepub fn build_ap(&self, apmag: f32) -> ([bool; 174], [f32; 174])
pub fn build_ap(&self, apmag: f32) -> ([bool; 174], [f32; 174])
Build AP mask and LLR overrides for the 174-bit LDPC codeword.
apmag — magnitude to assign to known bits (typically max(|llr|) * 1.01).
Returns (ap_mask, ap_llr) where:
ap_mask[i] = truemeans bitiis a-priori known (frozen in BP)ap_llr[i]is the LLR override for known bits (±apmag)
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
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>
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>
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