Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calories are not shown correctly in strava. Add steps to the tcx file #343

Closed
juanro49 opened this issue Feb 18, 2024 · 3 comments · Fixed by #354
Closed

Calories are not shown correctly in strava. Add steps to the tcx file #343

juanro49 opened this issue Feb 18, 2024 · 3 comments · Fixed by #354

Comments

@juanro49
Copy link
Contributor

juanro49 commented Feb 18, 2024

In the latest versions I've seen that calories are not shown correctly in Strava. Reviewing the created .tcx file from Amazfish, I've seen that the Calories tag is being created off the Lap tag instead of inside, which causes the problem.

image

On top of that, could the Steps tag be added for the steps? According to the scheme, it could be done by creating this structure inside the Lap structure

<Extensions>
<LX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2">
<Steps>000000</Steps> <!-- Number of steps -->
</LX>
</Extensions>
jmlich added a commit to jmlich/harbour-amazfish that referenced this issue Feb 28, 2024
@jmlich
Copy link
Contributor

jmlich commented Feb 28, 2024

Can you please verify if it works properly with pull request #345
I am not using strava so I am not able to tell if this works properly.

@juanro49
Copy link
Contributor Author

Can you please verify if it works properly with pull request #345 I am not using strava so I am not able to tell if this works properly.

Thanks! I have compiled and installed a version with that correction and also added the step section, attached it in case you want to add it to the pull request. Tomorrow I'll try to see if the calories and steps are properly exported and I'll confirm it around again.

//Steps
    m = m_summary.metaData("steps");
    if (m.key == "steps") {
        out << "<Extensions>" << endl;
        out << "  <LX xmlns=\"http://www.garmin.com/xmlschemas/ActivityExtension/v2\">" << endl;
        out << "    <Steps>" << m.value << "</Steps>" << endl;
        out << "  </LX>" << endl;
        out << "</Extensions>" << endl;
    }

imagen

@juanro49
Copy link
Contributor Author

I can confirm that with the pull request correction, calories are already displayed correctly on Strava.

Also, with what I added about the steps, they are already shown in the TCX file, but as far as I have been able to see, Strava does not take the steps data from TCX at the moment. I have opened a support ticket for them to consider the option. https://support.strava.com/hc/es-es/requests/2831801

imagen

To follow the order of the schemes, I moved the Extensions structure for steps under Tracks in the code of the version I generated for testing purposes

//Steps
    m = m_summary.metaData("steps");
    if (m.key == "steps") {
        out << "<Extensions>" << endl;
        out << "  <LX xmlns=\"http://www.garmin.com/xmlschemas/ActivityExtension/v2\">" << endl;
        out << "    <Steps>" << m.value << "</Steps>" << endl;
        out << "  </LX>" << endl;
        out << "</Extensions>" << endl;
    }

imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants