CTHRU / Hitrava

Convert your Huawei Health sport activities and import them in Strava.
Other
352 stars 34 forks source link

[BUG] Swim duration double duration in Strava #61

Open serg703 opened 3 years ago

serg703 commented 3 years ago

the total swimming time after uploading the .tcx file to STRAVA is almost twice as long as the swimming time shown by HUAWEI HEALTN

Honor band 6a

Strava: as show in Strava

Huawei health: as show in HH

CTHRU commented 3 years ago

Thank you for reporting the issue. Unfortunately, without the original json data of this single activity, I won't be able to see what's going wrong.

If you don't mind, would you (temporarily) share the json export data from that specific activity here? If you ran the standard command for conversion with the --json_export argument, you will find the json export in the folder below Please add the file below to a comment in this ticket (you can just drag and drop it into your new comment screen). I will inform you when i have a local copy, you can then remove it again from your comment.

{your Hitrava installation folder}\output\Hitrack {YearMonthDay HourMinuteSecond}_ .json

You can then drag and drop it into a new comment here. I will remove the link when I have a copy. I only use the file during the time necessary to find the issue.

serg703 commented 3 years ago

Hello. Original file : [Link removed]

Command: Hitrava.py --file HiTrack --sport Swim_Pool --pool_length 23

.tcx file: [Link removed]

HH screenshot with segments [Link removed]

And further. TCX file not loading into TrainingPeaks with error: 1

CTHRU commented 3 years ago

Ok, got the files, thank you for the complete information. I see the error occurs using the legacy file method, I will have a look at it whether I can do something about it later, but I can't promise you anything, The data from the HiTrack file for swimming activities is unfortunately not all that consistent, hence the reason why the JSON/ZIP conversion uses the consistent JSON data.

For more info, see also the changelog here

In the meantime, you could give the JSON/ZIP conversion a try for this activity if you want your data in Strava.

serg703 commented 3 years ago

May be problem with TCX file. Look at last LAP on it (line #2679):

Lap StartTime is "2021-03-09T16:35:36+00:00"

Time first "Trackpoint' with "DistanceMeters" tag also is "2021-03-09T16:35:36+00:00"

but time of second "Trackpoint" with "HeartRateBpm"tag is "2021-03-09T16:33:26+00:0"