As usual, I cloned this from github. I found this code clean, simple, and easy to understand. I did not try to build it. I have an executable already in the Fedora packages.
git clone https://github.com/GPSBabel/gpsbabel.git cd gpsbabelOpen the file garmin_fit.cc and look for GarminFitFormat::read() and away you go.
The file is 1314 lines and also supports writing FIT files, so the code is clean, compact, and straightforward.
Tom's backpacking pages / [email protected]