Forum: General Topics

Forums / General Topics / Overwrite Track Altitude problem (wrong track leng...

 

Subject:Overwrite Track Altitude problem (wrong track length) 

yano

15:37
Saturday
20-Mar-2010

Location:
Germany

Phone Model:
SE K610i

Stephen,

I've right now discovered an issue with the new Overwrite Track Altitude function...

Firstly I've created my route on TMJ mobile: the start and the end routepoints are also waypoints of mine and they contain the altitude; the other routepoints don't have any altitude data, of course. No time data is available as well, of course.

I've exported the route as CSV.

I've uploaded the CSV file on the web site.

Now, if I don't apply the Overwrite Track Altitude function, the route length is correct but I don't have any altitude stats ...

If I apply the Overwrite Track Altitude function (for all the points or for the empty ones only) it causes, as side effect, the route length to be wrong (almost equal to the ground length). The altitude data are nevertheless correct.

You can find the mentioned example in my 'Routes' folder: it's the zTriglav route.

Would you please look into this issue? Thanks in advance for your support!

Cheers,
yano

 

Stephen

1:33
Sunday
21-Mar-2010

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Yano,

Firstly, I should preface this message with a disclaimer: its late Saturday evening/Sunday morning here so I'm probably not in an ideal state to talk coherantly and may need to look into this further in the morning!! ;-)

I've had a quick look at the two tracks, initially I couldn't see why they were showing such different lengths - the 'ground length' is the same for both, but the 'track length' is very different, and what seemed very odd was that the track *without* altitude was giving a longer length than the one *with* altitude (if anything I'd expect it to be the other way around).

FYI, the Ground Length is calculated by setting each trackpoint altitude to 0, converting from Lat,Lng,Alt to XYZ (relative to the centre of the Earth), then using Pythagoras (ie, distance between two points in 3D) to calculate the straight-line distance between subsequent points. (This may be different from the 'Great Circle Distance' (I think), which is better for long distances, eg London-Sydney, but not so good for short distances (eg <500m) ). The normal 'Track Length' uses the same formula, but includes the altitude when converting from Lat/Lng/Alt to XYZ.

(This will mean that a track with constant(ish) altitude of, say, 500m, will have a longer 'Track Length' than 'Ground Length', since the Earth's radius is larger at 500m altitude than 0m)

But I think/hope I've spotted the problem... Your track *without* altitude, as you mention, starts and ends with your two waypoints that do contain altitude data, each being around 1km high. However since the rest of the track lacks any altitude info this is in effect set to zero, so because the first and last points are each 500-1000m higher than their neighbours, this is included in the track length. ie, TP#1 is 100m horizontally from TP#2, but is 600m higher, which adds almost the same amount to the track length... And the last point has an even higher altitude...

I might have missed something - what happens when you overwrite *every* point with an SRTM altitude?... admittedly the track/ground length calculations may not be perfect, but I think they're working properly here...?

Cheers,
Stephen
 

yano

11:00
Sunday
21-Mar-2010

Location:
Germany

Phone Model:
SE K610i

Stephen!

First of all I must say: UNBELIEVABLE user support from your side!! 24hours/7days!! :))
I really didn't thought of such a GREAT support - more than expected (as usual!) A big THANK YOU! :)

And now: I've spotted the problem myself this morning under the shover ... :) Your functions work fine - my calculation were wrong! :( As you correctly mentioned, the problem was due to the start and end routepoints that do have a "big" altitude and cause -correctly- the track length to be so long.
If I remove those two heights, or if I add the correct altitude for all the routepoints (manually or via your web function) then I get the correct track length, which is, as expected, a bit longer as the ground track.

A hint for myself: sleep a night over before posting issues :(
A hint for you: enjoy your Saturday nights w/o thinking of TMJ :)

Cheers,
yano





 
 

Stephen

17:02
Sunday
21-Mar-2010

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

No worries - I'm actually a bit surprised/relieved (in the sober light of day) that my response made some sense, even if it did ramble a bit! Slight headache today, predictably!

:-)
 

(You must be logged in to post a reply to this thread)