Goodmorning, I have a php project and I need to parse fit files coming from garmin Health API.
Actually I'm using https://github.com/adriangibbons/php-fit-file-analysis and it works fine in 90% of cases. I have issues in two cases:
1) it doesn't support multisport activities
2) in very strange (and rare) cases, it happen that a fit file (apparently recorded like other fit file) has an unsupported file format and we cannot extract values. You can see this fit files at this link on my server http://www.coachpeaking.com/extra/fit-examples.zip . These swim activities are recorded by the same user with the same garmin device. One of them is supported, other one no.
In order to solve these issues, I try to understand how to use official Fit SDK over a php project.
My app is installed on a linux centus cloud server, so I think I can install a jre and use java FitCSVTool.jar to extract data in a csv temporary file and read it with php script.
I try to use jar launching a command line script like
java -jar FitCSVTool.jar --defn none --data record <file>
but I see that gps lat/lng coordinates are extracted without decimals values, so lat = 56.3425353 becomes 563425353
Have you any suggestion for me?
Which could be the best way to parse fit files in a php project?