Read Garmin .fit file function
Show older comments
I already saw a question related on this topic of 2018 but I was wondering if in the meantime someone wrote a function to read directly on Matlab .fit files from Garmin.
I cannot use the gpx file because it only exports GPS informations, while fit file has everything of an activity inside of it and I want to do some post processing on these info.
For the moment a workaround I found is to use the external software Golden Cheetah that already does post processing. It's a complete software but quite heavy. I use it only to convert fit into csv and read them on matlab.
An internal function would it great. Fit files are not text file like gpx, but are encrypted. I guess it is possible to decrypt it (found a Garmin java script, but it has some problems in the conversion) because I don't think the format is protected by copyright.
Accepted Answer
More Answers (1)
Sachin Lodhi
on 2 May 2024
Edited: Sachin Lodhi
on 2 May 2024
Hello Gabri,
I understand that you want to read a Flexible Image Transport System (FITS) file in Matlab. For this, you can use the 'fitsread' function. The 'fitsread' function reads the primary data of the FITS file and returns it as an adjusted array. The function replaces undefined data values with 'NaN' and scales numeric data by the slope and intercept values, always returning double precision values.
The 'fitsread' function facilitates the retrieval of raw data from FITS files, enables the extraction of subsamples of data, and permits the reading of data from designated columns within a FITS file, among other functionalities.
Here is a sample code snippet that uses 'fitsread' function to read data from 'filename.fits' file.
data = fitsread('filename.fits');
I recommend you to please go through the following documentation for more information on 'fitsread' function -
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!