Logo Lanfrica

ClerQ-Intelligence-CQ/Teka

Domain:

digital infrastructure

Record type:

software
Creator:
Cle
Host:
Teka (Swahili for capture) - Signal Acquisition Engine for edge-native digital twinning # Teka *"teka" — Kiswahili for "capture"* *Signal Acquisition Engine for edge-native digital twinning. Raw sensors in, clean typed event stream out. Offline, power-aware, tiny.* --- ## What it does Teka sits between phone hardware and everything above it. It takes raw sensor input (accelerometer, GPS, barometer, microphone amplitude, screen state) and normalizes it into timestamped, confidence-scored events. Sampling adapts to activity: quiet sensors rest at 500 ms, motion wakes them to 50 ms, so the battery survives the day. Pipeline: ingest → activity gate → duty cycler → event bus. The simulator in `src/main.rs` feeds synthetic readings (pinned to Dar es Salaam) so the whole loop runs and benchmarks anywhere with no device. ## Run it ```bash cargo run --release ``` Runs the simulation benchmark (100 to 50,000 sweeps), the ingest pipeline (50,000 events timed), and the duty-cycling demo. All output goes to stdout; nothing is written to disk. ## Use it as a module ```rust let bus = Arc::new(Mutex::new(Vec::new())); let mut engine = SignalAcquisitionEngine::new(bus); let event = engine.ingest(SensorType::Gps, SensorData::gps(-6.79, 39.20, 4.0)); // event.confidence derives from reported accuracy; engine.sampling_interval() // drops to 50 ms while moving, rests at 500 ms when still. ``` ## Confidence and memory (measured, not claimed) Confidence derives from signal quality per sensor: GPS degrades with reported accuracy, microphone with envelope level, accelerometer with deviation from rest gravity, barometer with plausible range. See `confidence_for`. Memory sizes print from `std::mem::size_of` at runtime; engine steady-state stays under 1 KB plus the bus. ## Tests ```bash cargo test ``` Covers activity transitions, interval floors, confidence bounds and ordering, sweep shape, and measured profile output. ## Status and limits Simulator-backed: no real hardware bindings yet, so treat readings as pipeline validation, not field data. Raw sensor data …