infinispan-demos / streaming-data-workshop

Streaming data workshop with Infinispan, Vert.x and OpenShift
11 stars 7 forks source link

Calculate future train positions #17

Open galderz opened 7 years ago

galderz commented 7 years ago

For each train, the train position stream gives you its current position and the future positions for the next 30 seconds with an interval of 2 seconds.

The current code just displays the current position, but the way to achieve a continuous movement of trains is by taking advantage of these future positions. This code shows how to calculate a trains specific position at a given time using the current and future position information.

Implementing this would give a continuous train position movement feeling.