0
$\begingroup$

Do you know what it's called when you want to take a high resolution data set and reduce it to a smaller data set by averaging points?

I have GPS data and need to take an average elevation over every 0.1 miles and store it. I'm using brute force looping in JavaScript but thought maybe there's a named function for it or a smarter mathematical procedure I should try?

Objective: create a clean data set of elevation points I can display as an elevation profile line.

Challenge: the GPS data point distances (x axis) are non-uniform. I need to average them into 0.1 mile samples and return an array of elevation points that are each an average of a 0.1 mile sample, however many source data points contributed only matters when averaging per point.

$\endgroup$
  • $\begingroup$ Perhaps binning ? $\endgroup$ – Henry Jul 4 '17 at 18:52
  • $\begingroup$ Do you have an example of this? The term seems to fit the task. $\endgroup$ – clayperez Jul 4 '17 at 20:14
0
$\begingroup$

Without seeing some data and knowing the purpose of your work, I can give only a speculative answer. I assume these are GPS readings taken along a particular path or road.

Your question seems to imply that there are always several GPS readings within every 0.1 mile. In that case, arbitrarily divide the data into 0.1-mile 'bins'. Then average the GPS readings in each bin.

If the true elevation is not extremely variable from one bin to another, but you suspect the GPS readings might be a bit noisy, then you might revise these average bin elevations by some sort of running average. Maybe for the $i$th bin in a sequence, give weight $1/2$ to the $i$th elevation and weights $1/4$ to each of the neighboring bins, $(i-1)$st and $(i+1)$st. If you feel uneasy about arbitrary divisions into 0.1-mile bins, some such moving average would tend to decrease the effect of the arbitrary choice.

The meaning of 'extremely variable' might change depending on context. If you are giving elevations along a major highway through Kansas, you might treat the data differently than if you are giving elevations along a rugged mountain foot or bicycle path.

$\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.