BeaconMeasurement

class BeaconMeasurement(measurement: Double, elapsedRealtimeNanos: Long, beacon: Beacon, userWalkingSpeed: Double = 1.4)

Constructors

Link copied to clipboard
constructor(measurement: Double, elapsedRealtimeNanos: Long, beacon: Beacon, userWalkingSpeed: Double = 1.4)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Returns a conservative estimate of the current maximum horizontal distance to the beacon. This value will increase over time as the estimated distance becomes increasingly uncertain until a new measurement is received.

Link copied to clipboard
fun update(rssiMeasurement: Double, measurementTime: Long)

Update the estimate for the true RSSI using a 1D Kalman filter. Prediction stage: x̂ₜ₍ₜ₋₁₎ = Fₜ * x̂₍ₜ₋₁₎₍ₜ₋₁₎ + Bₜ * uₜ Pₜ₍ₜ₋₁₎ = Fₜ * P₍ₜ₋₁₎₍ₜ₋₁₎ * Fₜᵀ + Qₜ