python-fitparse icon indicating copy to clipboard operation
python-fitparse copied to clipboard

Raw acceleration values

Open thesimonho opened this issue 7 years ago • 0 comments

Is it possible to extract the raw accelerometer values from a fit file?

I tested the following example from the docs but it doesn't contain any acceleration fields:

from fitparse import FitFile

fitfile = FitFile('C:\\Users\\Simon\\Desktop\\2018-05-27-13-44-59.fit')

# Get all data messages that are of type record
for record in fitfile.get_messages('record'):

    # Go through all the data entries in this record
    for record_data in record:

        # Print the records name and value (and units if it has any)
        if record_data.units:
            print(" * %s: %s %s" % (
                record_data.name, record_data.value, record_data.units,
            ))
        else:
            print(" * %s: %s" % (record_data.name, record_data.value))

thesimonho avatar May 28 '18 15:05 thesimonho