pub struct PiCalibration {
pub scale: f32,
pub phase_offset: f32,
pub norm_factor: f32,
pub lane: PrecisionLane,
pub anti_resonance: f32,
}Expand description
π-derived calibration constants for a precision lane
Fields§
§scale: f32Base scale factor (π / 2^bits)
phase_offset: f32Phase offset for angular encoding
norm_factor: f32Normalization factor
lane: PrecisionLanePrecision lane
anti_resonance: f32Anti-resonance offset (prevents bucket collapse)
Implementations§
Source§impl PiCalibration
impl PiCalibration
Sourcepub fn for_lane(lane: PrecisionLane) -> Self
pub fn for_lane(lane: PrecisionLane) -> Self
Create calibration constants for a precision lane
Sourcepub fn denormalize(&self, value: f32) -> f32
pub fn denormalize(&self, value: f32) -> f32
Denormalize a value
Sourcepub fn phase_encode(&self, value: f32) -> f32
pub fn phase_encode(&self, value: f32) -> f32
Apply phase encoding (maps to -π to π range)
Sourcepub fn phase_decode(&self, phase: f32) -> f32
pub fn phase_decode(&self, phase: f32) -> f32
Decode phase-encoded value
Sourcepub fn angular_velocity(&self, delta: f32) -> f32
pub fn angular_velocity(&self, delta: f32) -> f32
Get π-based angular velocity (for streaming updates)
Sourcepub fn pi_quantize(&self, value: f32, max_val: i8) -> i8
pub fn pi_quantize(&self, value: f32, max_val: i8) -> i8
Quantize with π-based rounding (breaks symmetry)
Sourcepub fn pi_dequantize(&self, quantized: i8) -> f32
pub fn pi_dequantize(&self, quantized: i8) -> f32
Dequantize with π-based scaling
Trait Implementations§
Source§impl Clone for PiCalibration
impl Clone for PiCalibration
Source§fn clone(&self) -> PiCalibration
fn clone(&self) -> PiCalibration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PiCalibration
impl Debug for PiCalibration
impl Copy for PiCalibration
Auto Trait Implementations§
impl Freeze for PiCalibration
impl RefUnwindSafe for PiCalibration
impl Send for PiCalibration
impl Sync for PiCalibration
impl Unpin for PiCalibration
impl UnwindSafe for PiCalibration
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