Class RssiHistogram
- java.lang.Object
-
- io.heraldprox.herald.sensor.DefaultSensorDelegate
-
- io.heraldprox.herald.sensor.analysis.algorithms.distance.RssiHistogram
-
- All Implemented Interfaces:
SensorDelegate
public class RssiHistogram extends DefaultSensorDelegate
-
-
Constructor Summary
Constructors Constructor Description RssiHistogram(int min, int max)
RssiHistogram(int min, int max, TimeInterval updatePeriod, TextFile textFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(double rssiValue)
void
clear()
double
normalise(double rssi)
double
normalisedPercentile(double percentile)
void
read(TextFile textFile)
int
samplePercentile(double percentile)
void
sensor(SensorType sensor, Proximity didMeasure, TargetIdentifier fromTarget)
Measure proximity to target, e.g.java.lang.String
toString()
void
update()
void
write(TextFile textFile)
-
-
-
Constructor Detail
-
RssiHistogram
public RssiHistogram(int min, int max, @NonNull TimeInterval updatePeriod, @Nullable TextFile textFile)
-
RssiHistogram
public RssiHistogram(int min, int max)
-
-
Method Detail
-
sensor
public void sensor(@NonNull SensorType sensor, @NonNull Proximity didMeasure, @NonNull TargetIdentifier fromTarget)
Description copied from interface:SensorDelegate
Measure proximity to target, e.g. a sample of RSSI values from BLE peripheral.- Specified by:
sensor
in interfaceSensorDelegate
- Overrides:
sensor
in classDefaultSensorDelegate
-
add
public void add(double rssiValue)
-
clear
public void clear()
-
samplePercentile
public int samplePercentile(double percentile)
-
normalisedPercentile
public double normalisedPercentile(double percentile)
-
read
public void read(@NonNull TextFile textFile)
-
write
public void write(@NonNull TextFile textFile)
-
update
public void update()
-
normalise
public double normalise(double rssi)
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-