InterpolationStrategy
class InterpolationStrategy(locations: List<<Error class: unknown class>>, broadcastDelay: <Error class: unknown class> = BROADCAST_DELAY, startDelay: <Error class: unknown class> = START_DELAY, currentSpeed: <Error class: unknown class> = DEFAULT_SPEED) : SimulationStrategy
Strategy that uses interpolation to determine position. Emits first location and starts emission of other locations after startDelay. Continuously emits rest of locations with a broadcastDelay.
Parameters
locations
List of locations to be emitted.
startDelay
Delay before second location is emitted.
broadcastDelay
Delay before emission of consecutive locations.
Constructors
Link copied to clipboard
constructor(locations: List<<Error class: unknown class>>, broadcastDelay: <Error class: unknown class> = BROADCAST_DELAY, startDelay: <Error class: unknown class> = START_DELAY, currentSpeed: <Error class: unknown class> = DEFAULT_SPEED)
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.