adriangibbons/php-fit-file-analysis

data_mesgs['session'] is null

conejog opened this issue · 6 comments

Hi, im testing your parser (great job) but i have a problem.

I have an issue with the parser. Unfortunatly, data_mesgs['session'] is null and i don't have any data.
data_mesgs['record'] is ok, full of data. the fit file is ok, is a bike workout (2 hours duration).
recorded using forerunner 935. i tested the fit in fitfileviewer.com and is ok.
do you know where is the problem?

thanks so much.

Hi, my understanding of the FIT protocol is that there are not many mandatory fields. I don't think a valid FIT file is required to have Session messages within it.

Is it just for one file (for your Garmin 935) that you get this or all? As a workaround, you can probably derive the information in Session from the Record data.

If you're able to share a FIT file here then I can take a look. I will run it through the official FIT SDK Java program "FitToCSV" to generate a CSV file

hi , here is the file
seems ok, i can see all the data in training peaks, garmin connect and fitfileviewver.com.
i don't know where is the problem....
77212839306.txt

i have a new one (from other device) with a similar problem.
says Uncaught Exception: phpFITFileAnalysis->readHeader(): not a valid header size!
but the file is ok
78091779901.txt

Just ran the x06.fit file through the SDK parser and there is session messages in there so I am investigating...

First look and I'm a bit stumped. Looking at the protocol to see if anything has changed and I note:

An activity file shall contain file_id, activity, session, and lap messages. The file may also contain record, event, length and/or hrv messages.

So there definitely should be session information in the file (confirmed by the FitCSVTool.jar). I just don't see any messages with a global message number of 18, which relate to session messages.

Hi, how are you?
do you have any update?
thanks. greetings,