> Gesendet: Dienstag, 24. März 2015 um 02:17 Uhr
> Von: "Robert Norris" <rw_nor...@hotmail.com>
> An: "viking devel" <viking-devel@lists.sourceforge.net>
> Betreff: Re: [Viking-devel] [PATCH] Interpolate Timestamps between first and 
> last TP
>
> In your  vik_track_interpolate_times() function it currently, changes *almost 
> all* timestamps (except the beginning and end trackpoints) - even if they had 
> an existing timestamps. 
>  
> I wonder if only setting timestamps on trackpoints with missing 
> timestamps is more desire-able (i.e. less likely to change an existing 
> 'good' track accidentally - especially since Viking doesn't have an undo
>  function yet).
> 
> If necessary a force overwrite existing timestamps version could be offered.
> 
> Since it sets the timestamp it should set the has_timestamp boolean to TRUE 
> for completeness on each trackpoint.

True, has_timestamp needs to be set.

Personally I absolutely need the version that overwrites *allmost all* 
timestamps.  But this behavior could also be emulated by using (1) a function 
that removes all timestamps on a track first (might be there already!?), 
followed by (2) setting those timestamps for first and last trackpoint manually 
and then followed by (3) using the function you suggest, i.e. one that only 
works on trackpoints that satisfy has_stimestamp == FALSE condition.

Using third party software for instance you will get discontinuous timestamps, 
depending on its configuration. E.g. if you reuse osm ways out of their 
database and convert+save them to a gpx track, the trackpoints will have 
timestamps corresponding to the last modification time of the nodes - these may 
be continuous, but most of the time are not, because of the 'random' nature of 
data edits done to these nodes in osm.

It probably will be most useful to
(A) implement a minimal-invasive interpolate_timstamps function (one that does 
not change existing timestamps)
(B) implement a function to delete timestamps of all TP of a track (if not 
there already, i.e. set has_timestamp to FALSE for each trackpoint)
(C) implement a convenience function that automates (1), (2) and (3) described 
above (e.g. by saving timestamps of first and last trackpoint, then calling 
(B), restoring first and last, then calling (A))

(A) is a 'preserve existing timestamps version'
(C) is essentially what you called 'force overwrite existing timestamps version'


In consequence other functions dealing with all trackpoints of the track might 
need to be revamped as well. Saying, if there is a "minimal-invasive" and 
"overwrite-all" version for one feature it should be in place for all similar 
features as well.
For instance "fetch missing elevation data" should then be offered as
 "for trackpoints lacking ele data only" and
 "force overwrite existing ele data"
versions as well.


Greetings,
Christian

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to