Viewing 26 posts - 1 through 26 (of 26 total)
  • Strava thinks I'm Speedy Gonzales
  • verses
    Full Member

    I track my running using the Endomondo app on my phone. After I’ve run I export it from the Endo website and import it into Strava. This has worked fine for me for years.

    When I do this Strava imports the file and defaults to “Ride” activity type, I then change this to “Run”.

    Since the new year, when it’s set to “Ride” all the stats look correct, however when I switch to “Run” it knocks a massive chunk of my “Moving time” making my “Pace” stupidly quick. The 2 screenshots below show the correct “Elapsed Time”; I wasn’t stopped at any point, certainly not for the duration missing from the “Moving Time”.

    Interestingly my mile splits are stupidly quick, but any segments I run appear to have the correct/plausible pace…

    Anyone any ideas what’s wrong, or seen similar problems?

    The files I export from Endo are GPX, I’ve tried TCX but Strava says it’s an invalid file format…

    larkim
    Free Member

    Not a solution to your issue, but why not use Strava to record the run, and if you still want to maintain Endomondo details just export from Strava and import into Endomondo?

    What do the map traces look like on Strava? Is it obvious from there where the time is lost (you can pan through the route and watch the timecode on the graph I think)?

    theotherjonv
    Full Member

    is it that at times you’re moving so slowly it thinks you’ve stopped, and is only counting ‘moving’ time as opposed to total elapsed?

    verses
    Full Member

    This is only the 2nd time it’s happened (only 2 runs since NY!) so I’ve not experimented much, but next time I’ll try tracking with Strava and exporting to Endo instead.

    The map trace looks fine in Strava, no obvious glitches.

    My actual pace is between 7:00/mile and 7:30/mile; the only times I slow are for road junctions, but as I was running at 6:30am today there wasn’t much traffic so I didn’t need to stop at all.

    scotroutes
    Full Member

    You could try using the Garmin Fit app to record your run. This will auto-upload to Garmin Connect, which can be set to auto-upload to both Strava and Endomondo.

    verses
    Full Member

    Following the Garmin Connect suggestion I imported today’s run into there, and that shows some oddities too. I guess this suggests that the problem lays with the exports from Endo, rather than the imports to Strava;

    The graph below shows my pace at either 30:00 or 0:00.

    The Summary Stats look OK, but the detail shows a moving time of “:00”

    verses
    Full Member

    Anyone see anything obviously wrong with this snippet from my GPX? The file just repeats these tags within a single trkseg, there’s no pauses indicated.

    <trkpt lat="52.054006" lon="1.17199">
    <ele>80.0</ele>
    <time>2015-01-28T06:32:25Z</time>
    <extensions>
    <gpxtpx:TrackPointExtension>
    <gpxtpx:hr>152</gpxtpx:hr>
    </gpxtpx:TrackPointExtension>
    </extensions>
    </trkpt>
    <trkpt lat="52.054002" lon="1.172299">
    <ele>75.0</ele>
    <time>2015-01-28T06:32:27Z</time>
    <extensions>
    <gpxtpx:TrackPointExtension>
    <gpxtpx:hr>152</gpxtpx:hr>
    </gpxtpx:TrackPointExtension>
    </extensions>
    </trkpt>
    <trkpt lat="52.054002" lon="1.172299">
    <ele>75.0</ele>
    <time>2015-01-28T06:32:29Z</time>
    <extensions>
    <gpxtpx:TrackPointExtension>
    <gpxtpx:hr>152</gpxtpx:hr>
    </gpxtpx:TrackPointExtension>
    </extensions>
    </trkpt>
    <trkpt lat="52.054002" lon="1.172299">
    <ele>75.0</ele>
    <time>2015-01-28T06:32:33Z</time>
    <extensions>
    <gpxtpx:TrackPointExtension>
    <gpxtpx:hr>153</gpxtpx:hr>
    </gpxtpx:TrackPointExtension>
    </extensions>
    </trkpt>
    <trkpt lat="52.053966" lon="1.172566">
    <ele>73.0</ele>
    <time>2015-01-28T06:32:37Z</time>
    <extensions>
    <gpxtpx:TrackPointExtension>
    <gpxtpx:hr>153</gpxtpx:hr>
    </gpxtpx:TrackPointExtension>
    </extensions>
    </trkpt>

    woody2000
    Full Member

    Just run Strava and Endomondo at the same time, that’s what I do 🙂

    verses
    Full Member

    Nice, it never even occurred to me that I could 😀

    larkim
    Free Member

    Looking at that GPX file extract, the middle three of the points are all at the same location, implying you were stationary betwee 6h32m27s and 6h32m33s. So whilst the file looks technically correct, either the GPS was having some problems locking on to satellites a lot, or Endomondo has screwed up the trace!

    CraigW
    Free Member

    You could try using Tapiriik, it can copy between Endomondo, Strava, Garmin Connect etc. https://tapiriik.com/

    joshvegas
    Free Member

    You don’t need to copy betwen garmin and strava, just link them, I’d be amazed if you can’t do it with endomondo too

    scotroutes
    Full Member

    As above. Set up Garmin Connect to upload to both Strava and Endomondo. Works for me.

    larkim
    Free Member

    But getting the runs onto Garmin Connect would need you to either have a Garmin watch (which the OP doesn’t) or recording with either Strava or Endomondo and then exporting and uploading to Garmin Connect – no fewer steps than exporting and uploading to whichever app / webservice he chooses in addition to the one he uses to log the run “live”.
    (Having said that, I use Sportstracker to capture the run, export from this, import to Garmin Connect which then pushes to Strava and FetchEveryone and then I manually upload to MyAsics – I’m not a good example of moderation in gpx uploading habits!!)
    Whatever he chooses to do, it seems that Endomondo (or his phone) has screwed up the data with these runs.

    verses
    Full Member

    larkim – Member

    Looking at that GPX file extract, the middle three of the points are all at the same location, implying you were stationary betwee 6h32m27s and 6h32m33s. So whilst the file looks technically correct, either the GPS was having some problems locking on to satellites a lot, or Endomondo has screwed up the trace!

    Well spotted! That’s a bit odd.

    I’ve just had another look at the GPX and there’s bits like that all the way through it. Very strange.

    I’ll send an email to Endo and see if they comment.

    scotroutes
    Full Member

    Unless, as per my first suggestion, he uses Garmin Fit on his phone for actually recording the run in the first place.

    larkim
    Free Member

    Aha, hadn’t spotted that. You’ve just cost me £0.69 in buying it to try it out!

    verses
    Full Member

    I’ve knocked together a bash script to remove the duplicates and that’s now looking fine. 🙂

    larkim
    Free Member

    Nice work on the script – care to post it? Could be useful for when the GPS plays up…

    larkim
    Free Member

    btw, on the Garmin Fit front. Not too impressed with what it appears capable of when running / riding. No audio feedback, no display of last lap time / average pace etc. Can see how it cuts out the uploading loop to Garmin Connect (and can sympathise with Garmin not wanting to produce an app which stops people buying their watches!), but the whole presentation of apps like SportsTracker etc when you’re going along knock spots off the Fit app.

    verses
    Full Member

    My script is below, not sure how much use it’ll be to others as it’s thrown together pretty specifically for my issue.

    #!/bin/sh

    ################################################################################
    # Endomondo GPX exports appear to have duplicate co-ordinates at slightly
    # different time-stamps. This makes anything you import them to think you
    # were paused a lot.
    #
    # This script removes the duplicates. Verses – 28-Jan-2015
    ################################################################################

    # Check that a GPX file has been passed as a parameter
    if [ -z “$1” ]
    then
    echo
    echo “Please specify a GPX file to parse, e.g. $0 file.gpx”
    echo
    exit

    else
    gpx_file=$1

    fi

    # Remove temp files and previous output files.
    rm -f modified_${gpx_file} start_lines > /dev/null 2>&1

    # Get each line beginning with <trkpt and dump them in a temp file
    grep -n “<trkpt” ${gpx_file} > start_lines

    # Get line number and text from line 1
    line_a=grep -n \<trkpt ${gpx_file} | head -1
    line_a_num=echo ${line_a} | awk -F: '{ print $1}'
    line_a_text=echo ${line_a} | awk -F: '{ print $2}'

    # Copy all the header blurb into the new file
    head -20 ${gpx_file} > modified_${gpx_file}

    while read line
    do
    # Get line number and text from next line
    line_b=${line}
    line_b_num=echo ${line_b} | awk -F: '{ print $1}'
    line_b_text=echo ${line_b} | awk -F: '{ print $2}'

    # If next line doesn’t match previous line output to new file, otherwise skip it
    if [ “${line_a_text}” != “${line_b_text}” ]
    then
    echo “${line_a_num} and ${line_b_num} Don’t match”

    end_num=expr ${line_b_num} - 1

    sed “${line_a_num},${end_num} !d” ${gpx_file} >> modified_${gpx_file}

    match_flag=0

    else
    echo “${line_a_num} and ${line_b_num} Match”

    # last <trkpt wasn’t being written, use flag to track last one.
    if [ ${match_flag} -eq 0 ]
    then
    last_trkpt_start=${line_a_num}

    fi

    match_flag=1

    fi

    # Make current “next” line into “previous” line
    line_a_num=$line_b_num
    line_a_text=$line_b_text

    done < start_lines

    # Calc line number of last <trkpt
    tmp_last_trkpt_end=tail -n +${last_trkpt_start} ${gpx_file} | grep -n "</trkpt>" | head -1 | awk -F : '{ print $1 }'
    last_trkpt_end=expr ${tmp_last_trkpt_end} + ${last_trkpt_start} - 1

    # Add 1st instance of last <trkpt to the new file
    sed “${last_trkpt_start},${last_trkpt_end} !d” ${gpx_file} >> modified_${gpx_file}

    # Add the footer lines to the new file
    tail -3 ${gpx_file} >> modified_${gpx_file}

    Feel free to critique/slate the code 🙂

    oldnpastit
    Full Member

    You can use $(some-shell-command) rather than backticks to do
    shell expansion, which means that it brackets properly (so if your command ever ends up with shell expansion inside it, it will still work) and more importantly, you can format it properly in STW.

    i.e. like this:

    line_b_num=$(echo ${line_b} | awk -F: '{ print $1}')

    And you can get rid of the ugly start_lines intermediate file by piping directly into your “while … do … done” statement.

    And add set -e at the top, or you won’t spot errors.

    Better still, use perl and an XML parser library.

    verses
    Full Member

    Nice, not only did I not know that, I hadn’t noticed they were missing above.

    v1.1 below 🙂

    #!/bin/sh

    ################################################################################
    # Endomondo GPX exports appear to have duplicate co-ordinates at slightly
    # different time-stamps. This makes anything you import them to think you
    # were paused a lot.
    #
    # This script removes the duplicates. IJF – 28-Jan-2015
    ################################################################################

    # Check that a GPX file has been passed as a parameter
    if [ -z “$1” ]
    then
    echo
    echo “Please specify a GPX file to parse, e.g. $0 file.gpx”
    echo
    exit

    else
    gpx_file=$1

    fi

    # Remove temp files and previous output files.
    rm -f modified_${gpx_file} start_lines > /dev/null 2>&1

    # Get each line beginning with <trkpt and dump them in a temp file
    grep -n “<trkpt” ${gpx_file} > start_lines

    # Get line number and text from line 1
    line_a=$(grep -n \<trkpt ${gpx_file} | head -1)
    line_a_num=$(echo ${line_a} | awk -F: ‘{ print $1}’)
    line_a_text=$(echo ${line_a} | awk -F: ‘{ print $2}’)

    # Copy all the header blurb into the new file
    head -20 ${gpx_file} > modified_${gpx_file}

    while read line
    do
    # Get line number and text from next line
    line_b=${line}
    line_b_num=$(echo ${line_b} | awk -F: ‘{ print $1}’)
    line_b_text=$(echo ${line_b} | awk -F: ‘{ print $2}’)

    # If next line doesn’t match previous line output to new file, otherwise skip it
    if [ “${line_a_text}” != “${line_b_text}” ]
    then
    echo “${line_a_num} and ${line_b_num} Don’t match so appending”

    end_num=$(expr ${line_b_num} – 1)

    sed “${line_a_num},${end_num} !d” ${gpx_file} >> modified_${gpx_file}

    match_flag=0

    else
    echo “${line_a_num} and ${line_b_num} Match so skipping”

    # last <trkpt wasn’t being written, use flag to track last one.
    if [ ${match_flag} -eq 0 ]
    then
    last_trkpt_start=${line_a_num}

    fi

    match_flag=1

    fi

    # Make current “next” line into “previous” line
    line_a_num=$line_b_num
    line_a_text=$line_b_text

    done < start_lines

    # Calc line number of last <trkpt
    tmp_last_trkpt_end=$(tail -n +${last_trkpt_start} ${gpx_file} | grep -n “</trkpt>” | head -1 | awk -F : ‘{ print $1 }’)
    last_trkpt_end=$(expr ${tmp_last_trkpt_end} + ${last_trkpt_start} – 1)

    # Add 1st instance of last <trkpt to the new file
    sed “${last_trkpt_start},${last_trkpt_end} !d” ${gpx_file} >> modified_${gpx_file}

    # Add the footer lines to the new file
    tail -3 ${gpx_file} >> modified_${gpx_file}

    verses
    Full Member

    I originally did try redirecting into the while rather than using start_lines, but couldn’t get it working so reverted to “ugly-but-works” mode.

    It’s a very long time since I last used perl!

    verses
    Full Member

    Just needed this again and found a slight issue with it so updated the script to cope. Originally I’d hard-coded the number of header lines to 20 (this worked with my original exports), but today’s had 21 so I’ve adapted it to work out how many header lines need to be copied.

    #!/bin/sh

    ################################################################################
    # Endomondo GPX exports appear to have duplicate co-ordinates at slightly
    # different time-stamps. This makes anything you import them to think you
    # were paused a lot.
    #
    # This script removes the duplicates. IJF – 20-May-2015
    ################################################################################

    # Check that a GPX file has been passed as a parameter
    if [ -z “$1” ]
    then
    echo
    echo “Please specify a GPX file to parse, e.g. $0 file.gpx”
    echo
    exit

    else
    gpx_file=$1

    fi

    # Remove temp files and previous output files.
    rm -f modified_${gpx_file} start_lines > /dev/null 2>&1

    # Get each line beginning with <trkpt and dump them in a temp file
    grep -n “<trkpt” ${gpx_file} > start_lines

    # Get line number and text from line 1
    line_a=$(grep -n \<trkpt ${gpx_file} | head -1)
    line_a_num=$(echo ${line_a} | awk -F: ‘{ print $1}’)
    line_a_text=$(echo ${line_a} | awk -F: ‘{ print $2}’)

    # Find the line number of the last line of the header blurb
    header_end=$(grep -n \<trkseg\> ${gpx_file} | head -1 | awk -F: ‘{print $1}’)
    # Copy all the header blurb into the new file
    head -${header_end} ${gpx_file} > modified_${gpx_file}

    while read line
    do
    # Get line number and text from next line
    line_b=${line}
    line_b_num=$(echo ${line_b} | awk -F: ‘{ print $1}’)
    line_b_text=$(echo ${line_b} | awk -F: ‘{ print $2}’)

    match_flag=0
    # If next line doesn’t match previous line output to new file, otherwise skip it
    if [ “${line_a_text}” != “${line_b_text}” ]
    then
    echo “${line_a_num} and ${line_b_num} Don’t match so appending”

    end_num=$(expr ${line_b_num} – 1)

    sed “${line_a_num},${end_num} !d” ${gpx_file} >> modified_${gpx_file}

    match_flag=0

    else
    echo “${line_a_num} and ${line_b_num} Match so skipping”

    # last <trkpt wasn’t being written, use flag to track last one.
    if [ ${match_flag} -eq 0 ]
    then
    last_trkpt_start=${line_a_num}

    fi

    match_flag=1

    fi

    # Make current “next” line into “previous” line
    line_a_num=$line_b_num
    line_a_text=$line_b_text

    done < start_lines

    # Calc line number of last <trkpt
    tmp_last_trkpt_end=$(tail -n +${last_trkpt_start} ${gpx_file} | grep -n “</trkpt>” | head -1 | awk -F : ‘{ print $1 }’)
    last_trkpt_end=$(expr ${tmp_last_trkpt_end} + ${last_trkpt_start} – 1)

    # Add 1st instance of last <trkpt to the new file
    sed “${last_trkpt_start},${last_trkpt_end} !d” ${gpx_file} >> modified_${gpx_file}

    # Add the footer lines to the new file
    tail -3 ${gpx_file} >> modified_${gpx_file}

Viewing 26 posts - 1 through 26 (of 26 total)

The topic ‘Strava thinks I'm Speedy Gonzales’ is closed to new replies.