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: u8Mode that was used: frame::MODE_GHOST or frame::MODE_ARMOR.
rs_errors_corrected: u32Number of RS symbol errors corrected (0 for Ghost).
rs_error_capacity: u32Maximum correctable RS errors across all blocks (0 for Ghost).
integrity_percent: u8Integrity percentage: 100 = pristine, 0 = barely recovered.
repetition_factor: u8Repetition factor used during decode (1 = Phase 1 / no repetition).
parity_len: u16RS parity symbols used per block.
geometry_corrected: boolTrue if geometric recovery (Phase 3) was used to decode.
template_peaks_detected: u8Number of template peaks detected (out of 32).
estimated_rotation_deg: f32Estimated rotation angle in degrees (0 if no geometry correction).
estimated_scale: f32Estimated scale factor (1.0 if no geometry correction).
dft_ring_used: boolTrue if DFT ring was used (message may be truncated).
dft_ring_capacity: u16DFT ring capacity in bytes (0 if not applicable).
fortress_used: boolTrue if Fortress sub-mode (BA-QIM) was used for encoding.
signal_strength: f64Signal strength from LLR analysis (0.0 = no signal, higher = stronger). Used to compute meaningful integrity when RS errors are 0.
Implementations§
Source§impl DecodeQuality
impl DecodeQuality
Sourcepub fn ghost() -> Self
pub fn ghost() -> Self
Create quality info for a Ghost decode (binary: always 100% if successful).
Sourcepub fn from_rs_stats_with_signal(
stats: &RsDecodeStats,
repetition_factor: u8,
parity_len: u16,
signal_strength: f64,
reference_llr: f64,
) -> Self
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
impl Clone for DecodeQuality
Source§fn clone(&self) -> DecodeQuality
fn clone(&self) -> DecodeQuality
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more