pierremtb / easy-fit

Parse your .FIT files easily, directly from JS
Other
70 stars 51 forks source link

Incorrrect offset for altitude fields #15

Open michaelfomin opened 7 years ago

michaelfomin commented 7 years ago

The offset value for altitudes should be -500, it appears to be configured as +500.

When encoding altitude fit will use uint16 = 5 * (altM + 500)

So decoding should use altM = uint16 / 5 - 500 // offset should be -500

pierremtb commented 7 years ago

Well, I think these values come from the FIT SDK and I didn't check. Are the altitudes wrong?

Haven't touched this code for a long, long time, sorry for the lack of knowledge 🥇