jovandeginste / workout-tracker

A workout tracking web application for personal use (or family, friends), geared towards running and other GPX-based activities
Other
968 stars 30 forks source link

Heart rate missing - Apple Health Export #298

Open brokoler opened 2 months ago

brokoler commented 2 months ago

Hello,

I created an export of my fitness data from my Apple Watch via Apple Health on the iPhone. The results were .GPX files for each single workout I started, these files were added to the import folder of my user account. Most data was imported successfully, but the heart rate is missing in all files.

grafik

This is the case of all my 62x .GPX files imported, but on Apple Watch the heart rate is shown. The issue seems siliar to this one but probably differs, since I'm using the latest version: https://github.com/jovandeginste/workout-tracker/issues/202

Snippet: `<?xml version="1.0" encoding="UTF-8"?>

Route 2024-09-03 7:48pm 112.3368500.791883222.9880533.2546583.252296` Hope it can be fixed, such a nice software! Have a nice weekend
jovandeginste commented 2 months ago

Hi, the snippet you provided does not contain heart rate information; can you check other files or other parts of the file?

brokoler commented 2 months ago

Hi, on my Apple Health app I see heart rate data for each workout.

After exporting, it seems of Apple health is splitting the data in multiple files:

It seems no heart rate data is saved in the .GPX files, but instead in the XML files. Not sure how the heart rate data can be added to the .GPX files based the output.

Example of Export.xml: `

` Example of export_cda.xml: ` HealthFit 37 <<HKDevice: 0x300ca6490>, name:Apple Watch Series 6 40mm, manufacturer:Development, model:Watch6,1, software:71> 151 HKQuantityTypeIdentifierHeartRate count/min HKMetadataKeyHeartRateMotionContext 2 `