Package org.altbeacon.beacon.service
Class ArmaRssiFilter
- java.lang.Object
-
- org.altbeacon.beacon.service.ArmaRssiFilter
-
- All Implemented Interfaces:
RssiFilter
public class ArmaRssiFilter extends Object implements RssiFilter
This filter calculates its rssi on base of an auto regressive moving average (ARMA) It needs only the current value to do this; the general formula is n(t) = n(t-1) - c * (n(t-1) - n(t)) where c is a coefficient, that denotes the smoothness - the lower the value, the smoother the average Note: a smoother average needs longer to "settle down" Note: For signals, that change rather frequently (say, 1Hz or faster) and tend to vary more a recommended value would be 0,1 (that means the actual value is changed by 10% of the difference between the actual measurement and the actual average) For signals at lower rates (10Hz) a value of 0.25 to 0.5 would be appropriate
-
-
Constructor Summary
Constructors Constructor Description ArmaRssiFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMeasurement(Integer rssi)doublecalculateRssi()intgetMeasurementCount()booleannoMeasurementsAvailable()static voidsetDEFAULT_ARMA_SPEED(double default_arma_speed)
-
-
-
Method Detail
-
addMeasurement
public void addMeasurement(Integer rssi)
- Specified by:
addMeasurementin interfaceRssiFilter
-
getMeasurementCount
public int getMeasurementCount()
- Specified by:
getMeasurementCountin interfaceRssiFilter
-
noMeasurementsAvailable
public boolean noMeasurementsAvailable()
- Specified by:
noMeasurementsAvailablein interfaceRssiFilter
-
calculateRssi
public double calculateRssi()
- Specified by:
calculateRssiin interfaceRssiFilter
-
setDEFAULT_ARMA_SPEED
public static void setDEFAULT_ARMA_SPEED(double default_arma_speed)
-
-