I have a situation where I need to calculate the speed of a vehicle for a given time period. The data I'm working with is very spotty in the temporal dimension— we might have 5-10 speeds recorded within seconds of each other, but other speeds in the set might be many seconds or minutes apart. The speeds can sometimes be wildly inaccurate which is why we're using median instead of mean.
What we're noticing is this: because of the spottiness of the data, clusters of closely recorded points tend to skew the results of a median calculation because they take up a large amount of the sorted set from a count standpoint, but only represent a relatively small amount from a temporal standpoint.
We've considered interpolating the points (using a linear function) between large gaps in our measurements in order to smooth it out.
Question: is there a better way to solve this problem than by interpolating missing points? Is there a better option than using median (assuming we'll have outliers)?