Saturday, October 10, 2020

App HealthMate on Android Part 3 - Heart Rate, GPS, Steps

 

Okay, third part of my analysis.

The first part can be found at: https://bebinary4n6.blogspot.com/2020/10/app-healthmate-on-android-part-1-users.html

The second part can be found at:  https://bebinary4n6.blogspot.com/2020/10/app-healthmate-on-android-part-2.html

Base folder of the app: /data/data/com.withings.wiscale2 

This post is about the heart rate, step and GPS data tracked. So the detailed data for an activity and actions of a user in general.


Heart Rate

This data can be found in the database Withings-WiScale, table vasistas.

In this table is a field category. If it has the value -16 it is heart rate data.

So I do the following select (w is an alias for the database):
 
And get the following result:
 
 
We already know the format of the timestamp. 
I currently can just guess the meaning of the filed duration. It could be the duration of the measurement in milliseconds. This would mean for the first line, 113 seconds heart rate measuring. But here is double checking necessary, this is only an assumption. 

I just tested the device a few days but I have 1701 HR measurements. Withings says in there technical description that they measure the heart rate every 15 minutes if no activity is actively tracked. 

The field deviceId holds the ID of the source device because it is possible to attach more than one device at the same time.

Steps

This data can be found in the database Withings-WiScale, table vasistas.

In this table is a field category. If it has the value 16 it is step data.

So I do the following select (w is an alias for the database):
 
 
And get the following result:
 
 
Note quite sure what the value in ascent/descent means because the value is quite high for meters. 
But, as you can see, I only do a few steps in 60 seconds. Perhaps I should get more active.

GPS

Okay, let's see what we can find about GPS data.
We already see something like coordinates when starting an activity and when ending but not the tracing of it.
 
This data can be found in the table WorkoutLocation, database room-healthmate.db .

 
Here you see latitude, longitude, timestamp, altitude etc.
This data is only generated when a GPS device is connected and activity tracking is activated. This means, the watch is connected to a smartphone with GPS activated or the watch itself has GPS and the user explicitly starts an exercise.
 
In the shown data the device ID is 0, this means GPS data come from the Smartphone. 

Conclusion

HealthMate stores a lot of useful data.
One can use this data and visualize it, see when a person was active (both just walking around or doing an exercise)  or slept. Correlated with the heart rate data it can be possible to say if person person has an irregular heart rate at a specific moment.
GPS is only available if the tracker has a built in GPS function or the device has been connected  to a smartphone and activity tracking for an exercise was activated. 
 
So, now I would like to visualize the data in a nice way... damn, more stuff to do.
 
Hope you head a nice read.



No comments:

Post a Comment