Skip to main content

DecodeQuality

Struct DecodeQuality 

Source
pub struct DecodeQuality {
Show 14 fields pub mode: u8, pub rs_errors_corrected: u32, pub rs_error_capacity: u32, pub integrity_percent: u8, pub repetition_factor: u8, pub parity_len: u16, pub geometry_corrected: bool, pub template_peaks_detected: u8, pub estimated_rotation_deg: f32, pub estimated_scale: f32, pub dft_ring_used: bool, pub dft_ring_capacity: u16, pub fortress_used: bool, pub signal_strength: f64,
}
Expand description

Quality information from a successful decode.

Fields§

§mode: u8

Mode that was used: frame::MODE_GHOST or frame::MODE_ARMOR.

§rs_errors_corrected: u32

Number of RS symbol errors corrected (0 for Ghost).

§rs_error_capacity: u32

Maximum correctable RS errors across all blocks (0 for Ghost).

§integrity_percent: u8

Integrity percentage: 100 = pristine, 0 = barely recovered.

§repetition_factor: u8

Repetition factor used during decode (1 = Phase 1 / no repetition).

§parity_len: u16

RS parity symbols used per block.

§geometry_corrected: bool

True if geometric recovery (Phase 3) was used to decode.

§template_peaks_detected: u8

Number of template peaks detected (out of 32).

§estimated_rotation_deg: f32

Estimated rotation angle in degrees (0 if no geometry correction).

§estimated_scale: f32

Estimated scale factor (1.0 if no geometry correction).

§dft_ring_used: bool

True if DFT ring was used (message may be truncated).

§dft_ring_capacity: u16

DFT ring capacity in bytes (0 if not applicable).

§fortress_used: bool

True if Fortress sub-mode (BA-QIM) was used for encoding.

§signal_strength: f64

Signal strength from LLR analysis (0.0 = no signal, higher = stronger). Used to compute meaningful integrity when RS errors are 0.

Implementations§

Source§

impl DecodeQuality

Source

pub fn ghost() -> Self

Create quality info for a Ghost decode (binary: always 100% if successful).

Source

pub fn from_rs_stats_with_signal( stats: &RsDecodeStats, repetition_factor: u8, parity_len: u16, signal_strength: f64, reference_llr: f64, ) -> Self

Create quality info from Armor RS decode stats with LLR signal quality.

Combines LLR-based signal strength (70% weight) with RS error margin (30% weight) to produce a meaningful integrity percentage even when RS errors are 0 (because repetition coding absorbed all damage).

  • signal_strength: average |LLR| per copy per bit from extraction.
  • reference_llr: expected |LLR| for a pristine embedding (delta/2 for STDM, step/2 for QIM).

Trait Implementations§

Source§

impl Clone for DecodeQuality

Source§

fn clone(&self) -> DecodeQuality

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DecodeQuality

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V