I am trying to create a bot which will continually average runner speeds from the start to the end of a race giving me a flow of average values, each average containing one more speed sample than the last as a horse travels a little further and another speed sample is taken then tallied and averaged. This average SV will be changing but at any point would show the ‘effective’ speed of each runner to that point based on the distance travelled and time taken.
Dallas has suggested to not use History Lists for this purpose. I know I can sample a speed every 0.5 seconds (maybe excessive) and I know how to average these over (say) 10 seconds worth of sampled speeds shifting as one speed value enters the tally and one drops out.)
BUT I don’t know if there is a way for the ‘average SV’ to be the average of an increasing number of values as the race progresses. At the moment the race starts the average would be of one speed sample, 10 seconds later would be the average of 20, after a minute it would be the average of 120 speed samples etc.
This may seem mad but as I study times and distances more and more it would be invaluable at (just say) the mid point of the race to know the ‘effective’ speeds achieved by the runners to that point and could be useful for the triggering of bets, maybe subject to also to other, additional conditions based on SV’s derived in other ways.
If it can’t be done or is impractical that’s fine but before looking at other methods I just wondered if this holy grail is possible / practical.
Thanks Dallas and anybody else