Rob Norris [Mon, 2 Jun 2014 21:35:44 +0000 (22:35 +0100)]
SF Features#95 - Part 2: TimeZone lookup based on an object's position.
For the 'World' time reference frame,
use the k-d tree method (http://en.wikipedia.org/wiki/Kd-tree) to quickly retreive
the nearest location to the given position.
Then get the timezone associted with that position to use for the time display.
Thus for example a track's time will be displayed in it's timezone rather than the user's current local time.
Rob Norris [Mon, 2 Jun 2014 21:39:05 +0000 (22:39 +0100)]
Create timezone lookup file derived from geonames.org
More specifically is it derived from:
http://download.geonames.org/export/dump/cities15000.zip
(using the script timezone-lookup-create.sh to extract only the fields needed by Viking)
This work is licensed under a Creative Commons Attribution 3.0 License.
Rob Norris [Mon, 2 Jun 2014 21:20:56 +0000 (22:20 +0100)]
Add kdtree C code version 0.5.6 from https://code.google.com/p/kdtree/
"kdtree is a simple, easy to use C library for working with kd-trees.
Kd-trees are an extension of binary search trees to k-dimensional data. They facilitate very fast searching, and nearest-neighbor queries.
This particular implementation is designed to be efficient and very easy to use. It is completely written in ANSI/ISO C, and thus completely cross-platform."
The 'Positional Local Time' setting will attempt to work out the timezone at the position of the point (or Track's center)
For the first stage of implementation a simple longitude to hours offset calculation is used (longitude/15).
This will become the fallback when the real lookup implementation is added.
Rob Norris [Sun, 11 May 2014 21:04:41 +0000 (22:04 +0100)]
Add and use preference in whether a name is requested when creating a new track or route.
The name can of course be changed after the track or route is created,
so now you are not forced to even think about naming it first if you don't want to.
Rob Norris [Tue, 27 May 2014 21:45:50 +0000 (22:45 +0100)]
SF Bugs#106: Fix incorrect location on opening .vik file saved in different locale.
Enable reading in of decimal values that may contain either '.' or ',' as the separator.
Need to use modified version of strtod() since the standard C library does not support reading in values from a different locale.
Ideally Viking shouldn't have saved these values into the file in a locale dependent manner,
but for a few values this is the case (ever since the first public release of Viking).
Thus to maintain backwards compatibility need to handle standard variations of the decimal separator.
Selected strtod() from the Sanos project for it's simplicity
(compared to 'David M. Gay' version: http://www.netlib.org/fp/dtoa.c - which may handle extremes of precision better - but such values aren't encountered in Viking)
Rob Norris [Thu, 24 Apr 2014 19:49:04 +0000 (20:49 +0100)]
SF Features#100: Allow 'easy' changing of the time of trackpoints & waypoints.
Add and use a dialog to get the time and date in the users timezone to allow setting the timestamp.
The dialog uses the calendar widget to get the date and spin boxes for the hours, minutes and seconds.
Rob Norris [Thu, 27 Mar 2014 01:44:35 +0000 (01:44 +0000)]
SF Features#91: Part 2. Show time axis grids on time graphs.
Similar to the y axis labelling, try to find most sensible time chunks for the divisions.
Offset all drawing in the Y axis by MARGIN_Y to create room for the x axis labels.
Rob Norris [Sun, 23 Feb 2014 20:09:29 +0000 (20:09 +0000)]
SF Bugs#105: Fix Display of Lines (Clipping) at High Zoom Levels.
Properly address clipping of x,y pixel values,
which can happen when points are far away from the viewport.
This typically happens when zoomed in very close e.g. <0.5 pixelfact,
but also when a point is *very* far away from other points in a normal track.
Matthew Hague [Tue, 4 Feb 2014 23:44:09 +0000 (23:44 +0000)]
Improve the Route Finder Tool
Changed route finder User Interface workings, it is now similar to the new route tool such that it shows the 'as the crow flys' direct line route,
but on creation of each new trackpoint the route from the last trackpoint is calculated using online services.
The user can switch between adding points with the new route tool or with the route finder tool, removed a lot of the vtk->route_finder fields and merged them with the new route fields instead, added code to ensure that double trackpoints get added at the joins between planned route segments.
Changed so that enforcing duplicates in viktrwlayer.c appending a track duplicates the end of the old track not the start of the new
Changed a bit of logic in route finder click to deal with a current empty route not created by the route finder
Like the current Create Track and Route tools, the Route Finder handles clicks when in pan mode and avoids extra dispay sync refreshing to avoid display flicker.
Update the UI during routing to show a busy cursor and info about the requests being made are shown in the statusbar (particularly in case the online requests are slow).
Matthew Hague [Wed, 5 Feb 2014 00:05:13 +0000 (00:05 +0000)]
Extend Routing functions for UI reuse.
Made vik_routing_default_find return whether find was successful or not, and exposed vik_routing_default_engine via vikrouting.h to allow the route planner to display the name of the engine it's using
Rob Norris [Wed, 1 Jan 2014 17:22:26 +0000 (17:22 +0000)]
Enable JPG files as a primary supported type.
The bonus of this besides being able to load via the File->Open method,
is being able to add image waypoints by drag and drop of JPG files into the viewport.