Alberto Mardegan [Wed, 10 Mar 2010 17:44:32 +0000 (19:44 +0200)]
Introduce type MapGeo for holding geocoordinates
Also, add wrappers to math functions so that we can easily switch back to using
doubles if necessary.
Some quick benchmarking:
double:
Mar 10 18:27:08 Nokia-N900-51-1 maemo-mapper[13749]: GLIB DEBUG default - map_path_calculate_distances: 110 ms for 8250 points
Mar 10 18:27:09 Nokia-N900-51-1 maemo-mapper[13749]: GLIB DEBUG default - map_path_calculate_distances: 5 ms for 430 points
Mar 10 18:28:02 Nokia-N900-51-1 maemo-mapper[13751]: GLIB DEBUG default - map_path_calculate_distances: 110 ms for 8250 points
Mar 10 18:28:02 Nokia-N900-51-1 maemo-mapper[13751]: GLIB DEBUG default - map_path_calculate_distances: 5 ms for 430 points
Mar 10 18:28:45 Nokia-N900-51-1 maemo-mapper[13753]: GLIB DEBUG default - map_path_calculate_distances: 109 ms for 8250 points
Mar 10 18:28:45 Nokia-N900-51-1 maemo-mapper[13753]: GLIB DEBUG default - map_path_calculate_distances: 5 ms for 430 points
float:
Mar 10 19:13:58 Nokia-N900-51-1 maemo-mapper[13856]: GLIB DEBUG default - map_path_calculate_distances: 60 ms for 8250 points
Mar 10 19:13:58 Nokia-N900-51-1 maemo-mapper[13856]: GLIB DEBUG default - map_path_calculate_distances: 3 ms for 430 points
Mar 10 19:15:40 Nokia-N900-51-1 maemo-mapper[13858]: GLIB DEBUG default - map_path_calculate_distances: 60 ms for 8250 points
Mar 10 19:15:40 Nokia-N900-51-1 maemo-mapper[13858]: GLIB DEBUG default - map_path_calculate_distances: 3 ms for 430 points
FAST MODE:
float:
Mar 10 19:26:46 Nokia-N900-51-1 maemo-mapper[13915]: GLIB DEBUG default - map_path_calculate_distances: 50 ms for 8250 points
Mar 10 19:26:46 Nokia-N900-51-1 maemo-mapper[13915]: GLIB DEBUG default - map_path_calculate_distances: 2 ms for 430 points
Mar 10 19:26:46 Nokia-N900-51-1 maemo-mapper[13915]: GLIB DEBUG default - map_path_calculate_distances: 50 ms for 8250 points
Mar 10 19:26:46 Nokia-N900-51-1 maemo-mapper[13915]: GLIB DEBUG default - map_path_calculate_distances: 2 ms for 430 points
Alberto Mardegan [Wed, 10 Mar 2010 17:43:48 +0000 (19:43 +0200)]
Enable fast FPU mode
map_set_fast_mode(TRUE) enables fast FPU mode. Code copied from
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/raw/master/src/main.c
Alberto Mardegan [Wed, 10 Mar 2010 16:25:22 +0000 (18:25 +0200)]
Add distance information into the paths
For each point, store the distance from the previous one.
In the path, store the total length of the path and the latitude and longitude
of the last point.
Rewrite the conditions for adding the point to the track in a more readable
way.
The same function can also add a break, if the GPS position can not be
retrieved.
Alberto Mardegan [Sun, 28 Feb 2010 15:33:00 +0000 (17:33 +0200)]
Add info panel to MapScreen
The panel is meant to whos informations about the track and the route. It
currently shows only the next waypoint.
The panel redraw is triggered by the map_screen_refresh_panel() function.
Alberto Mardegan [Sun, 28 Feb 2010 15:23:10 +0000 (17:23 +0200)]
Remove check on autorouting, when getting next waypoint
It's unclear to me why the presence of the autoroute would alter the finding of
the next waypoint. Besides, this code was leading to find the wrong waypoint
when the autorouting happened because of being late to a waypoint.
Alberto Mardegan [Sun, 28 Feb 2010 14:10:14 +0000 (16:10 +0200)]
Factor out the calculation of the distance into a new function
Split route_show_distance_to() into one function which calculates the distance,
and one which simply shows it.
while at it, change the distance type to gfloat.
Max Lapan [Sun, 14 Feb 2010 12:49:04 +0000 (15:49 +0300)]
Yandex coordinate system support.
This patch adds support of Yandex.Maps coordinate system to mapper. This CS is incompatible with
Google, as it supposes Earth has a ellipsoid shape (Google CS is sperical).
To implement this, we add two routines to perform latlon <-> units transformation to TileSourceType
structure and call apropopriate routine from latlon2unit/unit2latlon macroses.
Max Lapan [Thu, 25 Feb 2010 12:37:59 +0000 (15:37 +0300)]
Router API to save plugin settings.
Two routines, one to load plugin settings, one to save. They are called when we
load and save main applications settings, so, to be properly initialized, plugin
must be registered on controller creation.
Max Lapan [Wed, 24 Feb 2010 12:54:15 +0000 (15:54 +0300)]
Move visible field out of TileSource.
It wasn't a smart ide to put visible attribute inside TileSource structure,
because we can easily have one TileSource added to several repsitories which can
have different visiblity state.
This patch fixes that, by moving visible from TileSource to new structure which
represents link between TileSource and Repository.
Max Lapan [Thu, 18 Feb 2010 12:52:25 +0000 (15:52 +0300)]
Don't show delete button for new repository.
If we create new repository, don't show delete button (because it's nothing to
delete so far). We also move repository_edit_dialog from exported routines.
Max Lapan [Thu, 18 Feb 2010 12:29:23 +0000 (15:29 +0300)]
Change Repository list dialog behaviour.
Remove 'Edit' and 'Delete' buttons from repository list dialog. Open repository
edit dialog when repository clicked in selector. Delete button moved to
repository properties dialog.