Track evelation stats

Started by Menion, April 16, 2011, 14:11:52

0 Members and 1 Guest are viewing this topic.

Menion

Hi to all,
 I received today email from Martin with question about track stats. So I want to discuss about it a little.

Main question is - are elevation values correct?

Martin wrote that all stats are cca twice as big as should be. To be true, I do not tested well this feature so everything is possible here. Anyway how I get stats about elevation etc ...

- for every added point I compute elevation gain (of course not for first point in track segment)
so when new point is added, I compute distance from previous point and elevation change. From those values I compute declivity as

declivity = delta_elevation / delta_distance;

and then I sum all values by this simple method. Whole code for my elevation handling is below. Distance and elevation values are in metres and these are delta values, so difference between actual and previous point

   protected void addElevation(double distance, double elevation) {
    double declivity = elevation / distance;
    if (declivity > 0.025) {
    elePositiveDistance += distance;
    elePositiveHeight += elevation;
    } else if (declivity < -0.025) {
    eleNegativeDistance += distance;
    eleNegativeHeight += elevation;
    } else {
    eleNeutralDistance += distance;
    eleNeutralHeight += elevation;
    }
   
    eleTotalAbsDistance += distance;
    eleTotalAbsHeight += Math.abs(elevation);
    }

So this mean that is declevity is bigger then 2.5%, I take it as "uphill" movement, opposite as "downhill" movement.

What you think? Are values as you expected? Also second question. Is there any value that you miss in track stats and this value is easy to compute?

Also Martin, may you attach some more description about this "issue" (if there is any). Thanks
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •