10-09-2020 01:59
10-09-2020 01:59
Hello, I am opening a new topic because I couldn't find an exact answer among the topics already open in the forum.
I do need a precise answer because I am working on a project where I need to compare the heart rate and the position from the fitbit.
In particular, for each person in the case study and for each session of the person, I receive two files. For each session, one file contains the data of the accelerometer and the timestamp, while the other file contains data of the heart rate with the timestamp.
Unfortunately data are not sorted because they were sent from the fitbit to a tablet and then from the tablet to a server.
My questions are:
- if I sort the rows of each of the two files (associated to a session of a person) by increasing timestamp, will I be able to reconstruct the exact sequence?
- will the difference of two consecutive timestamps represent the time in milliseconds between those instances?
- I ask this question because, reading other topics, it seems that each time the fitbit is used, a random number, say t0, is generated and it represents the "timestamp" of the initial moment of a session. After that moment, a new timestamp is reported at each sampling, which is given by t0 plus the number of milliseconds from the initial moment to the current moment. Is this right?
- Data of the accelerometer and data of the heart rate do not correspond. In fact, the sampling frequency for the accelerometer is 50 Hz, while the sampling frequency for the heart rate is 1 Hz. So there are more rows containing data from the accelerometer than those containing data associated to the heart rate. I need to do data analytics on these data and merge them into a single table, so my idea is to replicate data of the heart rate for all those data for the accelerometer which timestamps are between two closest timestamps in the data of the heart rate. Is this comparison safe or does the fitbit use two random numbers for the timestamps, i.e., one for the accelerometer and one for the heart rate?
Thank you so much for your help and best regards.