3
$\begingroup$

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)?

$\endgroup$
  • $\begingroup$ How dynamic do you expect your speed to be? Do you have better information on your acceleration? (Speed is a simple function of acceleration and time.) Could you pull a sample of your data based upon defined time intervals? $\endgroup$ – Tavrock Apr 10 '17 at 18:37
  • $\begingroup$ Unfortunately that's the problem— I can't get the data for a set time interval. I'm working with data that comes from a GPS that has spotty connectivity. There will be moments where it has a great connection and plenty of regularly spaced points, but other times it might have a bad connection and not update itself for long periods of time. $\endgroup$ – Jim Heising Apr 11 '17 at 16:48
0
$\begingroup$

If the data is static I would trat those repeated measures in few seconds as a repeated measurement. I would make the mean of those values an use them with all the other points. If the data is dynamic uou could makr the median of the spots at fixed intervals before calculating the average speed

$\endgroup$
0
$\begingroup$

I think that this problem may have many solutions. Perhaps the best should be to use the Discrete Fourier transform.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.