First thanks for a great module.

I find that the profile graph does not show the correct altitudes. I have given it a test set of trackpoints & it gets them wrong quite quickly. I have attached a small test file and a screenshot
Note that in this graphed profile the alt turns down in the last 2 points. which is incorrect

The last 2 points are

<trkpt lat="36.7584267" lon="-5.3676131">
        <ele>833.6003418</ele>
      </trkpt>
      <trkpt lat="36.7584708" lon="-5.3677358">
        <ele>834.0810547</ele>
      </trkpt>

Comments

yateshk’s picture

OK I have found the problem, though I may not understand the reason for the code.
In track_gpx.inc the function FilterArray($anarray) performs a smoothing of the Z values if there are more than 5, only for the values after the first 5 values.
If I change the test from >5 to be >500 my graphs look correct and the repartition histogram is also correct.

What is the reason for the smoothing, the graph seems perfectly ok without it

Laurie

gadzuk’s picture

I'll have a look. That code was written before my time