Skip to main content

Ft8Codec

Struct Ft8Codec 

Source
pub struct Ft8Codec;
Expand description

FT8 channel encoder/decoder.

Implementations§

Source§

impl Ft8Codec

Source

pub fn encode(payload: &Ft8Bits) -> Ft8Frame

Encode a 77-bit payload into an Ft8Frame of 58 Gray-coded tone indices.

Steps: payload → CRC-14 appended → LDPC(174,91) → Gray code → 58 tones.

Source

pub fn decode_hard(frame: &Ft8Frame) -> Option<Ft8Bits>

Decode an Ft8Frame using hard decisions.

Applies inverse Gray code, treats each bit as a ±10 LLR, runs LDPC, then verifies the CRC. Returns the 77-bit payload on success.

Source

pub fn decode_soft(llr: &[f32; 174]) -> Option<Ft8Bits>

Decode using soft LLR values produced by a sync/correlator stage.

llrs — 174 floats, LLR = log(P(bit=0)/P(bit=1)), positive ⇒ likely 0.

Source

pub fn frame_to_llr_hard(frame: &Ft8Frame) -> [f32; 174]

Convert an Ft8Frame (hard tone decisions) into 174 LLRs (±10.0).

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.