Jump to content

Track Analyzer


fizzymagic

Recommended Posts

I've written a little utility that some people might find useful. It's still a beta, so I need some help testing it. You can get it here. Just unzip the contents into a directory and drag a GPX file onto the executable. It generates a new file with the same name as the GPX file, but with extension ".txt"

 

The program is a tracklog analyzer. You give it a GPX file with zero or more waypoints and one or more tracks, and it gives you summary information about the tracks, including the distance, the amount you climbed and descended, the time it took, etc.

 

But then it does the really neat bit: it detects when you passed near to the waypoints and gives you a report for each of those. So if you went on a hike and found a series of caches, it gives you information about that.

 

Here's an example of the output for a hike I took last week:

Analysis of file D:\Geocaching\Apps\AnalyzeTrack\TestData\Sunol 11-2005.gpx

4 waypoint(s).

1 track(s).
Track Sunol 11-2005:
385 trackpoints.
Elapsed time = 3:08:08
Total distance = 6.35 miles.
Net distance   = 0.00 miles.
Average speed  = 2.02 mph.
Total elevation gain = 2050.52 feet.
Total elevation loss = 2011.15 feet.
Net elevation change = 39.37 feet.
Minimum elevation = 357.61 feet.
Maximum elevation = 1469.82 feet.
Elevation range   = 1112.20 feet.


4 waypoint(s) encountered: 

GQN647 (TINKERS BELL (3.5-3)) :
Approach time: 14:03
Distance traveled at approach = 1.04 miles.
Time from start to approach: 0:22:07
Leave time: 14:32
Minimum Distance = 13 feet.
Time at waypoint: 0:29:41

GCNHFP (OHLONE OVERLOOK (1.5-2.5)) :
Approach time: 14:49
Distance traveled at approach = 1.70 miles.
Time from start to approach: 1:08:19
Leave time: 14:56
Minimum Distance = 27 feet.
Time at waypoint: 0:06:36

GCNHFJ (HALLELUIAH ROCK (2-3.5)) :
Approach time: 15:37
Distance traveled at approach = 3.40 miles.
Time from start to approach: 1:55:52
Leave time: 15:43
Minimum Distance = 15 feet.
Time at waypoint: 0:06:58

GCNHVB (THE 19TH HOLE (2-3)) :
Approach time: 16:20
Distance traveled at approach = 5.02 miles.
Time from start to approach: 2:38:55
Leave time: 16:24
Minimum Distance = 8 feet.
Time at waypoint: 0:04:47

 

Please let me know what you think. But be gentle; it's my first attempt to parse GPX files using C++.

Link to comment

Hey, another neat application from the Fizzymagic. I just happened to have a loop hike with 6 caches handy so I gave it a try. Some early observations on it are:

  • the hike date was not picked up
  • cache number 4 was not detailed (I found it - honest!)
  • the time of day is out by 3 hours (eastern vs pacific?)

This can be very helpful for record keeping purposes. I like to file my active track for decent hikes but they are never linked to the caches involved, at least not with this amount of information.

Thanks Fizzy.

 

Olar

Analysis of file C:\Documents and Settings\Bill\Desktop\GEST.gpx

 

6 waypoint(s).

 

1 track(s).

Track ACTIVE LOG:

145 trackpoints.

Elapsed time = 2:34:00

Total distance = 3.09 miles.

Net distance  = 0.01 miles.

Average speed  = 1.20 mph.

Total elevation gain = 695.44 feet.

Total elevation loss = 671.79 feet.

Net elevation change = 23.65 feet.

Minimum elevation = 902.48 feet.

Maximum elevation = 1217.87 feet.

Elevation range  = 315.39 feet.

 

5 waypoint(s) encountered:

 

GEST1WhoLe (R6QC Let Reg 2/1.5 res2100) :

Approach time: 07:47

Minimum Distance = 9 feet.

Leave time: 07:59

Time at waypoint: 0:11:23

Distance traveled at approach = 0.16 miles.

Time from start to approach: 0:10:25

 

GEST6Plain (R6QH Let Reg 2/1.5 res2100) :

Approach time: 08:06

Minimum Distance = 22 feet.

Leave time: 08:26

Time at waypoint: 0:20:13

