Inspired by Bram2473 java code to examine the exact vo2max (metmax) in FIT files I studied the FIT format over the holiday and wrote some code in PHP to take apart FIT files without the SDK so I could get higher error tolerance and other interesting fields.
It is ugly as hell but if there is any interest I can clean it up and eventually throw it on github or something to help others.
Since it doesn't have the SDK it doesn't know things like field names or scaling which you'd have to lookup yourself but easy enough with the CSV or fit dump utilities.
FIT is rather nasty and messy but it's still only about 100 lines. Have to finish some work on developer fields.
It also occurs to me it could be eventually converted to javascript. I don't think anyone has written a javascript client-side FIT parser? The only complexity is that "unpack" in javascript is like 300 lines of code but could be done via a library (defeating the small code size idea unfortunately).
basically FIT is just
file header -> block header (compressed vs uncompressed) -> definition vs data blocks -> definition/data fields (eventually developer fields with indexes)
the messy part is stepping byte by byte through the file and caching local definition tables because the data that uses them can be out of order
FIT was obviously written in an ancient time with low cpu power devices that just had to slap down data quickly
What's interesting is that when a garmin watch has to append stored and forwarded heartrate data from a HRM-TRI/SWIM/PRO. it apparently must take apart and put together a FIT file on the fly right on the watch in that limited memory and cpu power so that code must be really fascinating and tiny, Garmin might consider showing that off