Hi Mal,
With the example you gave above, is each sample taken one second apart? So the 2 second speed could be taken as (40 + 43) / 2 = 41.75?
I haven't run into this issue (not really that fussy about the extra tenth of a knot) but it's certainly something that others have complained about.
While we're on the subject, any chance of refining the 1 hour algorithm? At the moment it looks like Realspeed starts at point 1, adds up the next 3600 samples, and stores that number. Then, it starts at the point 2 and adds up everything up until sample 3601. And again for point 3.
So most points in a track are added up many thousands of times...
I think you could possibly speed it up by taking the difference between point 1 and 2 off your accumulated total, then adding the difference between points 3600 and 3601.
Obviously you'd need to restart this process if there was a dropout or an invalid point, but I think that even if you used this 'sliding window' algorithm for only ten points, then reset, you would speed up the calculation by an order of magnitude at least.
en.wikipedia.org/wiki/Running_average