InterpolationStrategy

class InterpolationStrategy(locations: List<GeoLocation>, broadcastDelay: Duration = BROADCAST_DELAY, startDelay: Duration = START_DELAY, currentSpeed: Speed = DEFAULT_SPEED) : SimulationStrategy

Strategy that uses interpolation to determine the position. Emits first location and starts emission of other locations after a startDelay. Continuously emits rest of the locations with a broadcastDelay.

Constructors

Link copied to clipboard
constructor(locations: List<GeoLocation>, broadcastDelay: Duration = BROADCAST_DELAY, startDelay: Duration = START_DELAY, currentSpeed: Speed = DEFAULT_SPEED)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Calculates a SimulationLocation to broadcast as a location update.

Link copied to clipboard

Changes current speed that will be used to calculate distance increment.

Link copied to clipboard
open override fun hasNext(): Boolean

Returns true if the geometry has more elements.