Distance traveled at approach = 0.48 miles.

Time from start to approach: 0:29:04

 

GEST5Entra (R6QG Let Reg 3/3 res2100) :

Approach time: 08:43

Minimum Distance = 23 feet.

Leave time: 08:55

Time at waypoint: 0:12:06

Distance traveled at approach = 1.12 miles.

Time from start to approach: 1:06:06

 

GEST3AsIWa (R6QE Let Reg 1.5/1.5 res2100) :

Approach time: 09:27

Minimum Distance = 48 feet.

Leave time: 09:37

Time at waypoint: 0:10:35

Distance traveled at approach = 2.15 miles.

Time from start to approach: 1:49:40

 

GEST2Follo (R6QD Let Reg 2/1.5 res2100) :

Approach time: 09:49

Minimum Distance = 21 feet.

Leave time: 09:59

Time at waypoint: 0:10:16

Distance traveled at approach = 2.67 miles.

Time from start to approach: 2:12:01

 

648578c4-9b62-47bd-87cf-31a28ff7cc31.jpg

 

edited to correct time zone name

Edited by Olar
Link to comment
Hey, another neat application from the Fizzymagic. I just happened to have a loop hike with 6 caches handy so I gave it a try. Some early observations on it are:
  • the hike date was not picked up
  • cache number 4 was not detailed (I found it - honest!)
  • the time of day is out by 3 hours (eastern vs pacific?)

Yeah, I forgot to include the date at the top of the summary for the tracks. I'll add that.

 

The algorithm requires that the track get within 15 meters (about 45 feet) of the waypoint in order to count; I should perhaps make that a little looser. But if I make it _too_ loose, you get false hits.

 

The time of day is determined by having the TZ environment variable set on your system. If it doesn't find one, it just sticks in "PST8PDT" instead. Add "TZ=EST5EDT" to your environment and it should work properly.

Link to comment

Your fixes worked fine Fizzymagic. The date now displays and all caches are listed.

 

Ok, I've tried another test track of 6.5 Km in distance with 139 waypoints. The program hung-up at the point where it would start listing the individual waypoint detail (see screenshot below).

I managed to zero in on 3 different waypoints that seemed to be causing the problem for whatever reason. Without those 3 then it completes as expected. Looking at the waypoint properties I can see no hint as to why they are any different. Their proximity to the track is close enough that they would have been listed. It's a mystery to me.

If it's any value to you Fizzy I can send you the .gpx file.

 

Cheers, Olar

 

31555d9f-2bdb-40e6-8742-0efbc91eaf83.jpg

Link to comment

Thanks to Olar for sending me the file that caused him trouble. I am posting about the fix here because it presented an interesting problem.

 

The problem with Olar's tracklog was that the trackpoints were not there in order of increasing time. I think he had pasted two tracks together into one in such a way that the first one came after the second.

 

Well, normally this would not be a big problem; just sort the trackpoints by time and you're done, right?

 

Wrong.

 

The problem is that some Magellan units have a weird bug in the firmware where the date reported on the trackpoint is the local date but the time is UTC. So if you are hiking along and the time in Greenwich goes through midnight the time in the tracklog appears to suddenly jump back a day.

 

Garmins don't seem to have this problem.

 

So if I sorted the trackpoints by time, the tracks from Magellans would be screwed up. My fix, instead, is to go through the track and if the time suddenly appears to go backwards, I just add 24 hours to all the points after the glitch.

 

But I hadn't anticipated that people might glue tracks together in software. And Olar's tracks were more than one day apart.

 

So the fix, for now, is to add enough days to each trackpoint to make the trackpoints appear to be in the right order. Since the software doesn't report the dates of the encounters (it only reports the date of the start of the tracklog), it's OK, but if people want those dates in the future, I'm not sure how I can fix the Magellan bug and still have everything work.

 

Anyway, the fixed version is up. Many thanks to Olar for helping me find this!

Link to comment

Hi.

 

I know this is an old topic, but is the program still under development (Maybe the source code is available) ?

I would like the statistics outputted in metric instead of miles and feet.

 

I have a Garmin Legend HCx where I use POI's for the caches.

How do I combine the geocaches with the tracklog gpx file ?

 

Thanks

 

Boost

Edited by Boost
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...