node-red-contrib-ibeacon-kalman
v1.0.3
Published
Kalman filter for iBeacon RSSI distance estimation
Maintainers
Readme
node-red-contrib-ibeacon-kalman
A Node-RED node for iBeacon distance estimation using Kalman filtering.
Installation
npm install node-red-contrib-ibeacon-kalmanOr install via the Node-RED Palette Manager.
Features
- Converts RSSI to distance using log-distance path loss model
- Implements Kalman filtering for smooth distance estimates
- Configurable parameters:
- TX Power (RSSI at 1m)
- Path loss exponent (n)
- Process noise
- Measurement noise
Usage
- Add the node to your flow
- Configure the parameters:
- TX Power: RSSI value at 1 meter distance (typically -59 dBm)
- Path Loss Exponent: Environment factor (2.0 for free space)
- Process Noise: How quickly the filter adapts (default 0.1)
- Measurement Noise: RSSI measurement variance (default 1.0)
Input
msg.payload: RSSI value in dBm (number)
Output
{
rssi: -70, // Input RSSI value
rawDistance: 3.16, // Unfiltered distance estimate
filteredDistance: 2.87 // Kalman-filtered distance
}Dynamic TX Power Configuration
You can override the configured TX Power per-message:
msg.txPower = -62; // dBmWhen TX Power changes:
- Kalman filter will automatically reset
- New value will be used for distance calculation
- Applied TX Power included in output message
Dynamic Parameters
You can override these parameters per-message:
| Parameter | Type | Default | Description |
|--------------|--------|---------|----------------------------------|
| txPower | number | -59 | RSSI at 1m distance (dBm) |
| nValue | number | 2.0 | Path loss exponent (1.0-5.0) |
// Пример динамического изменения
msg.txPower = -62; // Для конкретного маяка
msg.nValue = 2.3; // Для среды с препятствиямиWhen parameters change:
- Kalman filter automatically resets
- New values are used for calculations
- All parameters included in output message
{ "payload": -65, "txPower": -58, "nValue": 3.0, "topic": "beacon/kitchen" }
License
MIT
