Hello:
I've downloaded the FIT SDK 21.38.00 and I'm trying to work with the decode example. I'm running in Linux and I've managed to compile the C++ example using g++ compiler and build the library as
$ cd FitSDKRelease_21.38.00/FitSDKRelease_21.38.00/cpp $ for i in `ls *.cpp`; do g++ -Wall -O3 -c $i; done $ ar rcs libcppfit.a *.o
After that I have the static FIT library called libcppfit.a in the FitSDKRelease_21.38.00/FitSDKRelease_21.38.00/cpp/ folder.
Then, I compile the decode program as (the order is called from the same folder as before)
$ g++ -Wall -O3 -I. -L. examples/decode/decode.cpp -o decode -lcppfit
I have now a working decode binary.
In this link (drive.google.com/.../1WlbPG-4KCB_dSAnks4vztoAp8ZHyC_TN you can download two FIT files:
- file-garmin-edge530.fit: file logged with a Garmin Edge 530 with the cycling dynamics activated and with a Favero Assioma DUO powermeter
- file-van-rysel500.fit: file logged with a Var Rysel 500 GPS with the cycling dynamics activated and with a Favero Assioma DUO powermeter
When I convert these files with the decode binary I obtain strange results related to the left_right_balance field. For the file-van-rysel500.fit I obtain logical results as, for example,
Field10 (left_right_balance) has 1 value(s)
Val0: 49
Field10 (left_right_balance) has 1 value(s)
Val0: 51
Field10 (left_right_balance) has 1 value(s)
Val0: 48
But for the file file-garmin-edge530.fit I obtain values like
Field11 (left_right_balance) has 1 value(s)
Val0: 176
Field11 (left_right_balance) has 1 value(s)
Val0: 181
Field11 (left_right_balance) has 1 value(s)
Val0: 183
These values are clearly wrong as it must be decoded with the mask 0x7F, and after that I obtain (in Python):
>>> 176&0x7F
48
>>> 181&0x7F
53
>>> 183&0x7F
55
wich are correct values.
So, the question is: is it a bug in decode.cpp program? How it is possible the difference in decoding, and the Garmin FIT file the wrong answer?
Thanks