September 14, 2023

Using my fit file software

You have two programs fit66 and g66i, both in /home/tom/bin

The program g66i is a python "gui" program and is the intended interface.

To see a track on the gtopo display just type "g66i xyz.fit" and the default behavior is to draw the track on the map using blue dots at each location in the "fit" file.

Where are the files?

When I copy data from my garmin 66i, I put it into /u1/Projects/Garmin/Files/Activities. The names are mildly obnoxious due to an embedded space, as in:
2023-09-13 16.08.29.fit
Someday I should rig up a nice import script that would copy only the most recently added files and replace that space with an underscore.

On my system, the fit software source is in /u1/Projects/Garmin/fit66 and I often work from here. I edit the makefile then run "make new" to copy the latest file to "new.fit".
Then:

g66i new.fit
The default behavior is to draw the entire path on the gtopo map, which needs to be up and running before typing this command.

Trimming records

I often forget to turn off my GPS, which results in the track including a bunch of road driving at the end of each track. Also on my latest hike, I included the drive to the trailhead because I wanted to get details on road location and precise location of trailheads. As a result the current track (from 9-13-2023) needs to be split into 3 pieces.

The first thing is to determine the record numbers. I use the g66i GUI to aid in this. I clear the track, then do trial and error typing record numbers into the entry field. This shows a single blue dot for that record number. I then use the + and - buttons on the GUI to fine tune record numbers. Paying attention to the speed can also be very helpful in discriminating hiking from vehicle motion.

Once you have record numbers, you use the "fit66" program to actually generate trimmed files. Yes, you will need to write down (or remember) the record numbers you use g66i to determine. An example is probably the easiest way to show how to do this.

I collected data and determined record limits as follows:

1 - 687     The road in
688 - 2023  The hike
2023 - 2794 The drive out
I used the following commands:
fit66 -t 1:687 new.fit road.fit
fit66 -t 688:2023 new.fit hike.fit
Note that the end range is allowed to go beyond the end of the file, i.e. you could give a range like 778:99999 if you just wanted all the records from 778 to the end. The program simply loops over the existing records and checks if they are within range to be retained. Of course this won't work well if you want to trim off the end of the file (as in this example.
Have any comments? Questions? Drop me a line!

Tom's backpacking pages / tom@mmto.org