SmartBeaconingConfig

Struct SmartBeaconingConfig 

Source
pub struct SmartBeaconingConfig {
    pub low_speed_kmh: f64,
    pub high_speed_kmh: f64,
    pub slow_rate_secs: u32,
    pub fast_rate_secs: u32,
    pub turn_slope: u16,
    pub turn_min_deg: f64,
    pub turn_time_secs: u32,
}
Expand description

Configuration for the SmartBeaconing algorithm.

Matches the TH-D75 Menu 540-547 settings and the HamHUD SmartBeaconing v2.1 parameter set.

Fields§

§low_speed_kmh: f64

Speed threshold below which slow_rate is used (km/h). Default: 5. Corresponds to TH-D75 Menu 540 (L Spd).

§high_speed_kmh: f64

Speed at/above which fast_rate is used (km/h). Default: 70. Corresponds to TH-D75 Menu 541 (H Spd).

§slow_rate_secs: u32

Beacon interval when stopped/slow (seconds). Default: 1800 (30 min). Corresponds to TH-D75 Menu 542 (L Rate).

§fast_rate_secs: u32

Beacon interval at high speed (seconds). Default: 180 (3 min). Corresponds to TH-D75 Menu 543 (H Rate).

§turn_slope: u16

Turn slope scalar used in the speed-dependent turn threshold formula turn_min + (turn_slope * 10) / speed_kmh. Default: 26. Corresponds to TH-D75 Menu 544 (Turn Slope).

§turn_min_deg: f64

Minimum heading change for a turn beacon, in degrees. Applied as the turn_min term in the threshold formula. Default: 28. Corresponds to TH-D75 Menu 545 (Turn Thresh).

§turn_time_secs: u32

Minimum time between turn-triggered beacons (seconds). Default: 15. Corresponds to TH-D75 Menu 546 (Turn Time).

Trait Implementations§

Source§

impl Clone for SmartBeaconingConfig

Source§

fn clone(&self) -> SmartBeaconingConfig

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 SmartBeaconingConfig

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for SmartBeaconingConfig

Source§

fn default() -> SmartBeaconingConfig

Returns the “default value” for a type. Read more
Source§

impl From<McpSmartBeaconingConfig> for SmartBeaconingConfig

Converts a radio-memory SmartBeaconing config (mph/seconds) to the runtime form (km/h / seconds / f64).

Field mapping (all rates are in seconds on both sides):

MCP fieldRuntime fieldConversion
low_speedlow_speed_kmhmph → km/h (× 1.609_344)
high_speedhigh_speed_kmhmph → km/h (× 1.609_344)
slow_rateslow_rate_secsseconds (widened u16u32)
fast_ratefast_rate_secsseconds (widened u8u32)
turn_slopeturn_slopewidened u8u16
turn_angleturn_min_degwidened u8f64
turn_timeturn_time_secswidened u8u32
Source§

fn from(mcp: McpSmartBeaconingConfig) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SmartBeaconingConfig

Source§

fn eq(&self, other: &SmartBeaconingConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SmartBeaconingConfig

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more