NOTES¶
Online Sensing — Continuous Acquisition, Real-Time Streaming
Low-rate (default 1 Hz) uninterrupted acceleration acquisition, streaming via MQTT or serial. Ideal for long-term SHM of bridges, buildings, etc.
Intuition¶
Online vs Offline¶
Online is designed as a continuous, low-data-rate "heartbeat" monitor — always on, but never storing raw data.
| Online | Offline | |
|---|---|---|
| Rate | 1~20 Hz | 100~4000 Hz |
| Duration | Infinite | Bounded (seconds) |
| Output | MQTT / serial | Memory / SD card |
| Purpose | "Something wrong?" | "What went wrong?" |
Why Low Rate?¶
Most structural damage (loose bolts, crack propagation) develops slowly. For bridge monitoring, 1 Hz is sufficient to track daily temperature and trend changes. Low rate means:
- Power saving: sensor and radio sleep longer
- Less bandwidth: fewer MQTT messages
- Less memory: no large buffer needed
Data Flow¶
API¶
typedef struct {
float sampling_frequency_hz; // rate in Hz, default 1.0
bool enable_mqtt;
bool enable_serial;
const char *mqtt_topic;
} online_sensing_config_t;
esp_err_t online_sensing_start(const online_sensing_config_t *config);
esp_err_t online_sensing_stop(void);
bool online_sensing_is_running(void);
Notes¶
Rate ceiling
Higher rates (configurable up to 1000 Hz) are limited by MQTT and serial bandwidth. For high-rate streaming, consider RT Processing with on-device computation.