-
-
Notifications
You must be signed in to change notification settings - Fork 53
Garmin Product Information is incorrect #65
Description
In the FIT files there are two fields "product" and "garmin_product" which are not interchangeable. Therefore, when pulling out the device information for Garmin devices some values that are returned are incorrect. The code does not distinguish between the "product" fields and the "garmin_product" fields in the FIT file. . I reached out to Garmin directly and they noted that "product" has something to do with Garmin Connect and does not reference the product list from the FIT SDK. I had thought I could simply line up the manufacturer array ( with "1" representing Garmin manufacturer), but this doesn't work either. I'll illustrate with an example. If I run the code on a FIT file I will get a ['device_info]['product] array with 8 entries. However, I will get a manufacturer array with only 7 entries. It seems some values of 'product' in the FIT file do not have a corresponding 'manufacturer' value (while all 'garmin_product" ones do). I manually went through the FIT file and pulled the values to illustrate this point:
manufacturer 1 garmin_product 2050
manufacturer 1 garmin_product 2050
product 558
manufacturer 1 garmin_product 1620
manufacturer 1 garmin_product 2050
manufacturer 1 garmin_product 2050
manufacturer 1 garmin_product 1620
manufacturer 25165 product 3
note no manufacturer for 'product' 558.
Therefore without knowing which values in the ['device_info']['product'] array correspond to 'product' or 'garmin_product' it is impossible as far as I can tell to line these arrays up.
Therefore, $this->data_mesgs['device_info']['product'] should NOT contain values pulled from the "product" field. Is there some small change to the code that can be made to only pull the "garmin_product" field and ignore the "product" field?