ImpactConfig class

Crash & fall detection.

When enableCrashDetection is true, a corroborated high-g impact while moving raises a potential_crash (with a confirmWindowMs cancel countdown) that auto-confirms to crash unless cancelled — delivered via Tracelet.onImpact. enableFallDetection adds best-effort personal-fall detection (more false positives; default off).

Default: disabled. Tracelet provides the trigger + cancel window; it never places emergency calls.

Annotations

Constructors

ImpactConfig({bool enableCrashDetection = false, bool enableFallDetection = false, double crashGThreshold = 2.0, double crashMinSpeedKmh = 25.0, double fallGThreshold = 2.5, int confirmWindowMs = 15000, double minImpactConfidence = 0.6})
Creates a new ImpactConfig.
const
ImpactConfig.fromMap(Map<String, Object?> map)
Creates an ImpactConfig from a map.
factory

Properties

confirmWindowMs int
Countdown (ms) before a candidate auto-confirms. Default 15000.
final
crashGThreshold double
Impact magnitude (g) for a crash candidate. Default 2.0 (lowered from 3.0 after a field-data study found 3.0 g missed ~half of real crashes; the cancel-countdown offsets the extra false alarms).
final
crashMinSpeedKmh double
Pre-impact speed (km/h) required to corroborate a crash. Default 25.
final
enableCrashDetection bool
Master switch for vehicle crash detection.
final
enableFallDetection bool
Personal fall detection (best-effort; default false).
final
fallGThreshold double
Impact magnitude (g) for a fall candidate. Default 2.5.
final
hashCode int
The hash code for this object.
no setteroverride
minImpactConfidence double
Suppress candidates below this confidence. Default 0.6.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
Serializes to a map.
toString() String
A string representation of this object.
inherited
toTlConfig() → TlImpactConfig
Converts to Pigeon TlImpactConfig.

Operators

operator ==(Object other) bool
The equality operator.
override