scrapper / fit4ruby

Fit4Ruby is a Ruby library to read and write FIT files.
GNU General Public License v2.0
26 stars 17 forks source link

add support for converting celsius to fahrenheit #26

Closed masneyb closed 1 year ago

masneyb commented 1 year ago

The FIT file format stores temperatures in celsius. There's no fixed multiplier for converting celsius to fahrenheit so add a new function convert_value() that accepts the original value so that it can be properly converted.

masneyb commented 1 year ago

This change is required by this change to postrunner: https://github.com/scrapper/postrunner/pull/36

scrapper commented 1 year ago

I don't like the way the C to F conversion is done. I've implemented a more generic way that supports an additional offset when needed.