|
| | AccelerometerObstacleDetector (float threshold=3.0f) |
| | Construct with a deceleration threshold.
|
| |
| void | update (float ax, float ay, float az) |
| | Update the detector with new acceleration values. Checks for sudden deceleration.
|
| |
|
void | setThreshold (float t) |
| | Set the deceleration threshold (m/s^2).
|
| |
| void | subscribe (MessageHandler &handler, MessageOrigin origin=MessageOrigin::Undefined, MessageContent content=MessageContent::Undefined) |
| | Subscribe a message handler to this source, with optional filtering.
|
| |
|
void | unsubscribeAll () |
| | Remove all registered message handlers.
|
| |
| void | sendMessage (Message< float > &msg) |
| | Publish a message to all registered handlers.
|
| |
| void | sendMessage (const Message< Coordinate< float > > &msg) |
| | Publish a message to all registered handlers.
|
| |
| void | sendMessage (const Message< GPSCoordinate > &msg) |
| | Publish a message to all registered handlers.
|
| |
|
void | sendMessage (const Message< MotionState3D > &msg) |
| | Overload for MotionState3D messages.
|
| |
Simple obstacle detector using accelerometer data.
Detects sudden deceleration (collision/obstacle) events by monitoring the X/Y/Z acceleration. When a deceleration above a threshold is detected, a callback (with user data) or message is triggered.
Usage Example
detected!"); }, nullptr); void loop() { detector.update(ax, ay, az); }
Simple obstacle detector using accelerometer data.
Definition: AccelerometerObstacleDetector.h:26