{ Dev Farm }

Web & Windows Development

Average speed doesn't seem to be correct

Home Forum Wp Gpx Maps Support Average speed doesn't seem to be correct

  • Questo topic ha 3 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 12 anni fa da Antoine.
Stai visualizzando 4 post - dal 1 a 4 (di 4 totali)
  • Autore
    Post
  • #24322 Rispondi
    Antoine
    Ospite

    Hi,
    I loaded my GPX file and there is a mistake with the average speed.

    It gives this:
    Total distance: 49.28 km
    Total climbing: 1549 m
    Average speed: 29.36 km/h
    Total Time: 02:06:05

    If I check on trackreport.net, it gives me this:
    Distance: 49.17 km Average speed: 23.40 km/h
    Total ascent: 1176 m Avg. moving speed: 23.53 km/h
    Total descent: 1178 m Maximum speed: 61.10 km/h
    Total time: 2:06:06.0 Moving time: 2:05:24.0

    I expect something around the 23, 24km/h, not 29.

    Any idea?

    #24325 Rispondi
    max
    Membro

    can you show me your gpx?

    #24326 Rispondi
    Antoine
    Ospite
    #24330 Rispondi
    Antoine
    Ospite

    I guess the error is in wp-px-maps-utils.php on line 363
    You have now:
    $points->avgSpeed = array_sum($_speed) / count($_speed);
    But not every speed has been calculated for the same distance hence why you may have some issues.
    I would do something like that:
    $points->avgSpeed = array_sum($_dist) / array_sum($_time);
    Maybe check the units to have that in km/h

    What do you think?

    Antoine

Stai visualizzando 4 post - dal 1 a 4 (di 4 totali)
Rispondi a: Average speed doesn't seem to be correct

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Le tue informazioni:




Non è possibile lasciare nuovi commenti.