Hello Oliver,
fact 1) Few months ago we had a discussion about the way ascent is
calculated in QMapShack. At the end the conclusion was that a threshold
of 5 meters is used, and this is now in Wiki. Using a threshold is like
counting contour lines on a map. I fully agree and I do not write this
email to attempt anything against this.
fact 2) I capture my tracks at 1 pt/s rate (to get more precision on
timing for my Strava segments and because sometimes filters in my Etrex
30x are too rough, even with highest rate). First I send the 1 Hz track
to Strava, then I archive it after having applied 1 meter Douglas-Peuker
filter.
fact 1 + fact2) I always have bigger ascent/descent values after
Douglas-Peuker filtering. Until a few days ago it was a mystery to me :
why be removing points, ascent/descent could be higher ?
After some thinking and trials I modified code in CGisItemTrk.cpp, line
919 :
It was :
/ if(lastEle != NOINT)//
// {//
// qint32 delta = trkpt.ele - lastEle;//
//
// trkpt.ascent = lastTrkpt->ascent;//
// trkpt.descent = lastTrkpt->descent;//
//
// if(qAbs(delta) > ASCENT_THRESHOLD)//
// {//
// if(delta > 0)//
// {//
// trkpt.ascent += delta;//
// }//
// else//
// {//
// trkpt.descent -= delta;//
// }//
// lastEle = trkpt.ele;//
// }//
// }/
it is now :
/ if(lastEle != NOINT)//
// {//
// qint32 delta = trkpt.ele - lastEle;//
//
// trkpt.ascent = lastTrkpt->ascent;//
// trkpt.descent = lastTrkpt->descent;//
//
// if(qAbs(delta) /*>=*/ASCENT_THRESHOLD)//
// {//
// if(delta > 0)//
// {//
// trkpt.ascent += /*(delta /
ASCENT_THRESHOLD)* ASCENT_THRESHOLD;*/
// }//
// else//
// {//
// trkpt.descent -= /*(delta /
ASCENT_THRESHOLD)* ASCENT_THRESHOLD;*/
// }//
// lastEle +=/*(delta / ASCENT_THRESHOLD)*
ASCENT_THRESHOLD;*/
// }//
// }/
Now ascent/descent is not modified by Douglas-Peuker filtering anymore.
Should I keep this for my branch or are you OK with the modified code
(then it means a PR from myself) ?
bye,
zero
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users