You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: <pg...@us...> - 2015-08-01 17:01:31
|
Revision: 2924 http://sourceforge.net/p/roadmap/code/2924 Author: pgf Date: 2015-08-01 17:01:29 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_trip: oops. null route names are permissible when sorting Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:26 UTC (rev 2923) +++ trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:29 UTC (rev 2924) @@ -2967,7 +2967,13 @@ static int alpha_routename_cmp( RoadMapListItem *a, RoadMapListItem *b) { - return strcasecmp(((route_head *)a)->rte_name, ((route_head *)b)->rte_name); + char *n1, *n2; + // deal with null names. + n1 = ((route_head *)a)->rte_name; + n2 = ((route_head *)b)->rte_name; + if (!n1) n1 = ""; + if (!n2) n2 = ""; + return strcasecmp(n1, n2); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:28
|
Revision: 2923 http://sourceforge.net/p/roadmap/code/2923 Author: pgf Date: 2015-08-01 17:01:26 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_dialog: reenable the default button code the default button will always be the last button added. reorder the button adds in the Find sub-dialogs so that "Okay" is the default, rather than Cancel. Modified Paths: -------------- trunk/roadmap/src/gtk2/roadmap_dialog.c trunk/roadmap/src/roadmap_address.c trunk/roadmap/src/roadmap_coord.c trunk/roadmap/src/roadmap_crossing.c Modified: trunk/roadmap/src/gtk2/roadmap_dialog.c =================================================================== --- trunk/roadmap/src/gtk2/roadmap_dialog.c 2015-08-01 17:01:23 UTC (rev 2922) +++ trunk/roadmap/src/gtk2/roadmap_dialog.c 2015-08-01 17:01:26 UTC (rev 2923) @@ -644,8 +644,12 @@ g_signal_connect (button, "clicked", (GCallback) roadmap_dialog_action, child); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog->w)->action_area), button, TRUE, FALSE, 0); + + gtk_widget_grab_default (button); } /** Modified: trunk/roadmap/src/roadmap_address.c =================================================================== --- trunk/roadmap/src/roadmap_address.c 2015-08-01 17:01:23 UTC (rev 2922) +++ trunk/roadmap/src/roadmap_address.c 2015-08-01 17:01:26 UTC (rev 2923) @@ -282,8 +282,8 @@ roadmap_dialog_add_button ("Back", roadmap_address_before); roadmap_dialog_add_button ("Next", roadmap_address_after); + roadmap_dialog_add_button ("Cancel", roadmap_address_cancel); roadmap_dialog_add_button ("OK", roadmap_address_ok); - roadmap_dialog_add_button ("Cancel", roadmap_address_cancel); roadmap_dialog_complete (roadmap_preferences_use_keyboard()); Modified: trunk/roadmap/src/roadmap_coord.c =================================================================== --- trunk/roadmap/src/roadmap_coord.c 2015-08-01 17:01:23 UTC (rev 2922) +++ trunk/roadmap/src/roadmap_coord.c 2015-08-01 17:01:26 UTC (rev 2923) @@ -284,8 +284,8 @@ roadmap_dialog_add_button ("Back", roadmap_coord_before); roadmap_dialog_add_button ("Next", roadmap_coord_after); + roadmap_dialog_add_button ("Cancel", roadmap_coord_cancel); roadmap_dialog_add_button ("OK", roadmap_coord_ok); - roadmap_dialog_add_button ("Cancel", roadmap_coord_cancel); roadmap_dialog_complete (roadmap_preferences_use_keyboard()); Modified: trunk/roadmap/src/roadmap_crossing.c =================================================================== --- trunk/roadmap/src/roadmap_crossing.c 2015-08-01 17:01:23 UTC (rev 2922) +++ trunk/roadmap/src/roadmap_crossing.c 2015-08-01 17:01:26 UTC (rev 2923) @@ -255,8 +255,8 @@ roadmap_dialog_add_button ("Back", roadmap_crossing_before); roadmap_dialog_add_button ("Next", roadmap_crossing_after); + roadmap_dialog_add_button ("Cancel", roadmap_crossing_cancel); roadmap_dialog_add_button ("OK", roadmap_crossing_ok); - roadmap_dialog_add_button ("Cancel", roadmap_crossing_cancel); roadmap_dialog_complete (roadmap_preferences_use_keyboard()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:25
|
Revision: 2922 http://sourceforge.net/p/roadmap/code/2922 Author: pgf Date: 2015-08-01 17:01:23 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_trip: ifdef more NAVIGATE_PLUGIN stuff Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c trunk/roadmap/src/roadmap_trip.h Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:20 UTC (rev 2921) +++ trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:23 UTC (rev 2922) @@ -270,7 +270,7 @@ * @brief * @param modified */ -void roadmap_trip_set_modified(int modified) +static void roadmap_trip_set_modified(int modified) { RoadMapTripModified = modified; } @@ -343,7 +343,7 @@ /** * @brief */ -void roadmap_trip_unset_route_focii (void) +static void roadmap_trip_unset_route_focii (void) { /* waypoints */ RoadMapTripDest = NULL; @@ -1087,6 +1087,7 @@ return 1; } +#ifdef HAVE_NAVIGATE_PLUGIN /** * @brief function called from roadmap_trip_waypoint_select_navigation_waypoint * and roadmap_trip_waypoint_manage_dialog_worker @@ -1096,7 +1097,7 @@ */ static void roadmap_trip_set_nav_departure (const char *name, void *data) { - roadmap_log (ROADMAP_DEBUG, "roadmap_trip_departure_waypoint"); + roadmap_log (ROADMAP_DEBUG, "roadmap_trip_set_nav_departure"); roadmap_trip_set_point ("Departure", &RoadMapTripSelectedPlace->wpt->pos); roadmap_dialog_hide (name); @@ -1112,12 +1113,13 @@ */ static void roadmap_trip_set_nav_destination (const char *name, void *data) { - roadmap_log (ROADMAP_DEBUG, "roadmap_trip_destination_waypoint"); + roadmap_log (ROADMAP_DEBUG, "roadmap_trip_set_nav_destination"); roadmap_trip_set_point ("Destination", &RoadMapTripSelectedPlace->wpt->pos); roadmap_dialog_hide (name); roadmap_screen_refresh (); } +#endif // HAVE_NAVIGATE_PLUGIN /** * @brief function to manage the Trip waypoint dialog @@ -1166,10 +1168,12 @@ ("Edit", roadmap_trip_waypoint_manage_dialog_edit); roadmap_dialog_add_button ("Done", roadmap_trip_dialog_cancel); +#ifdef HAVE_NAVIGATE_PLUGIN roadmap_dialog_add_button ("Destination", roadmap_trip_set_nav_destination); roadmap_dialog_add_button ("Departure", roadmap_trip_set_nav_departure); +#endif // HAVE_NAVIGATE_PLUGIN roadmap_dialog_new_hidden ("Names", ".which"); @@ -4031,7 +4035,7 @@ } return NULL; } -#endif +#endif // HAVE_NAVIGATE_PLUGIN /** * @brief indicate that refresh is needed @@ -4090,12 +4094,14 @@ roadmap_dialog_add_button ("Show", roadmap_trip_dialog_cancel); +#ifdef HAVE_NAVIGATE_PLUGIN if (destination) roadmap_dialog_add_button ("Destination", roadmap_trip_set_nav_destination); else roadmap_dialog_add_button ("Departure", roadmap_trip_set_nav_departure); +#endif // HAVE_NAVIGATE_PLUGIN roadmap_dialog_new_hidden ("Names", ".which"); @@ -4105,6 +4111,7 @@ roadmap_trip_waypoint_manage_dialog_populate (which); } +#ifdef HAVE_NAVIGATE_PLUGIN /** * @brief Pop up a dialog to select a departure from the list of Personal waypoints * Calls the (static) worker function roadmap_trip_waypoint_select_navigation_waypoint @@ -4124,6 +4131,7 @@ { roadmap_trip_waypoint_select_navigation_waypoint(PERSONAL_WAYPOINTS, 1); } +#endif // HAVE_NAVIGATE_PLUGIN #endif /** Modified: trunk/roadmap/src/roadmap_trip.h =================================================================== --- trunk/roadmap/src/roadmap_trip.h 2015-08-01 17:01:20 UTC (rev 2921) +++ trunk/roadmap/src/roadmap_trip.h 2015-08-01 17:01:23 UTC (rev 2922) @@ -131,17 +131,13 @@ void roadmap_trip_replace_with_google_route(void); #endif +#ifdef HAVE_NAVIGATE_PLUGIN void roadmap_trip_set_selection_as (const char *name); -#ifdef HAVE_NAVIGATE_PLUGIN void roadmap_trip_set_selection (int lon, int lat); -#endif -void roadmap_trip_enable (int status); void roadmap_trip_refresh (void); void roadmap_trip_refresh_needed(void); -void roadmap_trip_set_modified(int modified); -void roadmap_trip_unset_route_focii (void); /* Add Waypoint dialog */ #define TRIP_PLACE_PERSONAL_MARK 0 @@ -154,9 +150,9 @@ #define TRIP_NUM_PLACEMENTS 3 #define TRIP_NUM_ROUTE_PLACEMENTS 6 - void roadmap_trip_departure_waypoint(void); void roadmap_trip_destination_waypoint(void); +RoadMapPosition *roadmap_trip_get_position (const char *name); +#endif // HAVE_NAVIGATE_PLUGIN -RoadMapPosition *roadmap_trip_get_position (const char *name); #endif // INCLUDE__ROADMAP_TRIP__H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:22
|
Revision: 2921 http://sourceforge.net/p/roadmap/code/2921 Author: pgf Date: 2015-08-01 17:01:20 +0000 (Sat, 01 Aug 2015) Log Message: ----------- gtk2/roadmap_main: double the timeout for OLPC special key handling Modified Paths: -------------- trunk/roadmap/src/gtk2/roadmap_main.c Modified: trunk/roadmap/src/gtk2/roadmap_main.c =================================================================== --- trunk/roadmap/src/gtk2/roadmap_main.c 2015-08-01 17:01:17 UTC (rev 2920) +++ trunk/roadmap/src/gtk2/roadmap_main.c 2015-08-01 17:01:20 UTC (rev 2921) @@ -206,7 +206,7 @@ /* first arrow key down starts the timer */ if (!arrows_down) { first_key = key; - roadmap_main_set_periodic (100, arrow_keys_timeout); + roadmap_main_set_periodic (200, arrow_keys_timeout); arrows_down = 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:19
|
Revision: 2920 http://sourceforge.net/p/roadmap/code/2920 Author: pgf Date: 2015-08-01 17:01:17 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_trip: fix azymuth to destination Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:14 UTC (rev 2919) +++ trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:17 UTC (rev 2920) @@ -2215,14 +2215,11 @@ { int angle; - if (!RoadMapRouteInProgress || RoadMapCurrentRoute == NULL || !RoadMapTripGps->has_value) { + if (!RoadMapRouteInProgress || RoadMapCurrentRoute == NULL || + !RoadMapTripGps->has_value) { return -1; } - if (RoadMapTripNext == RoadMapTripDest) { - return -1; - } - angle = roadmap_math_azymuth (&RoadMapTripGps->map, &RoadMapTripNext->pos); angle -= RoadMapTripGps->gps.steering + roadmap_math_get_orientation(); @@ -2244,19 +2241,17 @@ waypoint *tmp; int angle; - if (! RoadMapRouteInProgress || RoadMapCurrentRoute == NULL || !RoadMapTripGps->has_value) { + if (! RoadMapRouteInProgress || RoadMapCurrentRoute == NULL || + !RoadMapTripGps->has_value) { return -1; } if (RoadMapTripNext == RoadMapTripDest) { - return -1; + tmp = RoadMapTripNext; + } else { + tmp = roadmap_trip_next(RoadMapTripNext); } - tmp = roadmap_trip_next(RoadMapTripNext); - if (tmp == RoadMapTripDest) { - return -1; - } - angle = roadmap_math_azymuth (&RoadMapTripGps->map, &tmp->pos); angle -= RoadMapTripGps->gps.steering + roadmap_math_get_orientation(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:17
|
Revision: 2919 http://sourceforge.net/p/roadmap/code/2919 Author: pgf Date: 2015-08-01 17:01:14 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_trip: fine-tune the distance annoncements round the distance-to-next distance down to the nearest 10 feet or meters. bump the "fast" distance announcement threshold, so it's used at slightly higher speeds. change closest distance threshold in the fast table from .2mi/km to .3mi/km. the fast/slow speed cutoff, and indeed, the two threshold tables themselves, should probably be configurable. Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:11 UTC (rev 2918) +++ trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:14 UTC (rev 2919) @@ -2358,7 +2358,7 @@ /* the thresholds represent either miles or kilometers. */ double slow_thresh[] = { - .05, .12, .22, + .05, .12, .52, 1.05, 2.05, 5.05, 10.05, 20.05, 50.05, 100.05, 200.05, @@ -2366,9 +2366,11 @@ }; /* as above, but we leave out some thresholds because they'll come - * too fast at a higher speed */ + * too fast at a higher speed, and the closes threshold is set to + * .3 rather than .2, because .2km is too close when moving fast. + */ double fast_thresh[] = { - .22, + .32, 1.05, 2.05, 5.05, 10.05, 20.05, 50.05, 100.05, 200.05, @@ -2378,7 +2380,7 @@ u = roadmap_math_to_trip_units (1); // 5280 feet, or 1000 meters low = 0.; - if (roadmap_trip_get_speed() > 30) /* knots */ + if (roadmap_trip_get_speed() > 35) /* knots */ threshp = fast_thresh; else threshp = slow_thresh; @@ -2465,7 +2467,7 @@ lastgpsmap = gps->map; distance_to_destination = roadmap_math_distance (&gps->map, &RoadMapTripDest->pos); - roadmap_math_trip_set_distance('D', distance_to_destination); + roadmap_math_trip_set_distance('D', ((distance_to_destination / 10) * 10)); roadmap_log (ROADMAP_DEBUG, "GPS: distance to destination = %d %s", distance_to_destination, roadmap_math_distance_unit ()); @@ -2585,7 +2587,7 @@ 0, RoadMapTripNext); } - roadmap_math_trip_set_distance ('W', distance_to_next); + roadmap_math_trip_set_distance ('W', ((distance_to_next / 10) * 10)); } @@ -2616,7 +2618,7 @@ say_within = 0; } else { time_t now = time(NULL); - if (waypoint_changed || (now - said_time > 10)) { + if (waypoint_changed || (now - said_time > 8)) { roadmap_voice_announce ("Waypoint", 1); said_time = now; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:14
|
Revision: 2918 http://sourceforge.net/p/roadmap/code/2918 Author: pgf Date: 2015-08-01 17:01:11 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_voice: say "K" rather than "kilometers", for brevity Modified Paths: -------------- trunk/roadmap/src/roadmap_voice.c Modified: trunk/roadmap/src/roadmap_voice.c =================================================================== --- trunk/roadmap/src/roadmap_voice.c 2015-08-01 17:01:09 UTC (rev 2917) +++ trunk/roadmap/src/roadmap_voice.c 2015-08-01 17:01:11 UTC (rev 2918) @@ -162,7 +162,7 @@ {" 1 ft", " 1 foot"}, {" 1 m", " 1 meter"}, - {"Km", "kilometers"}, + {"Km", "K"}, {"Mi", "miles"}, {"ft", "feet"}, {"m", "meters"}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:11
|
Revision: 2917 http://sourceforge.net/p/roadmap/code/2917 Author: pgf Date: 2015-08-01 17:01:09 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_math: adjust how we say miles/kilometers vs feet/meters we don't want to switch to feet until under a tenth of a mile. but we should switch to meters at 500m and below. (in my opinion) Modified Paths: -------------- trunk/roadmap/src/roadmap_math.c trunk/roadmap/src/roadmap_math.h Modified: trunk/roadmap/src/roadmap_math.c =================================================================== --- trunk/roadmap/src/roadmap_math.c 2015-08-01 17:01:05 UTC (rev 2916) +++ trunk/roadmap/src/roadmap_math.c 2015-08-01 17:01:09 UTC (rev 2917) @@ -48,8 +48,8 @@ #include "roadmap_trigonometry.h" -#define ROADMAP_BASE_IMPERIAL 0 -#define ROADMAP_BASE_METRIC 1 +#define ROADMAP_SYSTEM_IMPERIAL 0 +#define ROADMAP_SYSTEM_METRIC 1 #define MIN_ZOOM_IN 2 #define MAX_ZOOM_OUT 0x10000 @@ -67,6 +67,7 @@ typedef struct { + int id; double unit_per_latitude; double unit_per_longitude; double speed_per_knot; @@ -82,6 +83,7 @@ static RoadMapUnits RoadMapMetricSystem = { + ROADMAP_SYSTEM_METRIC, 0.11112, /* Meters per latitude. */ 0.0, /* Meters per longitude (dynamic). */ 1.852, /* Kmh per knot. */ @@ -94,6 +96,7 @@ static RoadMapUnits RoadMapImperialSystem = { + ROADMAP_SYSTEM_IMPERIAL, 0.36464, /* Feet per latitude. */ 0.0, /* Feet per longitude (dynamic). */ 1.151, /* Mph per knot. */ @@ -1600,6 +1603,11 @@ } +int roadmap_math_units_system() { + + return RoadMapContext->units->id; +} + char *roadmap_math_distance_unit (void) { return RoadMapContext->units->length; @@ -1643,23 +1651,25 @@ */ void roadmap_math_trip_set_distance(char which, int distance) { - int distance_far; + int tenths; + int system = roadmap_math_units_system(); - distance_far = roadmap_math_to_trip_distance_tenths (distance); + tenths = roadmap_math_to_trip_distance_tenths (distance); - if (distance_far > 0) { - if (distance_far % 10 == 0) { // "2.0 miles" + if ((system == ROADMAP_SYSTEM_IMPERIAL && tenths > 0) || // say ".1 miles" + (system == ROADMAP_SYSTEM_METRIC && tenths > 5)) { // say "500 meters" + if (tenths % 10 == 0) { // "2.0 miles" roadmap_message_set (which, "%d %s", // 'x', 'y', 'Y', 'D', 'W' - distance_far/10, + tenths/10, roadmap_math_trip_unit ()); - } else if (distance_far / 10 == 0) { // "0.2 miles" + } else if (tenths / 10 == 0) { // "0.2 miles" roadmap_message_set (which, ".%d %s", // 'x', 'y', 'Y', 'D', 'W' - distance_far%10, + tenths%10, roadmap_math_trip_unit ()); } else { roadmap_message_set (which, "%d.%d %s", // 'x', 'y', 'Y', 'D', 'W' - distance_far/10, - distance_far%10, + tenths/10, + tenths%10, roadmap_math_trip_unit ()); } } else { Modified: trunk/roadmap/src/roadmap_math.h =================================================================== --- trunk/roadmap/src/roadmap_math.h 2015-08-01 17:01:05 UTC (rev 2916) +++ trunk/roadmap/src/roadmap_math.h 2015-08-01 17:01:09 UTC (rev 2917) @@ -112,6 +112,7 @@ (const RoadMapGuiPoint *point1, const RoadMapGuiPoint *point2, int squared); +int roadmap_math_units_system(void); char *roadmap_math_distance_unit (void); char *roadmap_math_trip_unit (void); char *roadmap_math_speed_unit (void); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-08-01 17:01:08
|
Revision: 2916 http://sourceforge.net/p/roadmap/code/2916 Author: pgf Date: 2015-08-01 17:01:05 +0000 (Sat, 01 Aug 2015) Log Message: ----------- roadmap_start/trip: add a "movegps" command for debugging Modified Paths: -------------- trunk/roadmap/src/roadmap_start.c trunk/roadmap/src/roadmap_trip.c trunk/roadmap/src/roadmap_trip.h Modified: trunk/roadmap/src/roadmap_start.c =================================================================== --- trunk/roadmap/src/roadmap_start.c 2015-07-31 15:12:47 UTC (rev 2915) +++ trunk/roadmap/src/roadmap_start.c 2015-08-01 17:01:05 UTC (rev 2916) @@ -366,10 +366,16 @@ roadmap_messagebox_wait ("Map Parameters", map_info); } +static void roadmap_start_move_gps_selected (void) +{ + roadmap_trip_move_gps (); + roadmap_screen_refresh(); +} + static void roadmap_start_create_waypoint (void) { #ifdef HAVE_TRIP_PLUGIN - roadmap_trip_create_selection_waypoint (); /* trip_create_selection_waypoint (); */ + roadmap_trip_create_selection_waypoint (); #else roadmap_trip_create_selection_waypoint (); #endif @@ -379,7 +385,7 @@ static void roadmap_start_create_gps_waypoint (void) { #ifdef HAVE_TRIP_PLUGIN - roadmap_trip_create_gps_waypoint (); /* trip_create_gps_waypoint (); */ + roadmap_trip_create_gps_waypoint (); #else roadmap_trip_create_gps_waypoint (); #endif @@ -849,6 +855,10 @@ "Create new place using last selected street or place", NULL, roadmap_start_create_waypoint}, + {"movegps", "Move GPS to selected...", NULL, NULL, + "For debugging, move the GPS location to selection", NULL, + roadmap_start_move_gps_selected}, + {"editroutepoints", "Route Waypoints...", NULL, NULL, "Edit current route's waypoints", NULL, roadmap_trip_route_waypoint_manage_dialog }, Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-31 15:12:47 UTC (rev 2915) +++ trunk/roadmap/src/roadmap_trip.c 2015-08-01 17:01:05 UTC (rev 2916) @@ -1777,6 +1777,23 @@ roadmap_screen_refresh (); } +void roadmap_trip_move_gps (void) { + + RoadMapGpsPosition gps_position; + + if (RoadMapTripLastSetPoint == NULL || + !RoadMapTripLastSetPoint->has_value) { + return; + } + gps_position.longitude = RoadMapTripLastSetPoint->map.longitude; + gps_position.latitude = RoadMapTripLastSetPoint->map.latitude; + gps_position.altitude = 0; /* current units */ + gps_position.speed = 0; /* knots */ + gps_position.steering = 0; /* degrees */ + + roadmap_trip_set_gps (time(NULL), &gps_position); +} + void roadmap_trip_create_selection_waypoint (void) { const char *name; Modified: trunk/roadmap/src/roadmap_trip.h =================================================================== --- trunk/roadmap/src/roadmap_trip.h 2015-07-31 15:12:47 UTC (rev 2915) +++ trunk/roadmap/src/roadmap_trip.h 2015-08-01 17:01:05 UTC (rev 2916) @@ -33,6 +33,7 @@ void roadmap_trip_set_point (const char *name, RoadMapPosition *position); void roadmap_trip_add_waypoint (const char *name, RoadMapPosition *position, int where); +void roadmap_trip_move_gps (void); void roadmap_trip_create_selection_waypoint(void); void roadmap_trip_create_gps_waypoint(void); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-31 15:12:50
|
Revision: 2915 http://sourceforge.net/p/roadmap/code/2915 Author: pgf Date: 2015-07-31 15:12:47 +0000 (Fri, 31 Jul 2015) Log Message: ----------- roadmap_trip: reimplement waypoint distance thresholds we need different threshold levels for fast and slow driving speeds, so rather than calculate the thresholds, we use lists. Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c trunk/roadmap/src/roadmap_trip.h Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-13 16:57:16 UTC (rev 2914) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-31 15:12:47 UTC (rev 2915) @@ -1928,6 +1928,16 @@ return 0; } +/* returns most recent speed, in knots */ +int roadmap_trip_get_speed (void) { + + if (RoadMapTripFocus != NULL) { + return RoadMapTripFocus->gps.speed; + } + + return 0; +} + /** * @brief * @return @@ -2307,44 +2317,62 @@ static void roadmap_trip_new_threshold(int distance, int *lesserp, int *greaterp) { - int i; - double u, delta; + double u; int low, high; - double threshmul[] = { 2., 2.5, 2. }; + double *threshp; /* we want distance reports at - * 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1, [.5], .2 - * the multipliers to get between these values are 2.5, 2, and 2. - * also, when approaching a waypoint, we want to announce that - * we're nearing it _on_ these mileages, not just past them. i.e., - * if the threshold is 2 miles, we don't want to cross the threshold - * and then announce "in 1.9 miles". so we add a delta or 5% to - * all the threshold values + * 1000km or mi, 500km or mi, 200, 100, 50, 20, 10, 5, 2, 1, .5, + * .2, .1, .05km or mi. the last one corresponds to is 50m or 264 + * feet. when approaching a waypoint, we want to announce + * that we're nearing it _on_ these mileages, not just past them. + * i.e., if the threshold is 2 miles, we don't want to cross the + * threshold and then announce "in 1.9 miles". so we add a small + * delta % to all the threshold values * - * .5 is an exception: because announcements at all of 1.0, .5, - * and .2 are too many, we check .2 by itself, then start looping - * for 1.0 and above. + * at higher speeds, the very small thresholds are too close + * together, so we skip some of them, but using a different threshold + * list for high and low speeds. * * think of high and low as the upper and lower edges of a * distance band. we're trying to place our current distance into * one of those bands. */ + + /* the thresholds represent either miles or kilometers. */ + double slow_thresh[] = { + .05, .12, .22, + .52, 1.05, 2.05, + 5.05, 10.05, 20.05, + 50.05, 100.05, 200.05, + 500.05, 1000.05, 0 + }; + /* as above, but we leave out some thresholds because they'll come + * too fast at a higher speed */ + double fast_thresh[] = { + .22, + 1.05, 2.05, + 5.05, 10.05, 20.05, + 50.05, 100.05, 200.05, + 500.05, 1000.05, 0 + }; + u = roadmap_math_to_trip_units (1); // 5280 feet, or 1000 meters - delta = u * .05; - high = (u * 0.2 ) + delta; // start at .2 mile or .2 km - if (high > distance) { // current distance is less than .2+delta - low = 0; - } else { // current distance is more than .2+delta + low = 0.; + if (roadmap_trip_get_speed() > 30) /* knots */ + threshp = fast_thresh; + else + threshp = slow_thresh; + + while (1) { + high = *threshp * u; + if (high > distance) + break; + if (*++threshp == 0.0) + break; low = high; - high = ((u * 1.0)) + delta; // first band to check is .2 to 1.0 - for (i = 0; i < 10; i ++) { - if (high > distance) - break; - low = high; - high = ((high - delta) * threshmul[i % 3]) + delta; - } } *lesserp = low; Modified: trunk/roadmap/src/roadmap_trip.h =================================================================== --- trunk/roadmap/src/roadmap_trip.h 2015-07-13 16:57:16 UTC (rev 2914) +++ trunk/roadmap/src/roadmap_trip.h 2015-07-31 15:12:47 UTC (rev 2915) @@ -57,6 +57,7 @@ int roadmap_trip_is_refresh_needed (void); int roadmap_trip_get_orientation (void); +int roadmap_trip_get_speed (void); const char *roadmap_trip_get_focus_name (void); const RoadMapPosition *roadmap_trip_get_focus_position (void); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-16 14:32:52
|
Revision: 2919 http://sourceforge.net/p/roadmap/code/2919 Author: pgf Date: 2015-07-16 14:32:49 +0000 (Thu, 16 Jul 2015) Log Message: ----------- roadmap_trip: round distance-to-next down to nearest 10 feet or meters Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-16 14:32:46 UTC (rev 2918) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-16 14:32:49 UTC (rev 2919) @@ -2358,7 +2358,7 @@ /* the thresholds represent either miles or kilometers. */ double slow_thresh[] = { - .05, .12, .22, + .05, .12, .52, 1.05, 2.05, 5.05, 10.05, 20.05, 50.05, 100.05, 200.05, @@ -2465,7 +2465,7 @@ lastgpsmap = gps->map; distance_to_destination = roadmap_math_distance (&gps->map, &RoadMapTripDest->pos); - roadmap_math_trip_set_distance('D', distance_to_destination); + roadmap_math_trip_set_distance('D', ((distance_to_destination / 10) * 10)); roadmap_log (ROADMAP_DEBUG, "GPS: distance to destination = %d %s", distance_to_destination, roadmap_math_distance_unit ()); @@ -2585,7 +2585,7 @@ 0, RoadMapTripNext); } - roadmap_math_trip_set_distance ('W', distance_to_next); + roadmap_math_trip_set_distance ('W', ((distance_to_next / 10) * 10)); } @@ -2616,7 +2616,7 @@ say_within = 0; } else { time_t now = time(NULL); - if (waypoint_changed || (now - said_time > 10)) { + if (waypoint_changed || (now - said_time > 8)) { roadmap_voice_announce ("Waypoint", 1); said_time = now; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-16 14:32:49
|
Revision: 2918 http://sourceforge.net/p/roadmap/code/2918 Author: pgf Date: 2015-07-16 14:32:46 +0000 (Thu, 16 Jul 2015) Log Message: ----------- roadmap_voice: say "K" rather than "kilometers", for brevity Modified Paths: -------------- trunk/roadmap/src/roadmap_voice.c Modified: trunk/roadmap/src/roadmap_voice.c =================================================================== --- trunk/roadmap/src/roadmap_voice.c 2015-07-16 14:32:43 UTC (rev 2917) +++ trunk/roadmap/src/roadmap_voice.c 2015-07-16 14:32:46 UTC (rev 2918) @@ -162,7 +162,7 @@ {" 1 ft", " 1 foot"}, {" 1 m", " 1 meter"}, - {"Km", "kilometers"}, + {"Km", "K"}, {"Mi", "miles"}, {"ft", "feet"}, {"m", "meters"}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-16 14:32:46
|
Revision: 2917 http://sourceforge.net/p/roadmap/code/2917 Author: pgf Date: 2015-07-16 14:32:43 +0000 (Thu, 16 Jul 2015) Log Message: ----------- roadmap_math: adjust how we say miles/kilometers vs feet/meters we don't want to switch to feet until under a tenth of a mile. but we should switch to meters at 500m and below. (in my opinion) Modified Paths: -------------- trunk/roadmap/src/roadmap_math.c trunk/roadmap/src/roadmap_math.h Modified: trunk/roadmap/src/roadmap_math.c =================================================================== --- trunk/roadmap/src/roadmap_math.c 2015-07-16 14:32:40 UTC (rev 2916) +++ trunk/roadmap/src/roadmap_math.c 2015-07-16 14:32:43 UTC (rev 2917) @@ -48,8 +48,8 @@ #include "roadmap_trigonometry.h" -#define ROADMAP_BASE_IMPERIAL 0 -#define ROADMAP_BASE_METRIC 1 +#define ROADMAP_SYSTEM_IMPERIAL 0 +#define ROADMAP_SYSTEM_METRIC 1 #define MIN_ZOOM_IN 2 #define MAX_ZOOM_OUT 0x10000 @@ -67,6 +67,7 @@ typedef struct { + int id; double unit_per_latitude; double unit_per_longitude; double speed_per_knot; @@ -82,6 +83,7 @@ static RoadMapUnits RoadMapMetricSystem = { + ROADMAP_SYSTEM_METRIC, 0.11112, /* Meters per latitude. */ 0.0, /* Meters per longitude (dynamic). */ 1.852, /* Kmh per knot. */ @@ -94,6 +96,7 @@ static RoadMapUnits RoadMapImperialSystem = { + ROADMAP_SYSTEM_IMPERIAL, 0.36464, /* Feet per latitude. */ 0.0, /* Feet per longitude (dynamic). */ 1.151, /* Mph per knot. */ @@ -1600,6 +1603,11 @@ } +int roadmap_math_units_system() { + + return RoadMapContext->units->id; +} + char *roadmap_math_distance_unit (void) { return RoadMapContext->units->length; @@ -1643,23 +1651,25 @@ */ void roadmap_math_trip_set_distance(char which, int distance) { - int distance_far; + int tenths; + int system = roadmap_math_units_system(); - distance_far = roadmap_math_to_trip_distance_tenths (distance); + tenths = roadmap_math_to_trip_distance_tenths (distance); - if (distance_far > 0) { - if (distance_far % 10 == 0) { // "2.0 miles" + if ((system == ROADMAP_SYSTEM_IMPERIAL && tenths > 0) || // say ".1 miles" + (system == ROADMAP_SYSTEM_METRIC && tenths > 5)) { // say "500 meters" + if (tenths % 10 == 0) { // "2.0 miles" roadmap_message_set (which, "%d %s", // 'x', 'y', 'Y', 'D', 'W' - distance_far/10, + tenths/10, roadmap_math_trip_unit ()); - } else if (distance_far / 10 == 0) { // "0.2 miles" + } else if (tenths / 10 == 0) { // "0.2 miles" roadmap_message_set (which, ".%d %s", // 'x', 'y', 'Y', 'D', 'W' - distance_far%10, + tenths%10, roadmap_math_trip_unit ()); } else { roadmap_message_set (which, "%d.%d %s", // 'x', 'y', 'Y', 'D', 'W' - distance_far/10, - distance_far%10, + tenths/10, + tenths%10, roadmap_math_trip_unit ()); } } else { Modified: trunk/roadmap/src/roadmap_math.h =================================================================== --- trunk/roadmap/src/roadmap_math.h 2015-07-16 14:32:40 UTC (rev 2916) +++ trunk/roadmap/src/roadmap_math.h 2015-07-16 14:32:43 UTC (rev 2917) @@ -112,6 +112,7 @@ (const RoadMapGuiPoint *point1, const RoadMapGuiPoint *point2, int squared); +int roadmap_math_units_system(void); char *roadmap_math_distance_unit (void); char *roadmap_math_trip_unit (void); char *roadmap_math_speed_unit (void); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-16 14:32:42
|
Revision: 2916 http://sourceforge.net/p/roadmap/code/2916 Author: pgf Date: 2015-07-16 14:32:40 +0000 (Thu, 16 Jul 2015) Log Message: ----------- roadmap_start/trip: add a "movegps" command for debugging Modified Paths: -------------- trunk/roadmap/src/roadmap_start.c trunk/roadmap/src/roadmap_trip.c trunk/roadmap/src/roadmap_trip.h Modified: trunk/roadmap/src/roadmap_start.c =================================================================== --- trunk/roadmap/src/roadmap_start.c 2015-07-16 14:32:36 UTC (rev 2915) +++ trunk/roadmap/src/roadmap_start.c 2015-07-16 14:32:40 UTC (rev 2916) @@ -366,10 +366,16 @@ roadmap_messagebox_wait ("Map Parameters", map_info); } +static void roadmap_start_move_gps_selected (void) +{ + roadmap_trip_move_gps (); + roadmap_screen_refresh(); +} + static void roadmap_start_create_waypoint (void) { #ifdef HAVE_TRIP_PLUGIN - roadmap_trip_create_selection_waypoint (); /* trip_create_selection_waypoint (); */ + roadmap_trip_create_selection_waypoint (); #else roadmap_trip_create_selection_waypoint (); #endif @@ -379,7 +385,7 @@ static void roadmap_start_create_gps_waypoint (void) { #ifdef HAVE_TRIP_PLUGIN - roadmap_trip_create_gps_waypoint (); /* trip_create_gps_waypoint (); */ + roadmap_trip_create_gps_waypoint (); #else roadmap_trip_create_gps_waypoint (); #endif @@ -849,6 +855,10 @@ "Create new place using last selected street or place", NULL, roadmap_start_create_waypoint}, + {"movegps", "Move GPS to selected...", NULL, NULL, + "For debugging, move the GPS location to selection", NULL, + roadmap_start_move_gps_selected}, + {"editroutepoints", "Route Waypoints...", NULL, NULL, "Edit current route's waypoints", NULL, roadmap_trip_route_waypoint_manage_dialog }, Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-16 14:32:36 UTC (rev 2915) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-16 14:32:40 UTC (rev 2916) @@ -1777,6 +1777,23 @@ roadmap_screen_refresh (); } +void roadmap_trip_move_gps (void) { + + RoadMapGpsPosition gps_position; + + if (RoadMapTripLastSetPoint == NULL || + !RoadMapTripLastSetPoint->has_value) { + return; + } + gps_position.longitude = RoadMapTripLastSetPoint->map.longitude; + gps_position.latitude = RoadMapTripLastSetPoint->map.latitude; + gps_position.altitude = 0; /* current units */ + gps_position.speed = 0; /* knots */ + gps_position.steering = 0; /* degrees */ + + roadmap_trip_set_gps (time(NULL), &gps_position); +} + void roadmap_trip_create_selection_waypoint (void) { const char *name; Modified: trunk/roadmap/src/roadmap_trip.h =================================================================== --- trunk/roadmap/src/roadmap_trip.h 2015-07-16 14:32:36 UTC (rev 2915) +++ trunk/roadmap/src/roadmap_trip.h 2015-07-16 14:32:40 UTC (rev 2916) @@ -33,6 +33,7 @@ void roadmap_trip_set_point (const char *name, RoadMapPosition *position); void roadmap_trip_add_waypoint (const char *name, RoadMapPosition *position, int where); +void roadmap_trip_move_gps (void); void roadmap_trip_create_selection_waypoint(void); void roadmap_trip_create_gps_waypoint(void); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-16 14:32:39
|
Revision: 2915 http://sourceforge.net/p/roadmap/code/2915 Author: pgf Date: 2015-07-16 14:32:36 +0000 (Thu, 16 Jul 2015) Log Message: ----------- roadmap_trip: reimplement waypoint distance thresholds we need different threshold levels for fast and slow driving speeds, so rather than calculate the thresholds, we use lists. Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c trunk/roadmap/src/roadmap_trip.h Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-13 16:57:16 UTC (rev 2914) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-16 14:32:36 UTC (rev 2915) @@ -1928,6 +1928,16 @@ return 0; } +/* returns most recent speed, in knots */ +int roadmap_trip_get_speed (void) { + + if (RoadMapTripFocus != NULL) { + return 360 - RoadMapTripFocus->gps.speed; + } + + return 0; +} + /** * @brief * @return @@ -2307,44 +2317,62 @@ static void roadmap_trip_new_threshold(int distance, int *lesserp, int *greaterp) { - int i; - double u, delta; + double u; int low, high; - double threshmul[] = { 2., 2.5, 2. }; + double *threshp; /* we want distance reports at - * 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1, [.5], .2 - * the multipliers to get between these values are 2.5, 2, and 2. - * also, when approaching a waypoint, we want to announce that - * we're nearing it _on_ these mileages, not just past them. i.e., - * if the threshold is 2 miles, we don't want to cross the threshold - * and then announce "in 1.9 miles". so we add a delta or 5% to - * all the threshold values + * 1000km or mi, 500km or mi, 200, 100, 50, 20, 10, 5, 2, 1, .5, + * .2, .1, .05km or mi. the last one corresponds to is 50m or 264 + * feet. when approaching a waypoint, we want to announce + * that we're nearing it _on_ these mileages, not just past them. + * i.e., if the threshold is 2 miles, we don't want to cross the + * threshold and then announce "in 1.9 miles". so we add a small + * delta % to all the threshold values * - * .5 is an exception: because announcements at all of 1.0, .5, - * and .2 are too many, we check .2 by itself, then start looping - * for 1.0 and above. + * at higher speeds, the very small thresholds are too close + * together, so we skip some of them, but using a different threshold + * list for high and low speeds. * * think of high and low as the upper and lower edges of a * distance band. we're trying to place our current distance into * one of those bands. */ + + /* the thresholds represent either miles or kilometers. */ + double slow_thresh[] = { + .05, .12, .22, + .52, 1.05, 2.05, + 5.05, 10.05, 20.05, + 50.05, 100.05, 200.05, + 500.05, 1000.05, 0 + }; + /* as above, but we leave out some thresholds because they'll come + * too fast at a higher speed */ + double fast_thresh[] = { + .22, + 1.05, 2.05, + 5.05, 10.05, 20.05, + 50.05, 100.05, 200.05, + 500.05, 1000.05, 0 + }; + u = roadmap_math_to_trip_units (1); // 5280 feet, or 1000 meters - delta = u * .05; - high = (u * 0.2 ) + delta; // start at .2 mile or .2 km - if (high > distance) { // current distance is less than .2+delta - low = 0; - } else { // current distance is more than .2+delta + low = 0.; + if (roadmap_trip_get_speed() > 30) /* knots */ + threshp = fast_thresh; + else + threshp = slow_thresh; + + while (1) { + high = *threshp * u; + if (high > distance) + break; + if (*++threshp == 0.0) + break; low = high; - high = ((u * 1.0)) + delta; // first band to check is .2 to 1.0 - for (i = 0; i < 10; i ++) { - if (high > distance) - break; - low = high; - high = ((high - delta) * threshmul[i % 3]) + delta; - } } *lesserp = low; Modified: trunk/roadmap/src/roadmap_trip.h =================================================================== --- trunk/roadmap/src/roadmap_trip.h 2015-07-13 16:57:16 UTC (rev 2914) +++ trunk/roadmap/src/roadmap_trip.h 2015-07-16 14:32:36 UTC (rev 2915) @@ -57,6 +57,7 @@ int roadmap_trip_is_refresh_needed (void); int roadmap_trip_get_orientation (void); +int roadmap_trip_get_speed (void); const char *roadmap_trip_get_focus_name (void); const RoadMapPosition *roadmap_trip_get_focus_position (void); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 16:57:19
|
Revision: 2914 http://sourceforge.net/p/roadmap/code/2914 Author: pgf Date: 2015-07-13 16:57:16 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_trip: alphabetize routes and tracks after loading from file this was already done for waypoints Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-13 12:59:41 UTC (rev 2913) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-13 16:57:16 UTC (rev 2914) @@ -2919,6 +2919,11 @@ return strcasecmp(((waypoint *)a)->shortname, ((waypoint *)b)->shortname); } +static int alpha_routename_cmp( RoadMapListItem *a, RoadMapListItem *b) +{ + return strcasecmp(((route_head *)a)->rte_name, ((route_head *)b)->rte_name); +} + /** * @brief * @param name @@ -2997,6 +3002,8 @@ } roadmap_list_sort(&RoadMapTripWaypointHead, alpha_waypoint_cmp); + roadmap_list_sort(&RoadMapTripRouteHead, alpha_routename_cmp); + roadmap_list_sort(&RoadMapTripTrackHead, alpha_routename_cmp); RoadMapCurrentRoute = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 12:59:43
|
Revision: 2913 http://sourceforge.net/p/roadmap/code/2913 Author: pgf Date: 2015-07-13 12:59:41 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_start: metric/imperial unit selection no longer needs restart Modified Paths: -------------- trunk/roadmap/src/roadmap_start.c Modified: trunk/roadmap/src/roadmap_start.c =================================================================== --- trunk/roadmap/src/roadmap_start.c 2015-07-13 12:59:37 UTC (rev 2912) +++ trunk/roadmap/src/roadmap_start.c 2015-07-13 12:59:41 UTC (rev 2913) @@ -1258,17 +1258,23 @@ static void roadmap_start_set_unit (void) { const char *unit = roadmap_config_get (&RoadMapConfigGeneralUnit); + static int error_logged; if (strcmp (unit, "imperial") == 0) { roadmap_math_use_imperial(); + error_logged = 0; } else if (strcmp (unit, "metric") == 0) { roadmap_math_use_metric(); + error_logged = 0; } else { - roadmap_log (ROADMAP_ERROR, "%s is not a supported unit", unit); + if (!error_logged) { + roadmap_log (ROADMAP_ERROR, "%s is not a supported unit", unit); + error_logged = 1; + } roadmap_math_use_imperial(); } } @@ -1415,6 +1421,7 @@ static void roadmap_start_periodic (void) { roadmap_spawn_check (); + roadmap_start_set_unit (); if (RoadMapStartGpsRefresh) { RoadMapStartGpsRefresh = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 12:59:40
|
Revision: 2912 http://sourceforge.net/p/roadmap/code/2912 Author: pgf Date: 2015-07-13 12:59:37 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_voice: change "1 miles" to "1 mile" Modified Paths: -------------- trunk/roadmap/src/roadmap_voice.c Modified: trunk/roadmap/src/roadmap_voice.c =================================================================== --- trunk/roadmap/src/roadmap_voice.c 2015-07-13 09:57:34 UTC (rev 2911) +++ trunk/roadmap/src/roadmap_voice.c 2015-07-13 12:59:37 UTC (rev 2912) @@ -156,6 +156,12 @@ {"Sq", "square"}, {"St", "street"}, + /* special cases so we don't say "1 miles" */ + {" 1 Km", " 1 kilometer"}, + {" 1 Mi", " 1 mile"}, + {" 1 ft", " 1 foot"}, + {" 1 m", " 1 meter"}, + {"Km", "kilometers"}, {"Mi", "miles"}, {"ft", "feet"}, @@ -338,9 +344,9 @@ if (size <= 0) return 0; - if (abbrev_length != 0 && - !isalnum(abbrev[abbrev_length]) && - (!abbrev_at_start && !isalnum(abbrev[-1])) + /* the "1 Mi" --> "1 miles" conversions need special code here */ + if ((!isalnum(abbrev[abbrev_length]) || !strncmp(abbrev," 1 ",3)) && + (!abbrev_at_start && (!isalnum(abbrev[-1]) || !isalnum(abbrev[0]))) ) { /* This is a valid abbreviation: translate it. */ length = strlen(cursor->to); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 09:57:36
|
Revision: 2911 http://sourceforge.net/p/roadmap/code/2911 Author: pgf Date: 2015-07-13 09:57:34 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_math_trip_set_distance: eliminate redundant digits change "4.0" to "4" and "0.3" to ".3". doesn't make much difference on-screen, but reduces voice announcement chatter. Modified Paths: -------------- trunk/roadmap/src/roadmap_math.c Modified: trunk/roadmap/src/roadmap_math.c =================================================================== --- trunk/roadmap/src/roadmap_math.c 2015-07-13 09:57:30 UTC (rev 2910) +++ trunk/roadmap/src/roadmap_math.c 2015-07-13 09:57:34 UTC (rev 2911) @@ -1648,10 +1648,20 @@ distance_far = roadmap_math_to_trip_distance_tenths (distance); if (distance_far > 0) { - roadmap_message_set (which, "%d.%d %s", // 'x', 'y', 'Y', 'D', 'W' + if (distance_far % 10 == 0) { // "2.0 miles" + roadmap_message_set (which, "%d %s", // 'x', 'y', 'Y', 'D', 'W' distance_far/10, + roadmap_math_trip_unit ()); + } else if (distance_far / 10 == 0) { // "0.2 miles" + roadmap_message_set (which, ".%d %s", // 'x', 'y', 'Y', 'D', 'W' distance_far%10, roadmap_math_trip_unit ()); + } else { + roadmap_message_set (which, "%d.%d %s", // 'x', 'y', 'Y', 'D', 'W' + distance_far/10, + distance_far%10, + roadmap_math_trip_unit ()); + } } else { roadmap_message_set (which, "%d %s", // 'x', 'y', 'Y', 'D', 'W' distance, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 09:57:32
|
Revision: 2910 http://sourceforge.net/p/roadmap/code/2910 Author: pgf Date: 2015-07-13 09:57:30 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_trip,roadmap_voice: say description of next waypoint, if it exists also, rename %X to %Z, so we can use %z in an analagous way Modified Paths: -------------- trunk/roadmap/doc/Configuration trunk/roadmap/src/roadmap_display.c trunk/roadmap/src/roadmap_message.c trunk/roadmap/src/roadmap_trip.c trunk/roadmap/src/roadmap_voice.c Modified: trunk/roadmap/doc/Configuration =================================================================== --- trunk/roadmap/doc/Configuration 2015-07-13 09:57:26 UTC (rev 2909) +++ trunk/roadmap/doc/Configuration 2015-07-13 09:57:30 UTC (rev 2910) @@ -107,9 +107,11 @@ | %S | Speed. | %T | Current time, format HH:MM. | %W | Distance to the next waypoint (set only when a trip is active). - | %X | Directions to be followed when the next waypoint (with - | | directions) is reached. (set only when a trip is active). - | %Y | Distance to the next waypoint which includes directions, unless + | %z | Description attached to next waypoint, if it has a description. + | | (set only when a trip is active). + | %Z | Description attached to next waypoint that has a description + | | (usually directions). (set only when a trip is active). + | %Y | Distance to the next waypoint which has a description, unless | | the GPS is "at" that waypoint. (set only when a trip is active). | %# | the street number range to the selected or current street block. | %s | Total number of satellites. Modified: trunk/roadmap/src/roadmap_display.c =================================================================== --- trunk/roadmap/src/roadmap_display.c 2015-07-13 09:57:26 UTC (rev 2909) +++ trunk/roadmap/src/roadmap_display.c 2015-07-13 09:57:30 UTC (rev 2910) @@ -806,7 +806,7 @@ roadmap_config_declare ("preferences", &RoadMapConfigDisplayBottomLeft, "%S"); roadmap_config_declare - ("preferences", &RoadMapConfigDisplayTopRight, "In %Y, %X|%X"); + ("preferences", &RoadMapConfigDisplayTopRight, "In %Y, %Z|%Z"); roadmap_config_declare ("preferences", &RoadMapConfigDisplayTopLeft, ""); Modified: trunk/roadmap/src/roadmap_message.c =================================================================== --- trunk/roadmap/src/roadmap_message.c 2015-07-13 09:57:26 UTC (rev 2909) +++ trunk/roadmap/src/roadmap_message.c 2015-07-13 09:57:30 UTC (rev 2910) @@ -129,8 +129,9 @@ * S Speed.<tr> * T Current time, format HH:MM.<tr> * W Distance to the next waypoint (set only when a trip is active).<tr> - * X Directions to be followed when the next waypoint (with directions) is reached. - * (set only when a trip is active).<tr> + * z Description at the next waypoint. (set only when a trip is active)<tr> + * Z Description (usually directions to be followed), if any, at the next + * waypoint with a non-null description. (set only when a trip is active).<tr> * Y Distance to the next waypoint which includes directions, unless the GPS is * "at" that waypoint. (set only when a trip is active).<tr> * # the street number range to the selected or current street block.<tr> Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-13 09:57:26 UTC (rev 2909) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-13 09:57:30 UTC (rev 2910) @@ -2038,7 +2038,8 @@ if (next == NULL) { roadmap_message_unset ('Y'); /* distance to the next waypoint which includes directions */ - roadmap_message_unset ('X'); /* directions at next waypoint */ + roadmap_message_unset ('z'); /* directions at very next waypoint */ + roadmap_message_unset ('Z'); /* directions at next waypoint */ last_next = NULL; } @@ -2047,6 +2048,11 @@ last_next = next; rest_of_distance = 0; + if (next->description) /* directions at very next waypoint */ + roadmap_message_set ('z', "%s", next->description); + else + roadmap_message_unset ('z'); + while (next->description == NULL && next != RoadMapTripDest) { waypoint *tmp = roadmap_trip_next(next); rest_of_distance += roadmap_math_distance (&next->pos, &tmp->pos); @@ -2055,11 +2061,10 @@ desc = next->description; if (desc == NULL) { - // desc = "Arrive at destination"; desc = "Arrive"; } - roadmap_message_set ('X', "%s", desc); /* directions at next waypoint */ + roadmap_message_set ('Z', "%s", desc); /* directions at next waypoint with directions */ } if (suppress_dist) { @@ -2355,7 +2360,8 @@ * D Distance to the destination (set only when a trip is active). * S Speed. * W Distance to the next waypoint (set only when a trip is active). - * X Directions to be followed when the next waypoint (with directions) is reached. + * z Description at the next waypoint. (set only when a trip is active) + * Z Directions to be followed when the next waypoint which has directions is reached. * (set only when a trip is active). * Y Distance to the next waypoint which includes directions, unless the GPS is * "at" that waypoint. (set only when a trip is active). @@ -2384,7 +2390,8 @@ roadmap_message_unset ('D'); roadmap_message_unset ('W'); - roadmap_message_unset ('X'); + roadmap_message_unset ('z'); + roadmap_message_unset ('Z'); roadmap_message_unset ('Y'); roadmap_message_unset ('1'); @@ -2399,7 +2406,8 @@ roadmap_message_set ('D', "?? %s", roadmap_math_trip_unit()); roadmap_message_set ('W', "?? %s", roadmap_math_distance_unit ()); - roadmap_message_set ('X', "??"); + roadmap_message_set ('z', "??"); + roadmap_message_set ('Z', "??"); roadmap_message_set ('Y', "?? %s", roadmap_math_trip_unit()); roadmap_message_set ('1', "??"); @@ -2536,16 +2544,7 @@ } -/* - notes: - if triggered by threshold: - suppress .5 mile announce, if possible. - suppress announce if less than - - if next has comment, announce miles and comment instead - of "Waypoint" announcement. this is %X, but the voice - announcement currently need the program included as well. - */ + /* now take care of voice things */ if (roadmap_voice_idle()) { int waypoint_changed; static time_t said_time; Modified: trunk/roadmap/src/roadmap_voice.c =================================================================== --- trunk/roadmap/src/roadmap_voice.c 2015-07-13 09:57:26 UTC (rev 2909) +++ trunk/roadmap/src/roadmap_voice.c 2015-07-13 09:57:30 UTC (rev 2910) @@ -57,8 +57,10 @@ static struct roadmap_voice_config RoadMapVoiceText[] = { {ROADMAP_CONFIG_ITEM("Voice", "AtWaypoint"), + "flite" _EXE " -t 'At waypoint, %z'|" "flite" _EXE " -t 'At waypoint, next is %2'"}, {ROADMAP_CONFIG_ITEM("Voice", "Waypoint"), + "flite" _EXE " -t 'Next is %W %1, %z'|" "flite" _EXE " -t 'Next is %W %1, second is %2'|" "flite" _EXE " -t 'Next is %W %1'|" "flite" _EXE " -t 'Destination %D %1'"}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 09:57:28
|
Revision: 2909 http://sourceforge.net/p/roadmap/code/2909 Author: pgf Date: 2015-07-13 09:57:26 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_trip: suppress the .5 mile distance announement announcing at 1.0 and .2 is sufficient Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-13 09:57:23 UTC (rev 2908) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-13 09:57:26 UTC (rev 2909) @@ -2305,28 +2305,41 @@ int i; double u, delta; int low, high; - double threshmul[] = { 2.5, 2., 2. }; -#define STARTING_THRESHOLD .2 + double threshmul[] = { 2., 2.5, 2. }; - // we want distance reports at - // 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1, .5, .2 - // the multipliers to get between these values are 2.5, 2, and 2. - // also, when approaching a waypoint, we want to announce that - // we're nearing it _on_ these mileages, not just past them. i.e., - // if the threshold is 2 miles, we don't want to cross the threshold - // and then announce "in 1.9 miles". so we add a delta or 5% to - // all the threshold values + /* we want distance reports at + * 1000, 500, 200, 100, 50, 20, 10, 5, 2, 1, [.5], .2 + * the multipliers to get between these values are 2.5, 2, and 2. + * also, when approaching a waypoint, we want to announce that + * we're nearing it _on_ these mileages, not just past them. i.e., + * if the threshold is 2 miles, we don't want to cross the threshold + * and then announce "in 1.9 miles". so we add a delta or 5% to + * all the threshold values + * + * .5 is an exception: because announcements at all of 1.0, .5, + * and .2 are too many, we check .2 by itself, then start looping + * for 1.0 and above. + * + * think of high and low as the upper and lower edges of a + * distance band. we're trying to place our current distance into + * one of those bands. + */ u = roadmap_math_to_trip_units (1); // 5280 feet, or 1000 meters delta = u * .05; - high = (u * STARTING_THRESHOLD ) + delta; // start at .2 mile or .2 km - low = 0; + high = (u * 0.2 ) + delta; // start at .2 mile or .2 km - for (i = 0; i < 10; i ++) { - if (high > distance) - break; + if (high > distance) { // current distance is less than .2+delta + low = 0; + } else { // current distance is more than .2+delta low = high; - high = ((high - delta) * threshmul[i % 3]) + delta; + high = ((u * 1.0)) + delta; // first band to check is .2 to 1.0 + for (i = 0; i < 10; i ++) { + if (high > distance) + break; + low = high; + high = ((high - delta) * threshmul[i % 3]) + delta; + } } *lesserp = low; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 09:57:25
|
Revision: 2908 http://sourceforge.net/p/roadmap/code/2908 Author: pgf Date: 2015-07-13 09:57:23 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_trip: suppress too-frequent waypoint voice announcements Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-13 09:57:19 UTC (rev 2907) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-13 09:57:23 UTC (rev 2908) @@ -2523,8 +2523,22 @@ } +/* + notes: + if triggered by threshold: + suppress .5 mile announce, if possible. + suppress announce if less than + + if next has comment, announce miles and comment instead + of "Waypoint" announcement. this is %X, but the voice + announcement currently need the program included as well. + */ if (roadmap_voice_idle()) { - if (lastRoadMapTripNext != RoadMapTripNext || + int waypoint_changed; + static time_t said_time; + + waypoint_changed = (lastRoadMapTripNext != RoadMapTripNext); + if (waypoint_changed || distance_to_next < distance_threshold_lesser || distance_to_next > distance_threshold_greater) { char *dir1, *dir2; @@ -2544,7 +2558,11 @@ roadmap_voice_announce ("AtWaypoint", 1); say_within = 0; } else { - roadmap_voice_announce ("Waypoint", 1); + time_t now = time(NULL); + if (waypoint_changed || (now - said_time > 10)) { + roadmap_voice_announce ("Waypoint", 1); + said_time = now; + } lastRoadMapTripNext = RoadMapTripNext; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-13 09:57:21
|
Revision: 2907 http://sourceforge.net/p/roadmap/code/2907 Author: pgf Date: 2015-07-13 09:57:19 +0000 (Mon, 13 Jul 2015) Log Message: ----------- roadmap_trip: if direction to next 2 waypoints match, only announce first this suppresses a lot of chatter. Modified Paths: -------------- trunk/roadmap/src/roadmap_trip.c trunk/roadmap/src/roadmap_voice.c Modified: trunk/roadmap/src/roadmap_trip.c =================================================================== --- trunk/roadmap/src/roadmap_trip.c 2015-07-05 17:18:21 UTC (rev 2906) +++ trunk/roadmap/src/roadmap_trip.c 2015-07-13 09:57:19 UTC (rev 2907) @@ -2527,12 +2527,17 @@ if (lastRoadMapTripNext != RoadMapTripNext || distance_to_next < distance_threshold_lesser || distance_to_next > distance_threshold_greater) { - char *dir; + char *dir1, *dir2; - dir = roadmap_trip_angle_to_direction(roadmap_trip_next_point_angle()); - roadmap_message_set('1', dir); - dir = roadmap_trip_angle_to_direction(roadmap_trip_2nd_point_angle()); - roadmap_message_set('2', dir); + dir1 = roadmap_trip_angle_to_direction(roadmap_trip_next_point_angle()); + roadmap_message_set('1', dir1); + dir2 = roadmap_trip_angle_to_direction(roadmap_trip_2nd_point_angle()); + if (dir2 == dir1) { + /* suppress the second direction if they're the same */ + roadmap_message_unset('2'); + } else { + roadmap_message_set('2', dir2); + } if (within_waypoint ) { if (say_within == within_waypoint) Modified: trunk/roadmap/src/roadmap_voice.c =================================================================== --- trunk/roadmap/src/roadmap_voice.c 2015-07-05 17:18:21 UTC (rev 2906) +++ trunk/roadmap/src/roadmap_voice.c 2015-07-13 09:57:19 UTC (rev 2907) @@ -56,18 +56,20 @@ ROADMAP_CONFIG_ITEM("Voice", "Mute"); static struct roadmap_voice_config RoadMapVoiceText[] = { - {ROADMAP_CONFIG_ITEM("Voice", "AtWaypoint"), "flite" _EXE - " -t 'At waypoint, next is %2'"}, - {ROADMAP_CONFIG_ITEM("Voice", "Waypoint"), "flite" _EXE - " -t 'Next is %W %1, second is %2'|flite" _EXE " -t 'Destination %D %1'"}, - {ROADMAP_CONFIG_ITEM("Voice", "Approach"), "flite" _EXE - " -t 'Approaching %N'"}, - {ROADMAP_CONFIG_ITEM("Voice", "Current Street"), "flite" _EXE - " -t 'On %N'"}, - {ROADMAP_CONFIG_ITEM("Voice", "Next Intersection"), "flite" _EXE - " -t 'Next intersection: %N'"}, - {ROADMAP_CONFIG_ITEM("Voice", "Selected Street"), "flite" _EXE - " -t 'Selected %N'"}, + {ROADMAP_CONFIG_ITEM("Voice", "AtWaypoint"), + "flite" _EXE " -t 'At waypoint, next is %2'"}, + {ROADMAP_CONFIG_ITEM("Voice", "Waypoint"), + "flite" _EXE " -t 'Next is %W %1, second is %2'|" + "flite" _EXE " -t 'Next is %W %1'|" + "flite" _EXE " -t 'Destination %D %1'"}, + {ROADMAP_CONFIG_ITEM("Voice", "Approach"), + "flite" _EXE " -t 'Approaching %N'"}, + {ROADMAP_CONFIG_ITEM("Voice", "Current Street"), + "flite" _EXE " -t 'On %N'"}, + {ROADMAP_CONFIG_ITEM("Voice", "Next Intersection"), + "flite" _EXE " -t 'Next intersection: %N'"}, + {ROADMAP_CONFIG_ITEM("Voice", "Selected Street"), + "flite" _EXE " -t 'Selected %N'"}, {ROADMAP_CONFIG_ITEM_EMPTY, NULL} }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-05 17:18:24
|
Revision: 2906 http://sourceforge.net/p/roadmap/code/2906 Author: pgf Date: 2015-07-05 17:18:21 +0000 (Sun, 05 Jul 2015) Log Message: ----------- roadmap_screen: add comment re: buggy line trimming when rotated Modified Paths: -------------- trunk/roadmap/src/roadmap_screen.c Modified: trunk/roadmap/src/roadmap_screen.c =================================================================== --- trunk/roadmap/src/roadmap_screen.c 2015-07-02 23:25:17 UTC (rev 2905) +++ trunk/roadmap/src/roadmap_screen.c 2015-07-05 17:18:21 UTC (rev 2906) @@ -418,6 +418,21 @@ roadmap_shape_get_position (i, &midposition); + /* the checks in this routine only really work if the screen + * is upright (i.e., north up), because + * roadmap_math_line/point_is_visible(), + * roadmap_math_get_visible_coordinates() and + * roadmap_math_find_screen_intersection() routines _assume_ + * the screen is up. the quick/easy fix is probably to + * double the apparent size of the screen when it's not + * upright, and let the graphics engine do the appropriate + * clipping. + * + * enlarging the apparent size a bit would also help when + * upgright -- we get rounded line ends (sausage fingers) at + * the screen edge, where the line hasn't really ended -- it + * should really continue off-screen. + */ if (roadmap_math_line_is_visible (&last_midposition, &midposition) && roadmap_math_get_visible_coordinates (&last_midposition, &midposition, &point0, &point1)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pg...@us...> - 2015-07-02 23:25:19
|
Revision: 2905 http://sourceforge.net/p/roadmap/code/2905 Author: pgf Date: 2015-07-02 23:25:17 +0000 (Thu, 02 Jul 2015) Log Message: ----------- roadmap_screen: fix street label angles calculate the angle from the points used to draw the street, not their lat/lon. roadmap is quite sloppy about the map projection -- we want to incorporate the same errors into the labels as we do into the streets themselves. Modified Paths: -------------- trunk/roadmap/src/roadmap_screen.c Modified: trunk/roadmap/src/roadmap_screen.c =================================================================== --- trunk/roadmap/src/roadmap_screen.c 2015-06-30 15:00:30 UTC (rev 2904) +++ trunk/roadmap/src/roadmap_screen.c 2015-07-02 23:25:17 UTC (rev 2905) @@ -445,7 +445,7 @@ if (length_sq > longest) { longest = length_sq; if (angle) { - *angle = roadmap_math_azymuth(&last_midposition, &midposition); + *angle = 180 - roadmap_math_angle(&point0, &point1); } middle->x = (point1.x + point0.x) / 2; middle->y = (point1.y + point0.y) / 2; @@ -499,7 +499,7 @@ if (length_sq > longest) { longest = length_sq; if (angle) { - *angle = roadmap_math_azymuth(&last_midposition, to); + *angle = 180 - roadmap_math_angle(&point0, &point1); } middle->x = (point1.x + point0.x) / 2; middle->y = (point1.y + point0.y) / 2; @@ -565,7 +565,7 @@ (&point1, &point0, MATH_DIST_SQUARED); if (angle) { - *angle = roadmap_math_azymuth(from, to); + *angle = 180 - roadmap_math_angle(&point0, &point1); } middle->x = (point1.x + point0.x) / 2; middle->y = (point1.y + point0.y) / 2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |