jlennox / HeartRate

Bluetooth heart rate monitor
MIT License
109 stars 35 forks source link

What do the numbers stand for (CSV) ? #27

Closed DesignThinkerer closed 2 years ago

DesignThinkerer commented 2 years ago

Hi! First of all thanks a lot for this software, it works great with my polar h10 ! I saved my data in csv format and was wondering what each column corresponded to.

E.g :

44602,3509318287,56,56,,1076,1088

44602 = date in oadate format, so 10/02/2022 3509318287 = time, 08:25:21 (I guess ?) 56 = heart rate ? 56 = heart rate again ? = Empty column, is that normal ? 1076 = ? 1088 = ? (that column is empty most of the time except some times, is it because of noise from the device ?)

Here's the full data : Log.csv

I used the latest build (1.7.2) and the default settings, on windows 10.

jlennox commented 2 years ago

Hey there.

The format is {dateString},{bpm},{status},{reading.EnergyExpended},{rrvalue}

Your logs seem.... odd. I fire this up locally and my logs are... odd.

I'll make some time to take a look after work today There's clearly something unexpected here.

1076,1088 are the two rrvalues. The empty value is the EnergyExpended. Not all monitors support those 2 things. 56 is a reasonable heartrate reading, but why's is there? And why the heck is it in the status column, too 0.o and then 2 values in the date area? Eeek.

jlennox commented 2 years ago

Is your system locale set to a culture that uses "," for decimals? I did not anticipate that :)

I'll have a fix in soon. I'm changing the default formatter from OA, too. It doesn't feel like a useful default. It'll just be the culturally default one.

jlennox commented 2 years ago

Mind giving the fix a test? heartrate-1.7-broken-csv-fix.zip

In your settings.xml, change <LogDateFormat>OA</LogDateFormat> if present to <LogDateFormat></LogDateFormat>

Or if you wanted to use OA format, it'll properly quote the cell now.

DesignThinkerer commented 2 years ago

The format is {dateString},{bpm},{status},{reading.EnergyExpended},{rrvalue}

Ah I see now, thanks !

Is your system locale set to a culture that uses "," for decimals? I did not anticipate that :)

Yes, my system is in french and it does uses "," for decimals. I did a quick test with your fix and it looks like the column are correct now :

Log.csv

Here's a sample :

"44603,94608875",69,NotSupported,,"997"
"44603,9461001968",69,NotSupported,,"1054"
"44603,9461116551",68,NotSupported,,"1028"
"44603,9461231366",66,NotSupported,,"1005,962"

And here's what I get when I change <LogDateFormat>OA</LogDateFormat> to <LogDateFormat></LogDateFormat>

11/02/2022 22:52:04,80,NotSupported,,"915"
11/02/2022 22:52:05,78,NotSupported,,"965,971"
11/02/2022 22:52:06,76,NotSupported,,"950"
11/02/2022 22:52:07,75,NotSupported,,"876"

Both time format are useful, that's a nice addition !

"NotSupported" is in the column status, does that refer to the "reading.EnergyExpended" feature not being supported or is its own thing? Again, thanks for taking the time to help me :)

jlennox commented 2 years ago

tbh, I forget what the spec says about Unsupported, but it's the "ContactSensorStatus"

The only other values are "NoContact" and "Contact". I guess that means it doesn't report that.

Thanks for testing! I'm glad we got it working for you. If there's feature requests or other issues, please do open another case!