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: Paul F. <pg...@us...> - 2008-06-28 16:49:32
|
Update of /cvsroot/roadmap/roadmap/src/agg_support In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20075/agg_support Modified Files: Makefile Log Message: add semi-automatic dependency generation. requires "makedepend" program. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/agg_support/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 8 Sep 2007 03:08:01 -0000 1.2 --- Makefile 28 Jun 2008 16:49:28 -0000 1.3 *************** *** 1,7 **** # stub makefile -- sole purpose is to assist building tarball distributions SOURCE = \ ! Makefile roadmap_canvas.cpp HEADERS = \ --- 1,10 ---- + TOP = .. + include $(TOP)/options.mk + # stub makefile -- sole purpose is to assist building tarball distributions SOURCE = \ ! roadmap_canvas.cpp HEADERS = \ *************** *** 9,12 **** sourcelist: ! @echo $(SOURCE) $(HEADERS) --- 12,19 ---- sourcelist: ! @echo Makefile $(SOURCE) $(HEADERS) + depends: + $(MAKEDEPS) -Y -f - $(SOURCE) > .depends.mk 2>/dev/null + + -include .depends.mk |
|
From: Paul F. <pg...@us...> - 2008-06-28 16:49:32
|
Update of /cvsroot/roadmap/roadmap/src/qt4 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20075/qt4 Modified Files: Makefile Log Message: add semi-automatic dependency generation. requires "makedepend" program. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt4/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 21 Apr 2008 17:11:29 -0000 1.6 --- Makefile 28 Jun 2008 16:49:28 -0000 1.7 *************** *** 35,38 **** --- 35,40 ---- # --- QT sources & targets -------------------------------------------- + OTHER_SOURCE = roadmap_main.cc roadmap_canvas.cc + MOC_RMLIBSRCS = \ qt_main.cc \ *************** *** 73,77 **** clean: ! rm -f *~ *.o *.a *.da $(TARGETS) moc_qt_*.cc strip: --- 75,79 ---- clean: ! rm -f *~ *.o *.a *.da $(TARGETS) moc_qt_*.cc .depends.mk strip: *************** *** 101,105 **** sourcelist: ! @echo Makefile roadmap_main.cc roadmap_canvas.cc $(SOURCE) $(HEADERS) # temporary --- 103,107 ---- sourcelist: ! @echo Makefile $(OTHER_SOURCE) $(SOURCE) $(HEADERS) # temporary *************** *** 139,140 **** --- 141,147 ---- $(MOC) qt_progress.h -o moc_qt_progress.cc + + depends: + $(MAKEDEPS) -Y -f - $(RMLIBSRCS) $(OTHER_SOURCE) > .depends.mk 2>/dev/null + + -include .depends.mk |
|
From: Paul F. <pg...@us...> - 2008-06-28 16:49:32
|
Update of /cvsroot/roadmap/roadmap/src/gtk In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20075/gtk Modified Files: Makefile Log Message: add semi-automatic dependency generation. requires "makedepend" program. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk/Makefile,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Makefile 2 Mar 2008 22:07:26 -0000 1.25 --- Makefile 28 Jun 2008 16:49:28 -0000 1.26 *************** *** 11,14 **** --- 11,16 ---- # --- GTK sources & targets ----------------------------------- + SOURCE = roadmap_main.c roadmap_canvas.c + RMLIBSRCS=roadmap_keyboard.c \ roadmap_messagebox.c \ *************** *** 37,41 **** clean: ! rm -f *.o *.a *.da $(TARGETS) install: --- 39,43 ---- clean: ! rm -f *.o *.a *.da $(TARGETS) .depends.mk install: *************** *** 51,55 **** sourcelist: ! @echo Makefile roadmap_main.c roadmap_canvas.c $(RMLIBSRCS) $(HEADERS) # hopefully temporary --- 53,57 ---- sourcelist: ! @echo Makefile $(SOURCE) $(RMLIBSRCS) $(HEADERS) # hopefully temporary *************** *** 76,77 **** --- 78,84 ---- $(TOP)/libguiroadgps.a libgtkroadmap.a $(LIBS) + + depends: + $(MAKEDEPS) -Y -f - $(SOURCE) $(RMLIBSRCS) > .depends.mk 2>/dev/null + + -include .depends.mk |
|
From: Paul F. <pg...@us...> - 2008-06-28 16:49:32
|
Update of /cvsroot/roadmap/roadmap/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20075/gtk2 Modified Files: Makefile Log Message: add semi-automatic dependency generation. requires "makedepend" program. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk2/Makefile,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Makefile 2 Mar 2008 22:07:26 -0000 1.31 --- Makefile 28 Jun 2008 16:49:28 -0000 1.32 *************** *** 17,21 **** # --- GTK2 sources & targets ----------------------------------- ! RMLIBSRCS=roadmap_keyboard.c \ roadmap_messagebox.c \ roadmap_dialog.c \ --- 17,24 ---- # --- GTK2 sources & targets ----------------------------------- ! SOURCE = roadmap_main.c \ ! roadmap_canvas.c roadmap_canvas_agg.cpp ! ! RMLIBSRCS = roadmap_keyboard.c \ roadmap_messagebox.c \ roadmap_dialog.c \ *************** *** 24,28 **** roadmap_progress.c ! RMLIBOBJS = $(CANVAS_OBJS) $(RMLIBSRCS:.c=.o) TARGETS = gtkroadgps gtkroadmap --- 27,31 ---- roadmap_progress.c ! OBJS = $(CANVAS_OBJS) $(RMLIBSRCS:.c=.o) TARGETS = gtkroadgps gtkroadmap *************** *** 43,47 **** clean: ! rm -f *.o *.a *.da $(TARGETS) install: --- 46,50 ---- clean: ! rm -f *.o *.a *.da $(TARGETS) .depends.mk install: *************** *** 63,68 **** # --- The real targets -------------------------------------------- ! libgtkroadmap.a: $(RMLIBOBJS) ! $(AR) $(ARFLAGS) libgtkroadmap.a $(RMLIBOBJS) $(RANLIB) libgtkroadmap.a --- 66,71 ---- # --- The real targets -------------------------------------------- ! libgtkroadmap.a: $(OBJS) ! $(AR) $(ARFLAGS) libgtkroadmap.a $(OBJS) $(RANLIB) libgtkroadmap.a *************** *** 77,78 **** --- 80,86 ---- $(TOP)/libguiroadgps.a libgtkroadmap.a $(LIBS) + + depends: + $(MAKEDEPS) -Y -f - $(SOURCE) $(RMLIBSRCS) > .depends.mk 2>/dev/null + + -include .depends.mk |
|
From: Paul F. <pg...@us...> - 2008-06-28 16:49:32
|
Update of /cvsroot/roadmap/roadmap/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20075/win32 Modified Files: Makefile Log Message: add semi-automatic dependency generation. requires "makedepend" program. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/win32/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 19 Jun 2008 19:42:17 -0000 1.12 --- Makefile 28 Jun 2008 16:49:29 -0000 1.13 *************** *** 59,63 **** clean: ! rm -f *.o *.a *.da $(addsuffix .exe,$(TARGETS)) libwroadmap.a: $(RMLIBOBJ) --- 59,63 ---- clean: ! rm -f *.o *.a *.da $(addsuffix .exe,$(TARGETS)) .depends.mk libwroadmap.a: $(RMLIBOBJ) *************** *** 98,99 **** --- 98,104 ---- roadmap_colors.o: colors.h + + depends: + $(MAKEDEPS) -Y -f - $(RMLIBSRC) > .depends.mk 2>/dev/null + + -include .depends.mk |
|
From: Paul F. <pg...@us...> - 2008-06-28 16:49:32
|
Update of /cvsroot/roadmap/roadmap/src/php In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20075/php Modified Files: Makefile Log Message: add semi-automatic dependency generation. requires "makedepend" program. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/php/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 12 Dec 2007 17:40:09 -0000 1.1 --- Makefile 28 Jun 2008 16:49:28 -0000 1.2 *************** *** 16,17 **** --- 16,19 ---- @echo $(SOURCE) + + depends: |
|
From: Paul F. <pg...@us...> - 2008-06-28 16:49:32
|
Update of /cvsroot/roadmap/roadmap/src/ipkg In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20075/ipkg Modified Files: Makefile Log Message: add semi-automatic dependency generation. requires "makedepend" program. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/ipkg/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 31 Jul 2007 17:15:48 -0000 1.1 --- Makefile 28 Jun 2008 16:49:28 -0000 1.2 *************** *** 9,10 **** --- 9,12 ---- @echo $(SOURCE) + + depends: |
|
From: Danny B. <dan...@us...> - 2008-06-28 15:27:35
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22016 Modified Files: roadmap.doxy Log Message: Don't show headers included by a source file, do show the static functions. Index: roadmap.doxy =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap.doxy,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap.doxy 28 Jun 2008 13:33:15 -0000 1.1 --- roadmap.doxy 28 Jun 2008 15:27:30 -0000 1.2 *************** *** 250,254 **** # will be included in the documentation. ! EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) --- 250,254 ---- # will be included in the documentation. ! EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) *************** *** 326,330 **** # of that file. ! SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] --- 326,330 ---- # of that file. ! SHOW_INCLUDE_FILES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] |
|
From: Danny B. <dan...@us...> - 2008-06-28 13:33:25
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8764 Added Files: roadmap.doxy Log Message: This is what I'm using for now (Pablo's file with a few changes). --- NEW FILE: roadmap.doxy --- # Doxyfile 1.5.3 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file that # follow. The default is UTF-8 which is also the encoding used for all text before # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into [...1255 lines suppressed...] # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO |
|
From: Paul F. <pg...@us...> - 2008-06-25 21:45:21
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14604/src Modified Files: roadmap.h roadmap_option.c roadmap_start.c Log Message: add --userpath option, for changing the ~/.roadmap path. useful under Sugar, where user data can only go in certain places. Index: roadmap.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** roadmap.h 2 Mar 2008 22:07:26 -0000 1.25 --- roadmap.h 25 Jun 2008 21:45:17 -0000 1.26 *************** *** 82,85 **** --- 82,86 ---- char *roadmap_gps_source (void); char *roadmap_extra_config (void); + char *roadmap_userpath (void); char *roadmap_icon_path (void); Index: roadmap_option.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_option.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** roadmap_option.c 1 Mar 2008 22:21:37 -0000 1.23 --- roadmap_option.c 25 Jun 2008 21:45:17 -0000 1.24 *************** *** 66,69 **** --- 66,70 ---- static char *roadmap_option_gps = NULL; static char *roadmap_option_config = NULL; + static char *roadmap_option_userpath = NULL; static char *roadmap_option_icons = NULL; *************** *** 108,111 **** --- 109,117 ---- } + char *roadmap_userpath (void) { + + return roadmap_option_userpath; + } + char *roadmap_icon_path (void) { *************** *** 189,192 **** --- 195,212 ---- } + static void roadmap_option_set_userpath (const char *value) { + + if (!value || !value[0]) { + roadmap_log (ROADMAP_FATAL, "invalid user path '%s'", value); + } + + if (roadmap_option_userpath != NULL) { + free (roadmap_option_userpath); + } + roadmap_option_userpath = strdup (value); + + roadmap_path_set("user", value); + } + static void roadmap_option_set_iconpath (const char *value) { *************** *** 380,383 **** --- 400,406 ---- "Override the built-in path to the configuration files"}, + {"--userpath=", "USERPATH", roadmap_option_set_userpath, 0, + "Override the default (usually ~/.roadmap) path to the user files"}, + {"--maps=", "MAPPATH", roadmap_option_set_mappath, 1, "Override the built-in (or configured) path to the map files"}, Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.144 retrieving revision 1.145 diff -C2 -d -r1.144 -r1.145 *** roadmap_start.c 23 Jun 2008 12:18:05 -0000 1.144 --- roadmap_start.c 25 Jun 2008 21:45:17 -0000 1.145 *************** *** 277,281 **** roadmap_download_subscribe_when_done ! (roadmap_start_download_done_callback); roadmap_locator_declare_downloader (roadmap_download_get_county); roadmap_download_unblock_all (); --- 277,281 ---- roadmap_download_subscribe_when_done ! (roadmap_start_download_done_callback); roadmap_locator_declare_downloader (roadmap_download_get_county); roadmap_download_unblock_all (); *************** *** 325,328 **** --- 325,329 ---- const char *url = roadmap_gps_source(); const char *config = roadmap_extra_config(); + const char *userpath = roadmap_userpath(); const char *icons = roadmap_icon_path(); char arguments[1024]; *************** *** 338,341 **** --- 339,347 ---- l -= n; } + if (userpath) { + n = snprintf (s, l, " --userpath=%s", userpath); + s += n; + l -= n; + } if (config) { n = snprintf (s, l, " --config=%s", config); *************** *** 344,348 **** } if (icons) { ! n = snprintf (s, l, " --icons=%s", config); s += n; l -= n; --- 350,354 ---- } if (icons) { ! n = snprintf (s, l, " --icons=%s", icons); s += n; l -= n; |
|
From: Paul F. <pg...@us...> - 2008-06-25 21:45:21
|
Update of /cvsroot/roadmap/roadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14604 Modified Files: README Log Message: add --userpath option, for changing the ~/.roadmap path. useful under Sugar, where user data can only go in certain places. Index: README =================================================================== RCS file: /cvsroot/roadmap/roadmap/README,v retrieving revision 1.154 retrieving revision 1.155 diff -C2 -d -r1.154 -r1.155 *** README 24 Jun 2008 20:40:41 -0000 1.154 --- README 25 Jun 2008 21:45:17 -0000 1.155 *************** *** 319,323 **** '&' in other path references). The specific value of the path to the "user" directory is configurable, using the General.UserPath ! setting. These directories are searched sequentially: any configuration item found --- 319,324 ---- '&' in other path references). The specific value of the path to the "user" directory is configurable, using the General.UserPath ! setting. The "user" directory can be changed using the ! "--userpath=..." commandline option. These directories are searched sequentially: any configuration item found *************** *** 864,870 **** configuration data. While this will usually just be a simple directory path, it can actually be a comma-separated list of paths ! from which RoadMap should load its config. User directories ! (usually "~/.roadmap") will still be processed as usual. If specified, ! this option will also be passed to roadgps when invoked via roadmap. [--maps=<PATH>] Replace the built-in search path for maps. While this will --- 865,877 ---- configuration data. While this will usually just be a simple directory path, it can actually be a comma-separated list of paths ! from which RoadMap should load its config. User directories (usually ! "~/.roadmap", but see --userpath, below) will still be processed as ! usual. If specified, this option will also be passed to roadgps when ! invoked via roadmap. ! ! [--userpath=<USERPATH>] Replace the default directory which holds user ! configuration data. The default value for the this is $HOME/.roadmap ! (i.e., "~/.roadmap") If specified, this option will also be passed to ! roadgps when invoked via roadmap. [--maps=<PATH>] Replace the built-in search path for maps. While this will |
|
From: Paul F. <pg...@us...> - 2008-06-25 21:44:27
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14207/src Modified Files: roadmap_path.h Log Message: fix typo Index: roadmap_path.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_path.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** roadmap_path.h 3 Jan 2006 04:11:32 -0000 1.11 --- roadmap_path.h 25 Jun 2008 21:43:34 -0000 1.12 *************** *** 29,33 **** * The function roadmap_path_user() returns a constant that represents * the path of the RoadMap context for the current user (on UNIX, this ! * is typically $HOME/,roadmap). The roadmap_path_trips() function * returns a constant that represents the path of the directory where * the current user stores his/her trip files (this is usually a --- 29,33 ---- * The function roadmap_path_user() returns a constant that represents * the path of the RoadMap context for the current user (on UNIX, this ! * is typically $HOME/.roadmap). The roadmap_path_trips() function * returns a constant that represents the path of the directory where * the current user stores his/her trip files (this is usually a |
|
From: Paul F. <pg...@us...> - 2008-06-24 20:40:46
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24895/src Modified Files: roadmap_screen.c Log Message: implement delay config item for the busy cursor. Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** roadmap_screen.c 23 Jun 2008 12:18:04 -0000 1.130 --- roadmap_screen.c 24 Jun 2008 20:40:42 -0000 1.131 *************** *** 111,114 **** --- 111,117 ---- ROADMAP_CONFIG_ITEM("Map", "Use Linefont"); + static RoadMapConfigDescriptor RoadMapConfigGeneralBusyDelay = + ROADMAP_CONFIG_ITEM("General", "Busy Cursor Delay"); + static RoadMapConfigDescriptor RoadMapConfigGeneralProgressDelay = ROADMAP_CONFIG_ITEM("General", "Progress Bar Delay"); *************** *** 140,143 **** --- 143,147 ---- static unsigned long RoadMapScreenBusyStart; + static unsigned long RoadMapScreenBusyDelay; static unsigned long RoadMapScreenProgressStart; static unsigned long RoadMapScreenProgressDelay; *************** *** 145,155 **** - static unsigned long RoadMapScreenBusyStart; - static unsigned long RoadMapScreenProgressStart; - static unsigned long RoadMapScreenProgressDelay; - static int RoadmapScreenProgressBar; - - - /* Define the buffers used to group all actual drawings. */ --- 149,152 ---- *************** *** 231,235 **** if (newcursor == ROADMAP_CURSOR_WAIT_WITH_DELAY) { roadmap_screen_start_progress (); ! RoadMapScreenBusyStart = roadmap_time_get_millis(); roadmap_main_flush (); return; --- 228,235 ---- if (newcursor == ROADMAP_CURSOR_WAIT_WITH_DELAY) { roadmap_screen_start_progress (); ! RoadMapScreenBusyDelay = ! roadmap_config_get_integer (&RoadMapConfigGeneralBusyDelay); ! if (RoadMapScreenBusyDelay != 0) ! RoadMapScreenBusyStart = roadmap_time_get_millis(); roadmap_main_flush (); return; *************** *** 268,272 **** if (RoadMapScreenBusyStart && ! roadmap_time_get_millis() - RoadMapScreenBusyStart > 1000) { roadmap_screen_set_cursor (ROADMAP_CURSOR_WAIT); } --- 268,273 ---- if (RoadMapScreenBusyStart && ! roadmap_time_get_millis() - RoadMapScreenBusyStart > ! RoadMapScreenBusyDelay) { roadmap_screen_set_cursor (ROADMAP_CURSOR_WAIT); } *************** *** 1828,1832 **** if (force_refresh) ! roadmap_start_request_repaint_map (REPAINT_NOW); else if (maybe_refresh) roadmap_start_request_repaint_map (REPAINT_MAYBE); --- 1829,1833 ---- if (force_refresh) ! roadmap_start_request_repaint_map (REPAINT_NOW); else if (maybe_refresh) roadmap_start_request_repaint_map (REPAINT_MAYBE); *************** *** 2083,2087 **** roadmap_config_declare ! ("preferences", &RoadMapConfigGeneralProgressDelay, "300"); --- 2084,2091 ---- roadmap_config_declare ! ("preferences", &RoadMapConfigGeneralBusyDelay, "200"); ! ! roadmap_config_declare ! ("preferences", &RoadMapConfigGeneralProgressDelay, "350"); |
|
From: Paul F. <pg...@us...> - 2008-06-24 20:40:46
|
Update of /cvsroot/roadmap/roadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24895 Modified Files: README Log Message: implement delay config item for the busy cursor. Index: README =================================================================== RCS file: /cvsroot/roadmap/roadmap/README,v retrieving revision 1.153 retrieving revision 1.154 diff -C2 -d -r1.153 -r1.154 *** README 7 Jun 2008 01:27:25 -0000 1.153 --- README 24 Jun 2008 20:40:41 -0000 1.154 *************** *** 2310,2318 **** will also be searched. [General.Progress Bar Delay] Delay until progress bar during refresh. <<Format:>> integer (milliseconds) ! <<Default:>> 300 <<Comment:>> When displaying maps that cover a large area, or on --- 2310,2330 ---- will also be searched. + [General.Busy Cursor Delay] Delay until mouse cursor switches to "busy" + + <<Format:>> integer (milliseconds) + + <<Default:>> 200 + + <<Comment:>> When displaying maps that cover a large area, or on + a slow computer, a screen refresh may take some time. + The mouse will change to a "watch" or hourglass or other + busy indicator after this amount of time. Use '0' to + disable this. + [General.Progress Bar Delay] Delay until progress bar during refresh. <<Format:>> integer (milliseconds) ! <<Default:>> 350 <<Comment:>> When displaying maps that cover a large area, or on *************** *** 2320,2324 **** indication of how long the refresh will take. The value is the delay until the progress bar appears. Use ! '0' to disable the progress bar. [General.Toolbar] Show (yes) or hide (no) the roadmap toolbar. --- 2332,2342 ---- indication of how long the refresh will take. The value is the delay until the progress bar appears. Use ! '0' to disable the progress bar. It may be desirable ! to disable the progress bar especially if the X window ! manager insists on making the progress dialog fullscreen, ! or if it always takes focus away from roadmap (in which ! case keystrokes will go to the progress bar dialog ! box instead of roadmap). ! [General.Toolbar] Show (yes) or hide (no) the roadmap toolbar. |
|
From: Paul F. <pg...@us...> - 2008-06-23 12:18:09
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15093 Modified Files: roadgps_screen.c roadmap_screen.c roadmap_start.c Log Message: properly fix the manual vs. automatic refresh priority logic Index: roadgps_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadgps_screen.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** roadgps_screen.c 17 Jun 2008 01:30:13 -0000 1.23 --- roadgps_screen.c 23 Jun 2008 12:18:04 -0000 1.24 *************** *** 536,540 **** void roadgps_screen_request_repaint(void) { ! roadmap_start_request_repaint(ROADMAP_GPS, 1); } --- 536,540 ---- void roadgps_screen_request_repaint(void) { ! roadmap_start_request_repaint(ROADMAP_GPS, REPAINT_NOW); } Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** roadmap_screen.c 17 Jun 2008 01:30:13 -0000 1.129 --- roadmap_screen.c 23 Jun 2008 12:18:04 -0000 1.130 *************** *** 1758,1763 **** void roadmap_screen_refresh (void) { ! int refresh = 0; ! int force_refresh = REPAINT_MAYBE; roadmap_log_push ("roadmap_screen_refresh"); --- 1758,1763 ---- void roadmap_screen_refresh (void) { ! int maybe_refresh = 0; ! int force_refresh = 0; roadmap_log_push ("roadmap_screen_refresh"); *************** *** 1767,1771 **** roadmap_screen_reset_delta (); roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! force_refresh = REPAINT_NOW; REPORT_REFRESH ("focus changed"); --- 1767,1771 ---- roadmap_screen_reset_delta (); roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! force_refresh++; REPORT_REFRESH ("focus changed"); *************** *** 1778,1782 **** roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! refresh = 1; REPORT_REFRESH("focus moved"); --- 1778,1782 ---- roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! maybe_refresh++; REPORT_REFRESH("focus moved"); *************** *** 1806,1832 **** */ if (roadmap_config_match (&RoadMapConfigMapRefresh, "forced")) { ! force_refresh = REPAINT_NOW; REPORT_REFRESH( "forced\n" ); } if (roadmap_trip_is_refresh_needed()) { ! force_refresh = REPAINT_NOW; REPORT_REFRESH( "trip\n" ); } if (roadmap_landmark_is_refresh_needed()) { ! force_refresh = REPAINT_NOW; REPORT_REFRESH( "landmark\n" ); } if (roadmap_track_is_refresh_needed()) { ! refresh = 1; REPORT_REFRESH( "track\n" ); } if (roadmap_display_is_refresh_needed()) { ! refresh = 1; REPORT_REFRESH( "display\n" ); } ! if (refresh || force_refresh != REPAINT_NOT_NEEDED) ! roadmap_start_request_repaint_map(force_refresh); roadmap_log_pop (); --- 1806,1834 ---- */ if (roadmap_config_match (&RoadMapConfigMapRefresh, "forced")) { ! force_refresh++; REPORT_REFRESH( "forced\n" ); } if (roadmap_trip_is_refresh_needed()) { ! force_refresh++; REPORT_REFRESH( "trip\n" ); } if (roadmap_landmark_is_refresh_needed()) { ! force_refresh++; REPORT_REFRESH( "landmark\n" ); } if (roadmap_track_is_refresh_needed()) { ! maybe_refresh++; REPORT_REFRESH( "track\n" ); } if (roadmap_display_is_refresh_needed()) { ! maybe_refresh++; REPORT_REFRESH( "display\n" ); } ! if (force_refresh) ! roadmap_start_request_repaint_map (REPAINT_NOW); ! else if (maybe_refresh) ! roadmap_start_request_repaint_map (REPAINT_MAYBE); roadmap_log_pop (); Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.143 retrieving revision 1.144 diff -C2 -d -r1.143 -r1.144 *** roadmap_start.c 17 Jun 2008 01:30:13 -0000 1.143 --- roadmap_start.c 23 Jun 2008 12:18:05 -0000 1.144 *************** *** 303,307 **** if (RoadMapStartScreenActive != ROADMAP_MAP) { RoadMapStartScreenActive = ROADMAP_MAP; ! roadmap_start_request_repaint(ROADMAP_MAP, 1); return 1; } --- 303,307 ---- if (RoadMapStartScreenActive != ROADMAP_MAP) { RoadMapStartScreenActive = ROADMAP_MAP; ! roadmap_start_request_repaint(ROADMAP_MAP, REPAINT_NOW); return 1; } *************** *** 311,315 **** void roadmap_start_gps_console(void) { RoadMapStartScreenActive = ROADMAP_GPS; ! roadmap_start_request_repaint(ROADMAP_GPS, 1); } --- 311,315 ---- void roadmap_start_gps_console(void) { RoadMapStartScreenActive = ROADMAP_GPS; ! roadmap_start_request_repaint(ROADMAP_GPS, REPAINT_NOW); } *************** *** 402,406 **** RoadMapStartIdleInstalled = 1; } ! RoadMapStartRepaintNeeded = priority ? REPAINT_NOW : REPAINT_MAYBE; } } --- 402,406 ---- RoadMapStartIdleInstalled = 1; } ! RoadMapStartRepaintNeeded = priority; } } |
|
From: Paul F. <pg...@us...> - 2008-06-20 13:09:25
|
Update of /cvsroot/roadmap/roadmap/src/iphone In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11282/iphone Modified Files: Makefile roadmap_canvas.m roadmap_iphonecanvas.h roadmap_iphonemain.h roadmap_main.m Log Message: iphone update from morten bek: Here's a patch for the iPhone frontend: Adds preliminary support for toolbars Fixes get_text_extends Supports unicode string drawing. Internally, the coordinate system is flipped in order to be able to assign the surface directly to an iPhone GUI layer - hope that it's a bit faster and it could allow for fancy graphics stuff like drop-shadows and transparency. General cleaning up. Sets up HOME and PATH environment variables. Terminates application correctly. Index: roadmap_iphonecanvas.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/iphone/roadmap_iphonecanvas.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_iphonecanvas.h 4 May 2008 16:49:21 -0000 1.1 --- roadmap_iphonecanvas.h 20 Jun 2008 13:09:19 -0000 1.2 *************** *** 33,36 **** --- 33,37 ---- #import <UIKit/UIKit.h> + #import <UIKit/UIButtonBar.h> @interface RoadMapCanvasView : UIView { Index: roadmap_main.m =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/iphone/roadmap_main.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_main.m 4 May 2008 16:49:21 -0000 1.1 --- roadmap_main.m 20 Jun 2008 13:09:19 -0000 1.2 *************** *** 43,48 **** --- 43,63 ---- #include "roadmap_time.h" + #import <Foundation/NSDictionary.h> + + extern NSString *kUIButtonBarButtonAction; + extern NSString *kUIButtonBarButtonInfo; + extern NSString *kUIButtonBarButtonInfoOffset; + extern NSString *kUIButtonBarButtonSelectedInfo; + extern NSString *kUIButtonBarButtonStyle; + extern NSString *kUIButtonBarButtonTag; + extern NSString *kUIButtonBarButtonTarget; + extern NSString *kUIButtonBarButtonTitle; + extern NSString *kUIButtonBarButtonTitleVerticalHeight; + extern NSString *kUIButtonBarButtonTitleWidth; + extern NSString *kUIButtonBarButtonType; + static RoadMapApp *TheApp; + static int RoadMapMainToolbarAdded = 0; static int sArgc; static char ** sArgv; *************** *** 65,69 **** static struct roadmap_main_timer RoadMapMainPeriodicTimer[ROADMAP_MAX_TIMER]; ! static RoadMapCallback *idle_callback = NULL; static char *RoadMapMainTitle = NULL; --- 80,84 ---- static struct roadmap_main_timer RoadMapMainPeriodicTimer[ROADMAP_MAX_TIMER]; ! static RoadMapCallback idle_callback = NULL; static char *RoadMapMainTitle = NULL; *************** *** 72,158 **** static UIView *RoadMapMainBox = NULL; static RoadMapCanvasView *RoadMapCanvasBox = NULL; ! static UIView *RoadMapMainMenuBar = NULL; ! static UIView *RoadMapMainToolbar = NULL; ! static UIView *RoadMapMainStatus = NULL; ! ! ! static int iPhoneIconsInitialized = 0; ! ! ! static UIView *roadmap_main_toolbar_icon (const char *icon) { ! ! if (icon != NULL) { ! ! const char *icon_file = roadmap_path_search_icon (icon); ! ! if (icon_file != NULL) { ! iPhoneIconsInitialized = 1; ! return NULL; // gtk_image_new_from_file (icon_file); ! } ! } ! return NULL; ! } ! ! /* ! static void roadmap_main_close (UIView *widget, ! GdkEvent *event, ! gpointer data) { ! ! roadmap_main_exit (); ! } ! ! ! static void roadmap_main_activate (UIView *widget, gpointer data) { ! ! if (data != NULL) { ! (* (RoadMapCallback) data) (); ! } ! } ! ! ! static gint roadmap_main_key_pressed (UIView *w, GdkEventKey *event) { ! ! char *key = NULL; ! char regular_key[2]; ! ! ! switch (event->keyval) { ! ! case GDK_Left: key = "Button-Left"; break; ! case GDK_Right: key = "Button-Right"; break; ! case GDK_Up: key = "Button-Up"; break; ! case GDK_Down: key = "Button-Down"; break; ! ! case GDK_Return: key = "Enter"; break; ! ! // These binding are for the iPAQ buttons: ! case 0x1008ff1a: key = "Button-Menu"; break; ! case 0x1008ff20: key = "Button-Calendar"; break; ! case 0xaf9: key = "Button-Contact"; break; ! case 0xff67: key = "Button-Start"; break; - // Regular keyboard keys: - default: ! if (event->keyval > 0 && event->keyval < 128) { ! regular_key[0] = event->keyval; ! regular_key[1] = 0; ! key = regular_key; ! } ! break; ! } ! if (key != NULL && RoadMapMainInput != NULL) { ! (*RoadMapMainInput) (key); ! } ! return FALSE; } - - */ - void roadmap_main_toggle_full_screen (void) { } --- 87,118 ---- static UIView *RoadMapMainBox = NULL; static RoadMapCanvasView *RoadMapCanvasBox = NULL; ! //static UIView *RoadMapMainMenuBar = NULL; ! static UIButtonBar *RoadMapMainToolbar = NULL; ! //static UIView *RoadMapMainStatus = NULL; ! static NSArray *RoadMapMainToolbarArray = NULL; ! static int buttonCount = 0; ! static RoadMapCallback RoadMapMainToolbarCallbacks[6]; ! static char *roadmap_main_toolbar_icon (const char *icon) { ! unsigned int i; ! if (icon == NULL) ! return NULL; ! const char *icon_file = roadmap_path_search_icon (icon); ! if (icon_file == NULL) ! return NULL; ! for (i = 0; i < strlen(icon_file); i++) ! { ! if (strncmp (icon_file + i, "resources", 9) == 0) ! return (char *)(icon_file + i); ! } ! return NULL; } void roadmap_main_toggle_full_screen (void) { + /* Don't care abobut full screen on the iPhone */ } *************** *** 161,177 **** } - void roadmap_main_title(char *fmt, ...) { ! ! char newtitle[200]; ! va_list ap; ! int n; ! ! n = snprintf(newtitle, 200, "%s", RoadMapMainTitle); ! va_start(ap, fmt); ! vsnprintf(&newtitle[n], 200 - n, fmt, ap); ! va_end(ap); ! ! // gtk_window_set_title (GTK_WINDOW(RoadMapMainWindow), newtitle); } --- 121,126 ---- } void roadmap_main_title(char *fmt, ...) { ! /* Don't care about titles on the iPhone */ } *************** *** 181,185 **** RoadMapMenu roadmap_main_new_menu (const char *title) { - return NULL; } --- 130,133 ---- *************** *** 188,193 **** void roadmap_main_free_menu (RoadMapMenu menu) { NSLog (@"roadmap_main_free_menu\n"); - - } --- 136,139 ---- *************** *** 268,322 **** void roadmap_main_add_toolbar (const char *orientation) { NSLog (@"roadmap_main_add_toolbar orientation: %s\n", orientation); ! ! if (RoadMapMainToolbar == NULL) { ! int on_top = 1; ! ! // GtkOrientation gtk_orientation = GTK_ORIENTATION_HORIZONTAL; ! ! // RoadMapMainToolbar = gtk_toolbar_new (); ! ! switch (orientation[0]) { ! case 't': ! case 'T': on_top = 1; break; ! ! case 'b': ! case 'B': on_top = 0; break; ! ! case 'l': ! case 'L': on_top = 1; ! // gtk_orientation = GTK_ORIENTATION_VERTICAL; ! break; ! ! case 'r': ! case 'R': on_top = 0; ! // gtk_orientation = GTK_ORIENTATION_VERTICAL; ! break; ! ! default: /*roadmap_log (ROADMAP_FATAL, ! "Invalid toolbar orientation %s", orientation); ! */ ! break; ! } ! /* gtk_toolbar_set_orientation (GTK_TOOLBAR(RoadMapMainToolbar), ! gtk_orientation); ! ! if (gtk_orientation == GTK_ORIENTATION_VERTICAL) { ! */ ! /* In this case we need a new box, since the "normal" box ! * is a vertical one and we need an horizontal one. */ ! ! /* RoadMapCanvasBox = gtk_hbox_new (FALSE, 0); ! gtk_container_add (GTK_CONTAINER(RoadMapMainBox), RoadMapCanvasBox); ! */ ! // } ! ! if (on_top) { ! // gtk_box_pack_start (GTK_BOX(RoadMapCanvasBox), ! // RoadMapMainToolbar, FALSE, FALSE, 0); ! } else { ! // gtk_box_pack_end (GTK_BOX(RoadMapCanvasBox), ! // RoadMapMainToolbar, FALSE, FALSE, 0); ! } ! } } --- 214,219 ---- void roadmap_main_add_toolbar (const char *orientation) { NSLog (@"roadmap_main_add_toolbar orientation: %s\n", orientation); ! RoadMapMainToolbarAdded = 1; ! RoadMapMainToolbarArray = [[NSArray array] init]; } *************** *** 325,362 **** const char *tip, RoadMapCallback callback) { ! NSLog (@"roadmap_main_add_tool label: %s icon: %s tip: %s\n", label, icon, tip); ! if (RoadMapMainToolbar == NULL) { ! roadmap_main_add_toolbar (""); ! } ! /* ! gtk_toolbar_append_item (GTK_TOOLBAR(RoadMapMainToolbar), ! label, tip, NULL, ! roadmap_main_toolbar_icon (icon), ! (GtkSignalFunc) roadmap_main_activate, callback); ! if (gdk_screen_height() < 550) ! { ! */ ! /* When using a small screen, we want either the labels or the icons, ! * but not both (small screens are typical with PDAs). */ ! ! /* gtk_toolbar_set_style ! (GTK_TOOLBAR(RoadMapMainToolbar), ! GtkIconsInitialized?GTK_TOOLBAR_ICONS:GTK_TOOLBAR_TEXT); ! } ! */ } void roadmap_main_add_tool_space (void) { ! NSLog (@"roadmap_main_add_tool_space\n"); ! if (RoadMapMainToolbar == NULL) { ! // roadmap_log (ROADMAP_FATAL, "Invalid toolbar space: no toolbar yet"); ! } ! ! /* ! gtk_toolbar_append_space (GTK_TOOLBAR(RoadMapMainToolbar)); ! */ } --- 222,262 ---- const char *tip, RoadMapCallback callback) { ! char *iconstr; ! NSString *nsicon, *nslabel; ! NSLog (@"roadmap_main_add_tool label: %s icon: %s tip: %s\n", label, icon, tip); ! if (buttonCount >= 5) ! { ! NSLog (@"roadmap_main_add_tool only room for 5 buttons\n"); ! return; ! } ! buttonCount++; ! NSArray *tmp = RoadMapMainToolbarArray; ! nslabel = [[NSString alloc] initWithUTF8String:icon]; ! iconstr = roadmap_main_toolbar_icon(icon); ! if (iconstr) ! nsicon = [[NSString alloc] initWithUTF8String:iconstr]; ! else ! nsicon = @""; ! ! RoadMapMainToolbarCallbacks[buttonCount] = callback; ! NSDictionary *dict = [ NSDictionary dictionaryWithObjectsAndKeys: ! @"buttonBarItemTapped:", kUIButtonBarButtonAction, ! nsicon, kUIButtonBarButtonInfo, ! @"imagedown.png", kUIButtonBarButtonSelectedInfo, ! [ NSNumber numberWithInt: buttonCount], kUIButtonBarButtonTag, ! TheApp, kUIButtonBarButtonTarget, ! nslabel, kUIButtonBarButtonTitle, ! //@"", kUIButtonBarButtonTitle, ! @"0", kUIButtonBarButtonType, ! nil ! ]; ! RoadMapMainToolbarArray = [tmp arrayByAddingObject: dict]; } void roadmap_main_add_tool_space (void) { ! /* Don't care about spaces on the iPhone... */ } *************** *** 364,368 **** void roadmap_main_set_cursor (RoadMapCursor newcursor) { ! NSLog (@"roadmap_main_set_cursor\n"); } --- 264,268 ---- void roadmap_main_set_cursor (RoadMapCursor newcursor) { ! /* Don't care about cursors on the iPhone... */ } *************** *** 378,384 **** void roadmap_main_add_canvas (void) { - // NSLog ("roadmap_main_add_canvas\n"); struct CGRect rect = [UIHardware fullScreenApplicationContentRect]; ! rect.origin.x = rect.origin.y = 0.0f; RoadMapCanvasBox = [[RoadMapCanvasView alloc] initWithFrame: rect]; --- 278,288 ---- void roadmap_main_add_canvas (void) { struct CGRect rect = [UIHardware fullScreenApplicationContentRect]; ! rect.origin.x = 0.0f; ! rect.origin.y = 0.0f; ! if (RoadMapMainToolbarAdded) ! rect.size.height = 480.0f - 49.0f - 20.0f; ! else ! rect.size.height = 480.0f - 20.0f; RoadMapCanvasBox = [[RoadMapCanvasView alloc] initWithFrame: rect]; *************** *** 387,399 **** void roadmap_main_add_status (void) { ! NSLog (@"roadmap_main_add_status\n"); } void roadmap_main_show (void) { ! NSLog (@"roadmap_main_show\n"); ! ! if (RoadMapMainWindow != NULL) { ! } } --- 291,307 ---- void roadmap_main_add_status (void) { ! /* Status bar seems like a waste of space on the iPhone... */ } void roadmap_main_show (void) { ! /* Since this is called after the toolbar is ! configured, we use this to add the finalized ! toolbar to the main view */ ! if (RoadMapMainToolbarAdded) ! { ! RoadMapMainToolbar = [TheApp createButtonBar]; ! [RoadMapMainBox addSubview: RoadMapMainToolbar]; ! } } *************** *** 432,441 **** int roadmap_main_flush (void) { ! /* if ([[NSNotificationCenter defaultCenter] isEmpty]) return 0; return 1; - */ // NSLog (@"roadmap_main_flush\n"); /* --- 340,348 ---- int roadmap_main_flush (void) { ! if ([[NSNotificationCenter defaultCenter] isEmpty]) return 0; return 1; // NSLog (@"roadmap_main_flush\n"); /* *************** *** 483,487 **** if (!exit_done++) { roadmap_start_exit (); - //XXX UIApplicationquit } } --- 390,393 ---- *************** *** 501,504 **** --- 407,415 ---- sArgc--; } + putenv("HOME=/var/mobile/Library/"); + + // Add paths to roadmap drivers and to flite + putenv("PATH=/Applications/RoadMap.app/bin:/usr/bin"); + roadmap_option (sArgc, sArgv, 0, NULL); NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; *************** *** 510,513 **** --- 421,454 ---- @implementation RoadMapApp + - (UIButtonBar *)createButtonBar { + UIButtonBar *buttonBar; + buttonBar = [ [ UIButtonBar alloc ] + initInView: RoadMapMainBox + withFrame: CGRectMake(0.0f, 480.0f - 49.0f - 20.0f, 320.0f, 49.0f) + withItemList: RoadMapMainToolbarArray ]; + [buttonBar setDelegate:self]; + [buttonBar setBarStyle:0]; + [buttonBar setButtonBarTrackingMode: 1]; + + int buttons[5] = { 1, 2, 3, 4, 5}; + [buttonBar registerButtonGroup:0 withButtons:buttons withCount: buttonCount]; + [buttonBar showButtonGroup: 0 withDuration: 0.0f]; + int tag; + + for(tag = 1; tag <= buttonCount; tag++) { + [ [ buttonBar viewWithTag:tag ] + setFrame:CGRectMake(2.0f + ((tag - 1) * 64.0f), 1.0f, 64.0f, 48.0f) + ]; + } + + return buttonBar; + } + + - (void)buttonBarItemTapped:(id) sender { + int button = [ sender tag ]; + printf("buttonclicked: %i\n", button); + (RoadMapMainToolbarCallbacks[button] ) (); + } + -(void) newWithTitle: (const char *)title andWidth: (int) width andHeight: (int) height { *************** *** 521,534 **** [RoadMapMainWindow _setHidden: NO]; [RoadMapMainWindow setContentView: RoadMapMainBox]; - UINavigationBar *nav = [[UINavigationBar alloc] initWithFrame: CGRectMake( - 0.0f, 0.0f, 320.0f, 48.0f)]; - [nav showButtonsWithLeftTitle: @"Map" rightTitle: nil leftBack: NO]; - [nav setBarStyle: 0]; - [nav setDelegate: self]; - - [RoadMapMainBox addSubview: nav]; } - if (RoadMapMainTitle != NULL) { free(RoadMapMainTitle); --- 462,467 ---- *************** *** 536,539 **** --- 469,473 ---- RoadMapMainTitle = strdup (title); } + - (void) periodicCallback: (NSTimer *) timer { *************** *** 658,665 **** roadmap_start (sArgc, sArgv); ! // atexit(roadmap_main_exit); } ! - (void)applicationWillTerminate; { roadmap_main_exit(); --- 592,611 ---- roadmap_start (sArgc, sArgv); ! [self reportAppLaunchFinished]; } ! - (void)applicationWillSuspend ! { ! // [self terminate]; ! printf("go to sleep\n"); ! } ! ! - (void)applicationDidResume ! { ! printf("I am alive!\n"); ! ! } ! ! - (void)applicationWillTerminate { roadmap_main_exit(); Index: roadmap_canvas.m =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/iphone/roadmap_canvas.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_canvas.m 4 May 2008 16:49:21 -0000 1.1 --- roadmap_canvas.m 20 Jun 2008 13:09:19 -0000 1.2 *************** *** 43,48 **** #include "colors.h" ! #define ROADMAP_CHARWIDTH 10 ! #define ROADMAP_LINEHEIGHT 12 struct RoadMapColor { --- 43,52 ---- #include "colors.h" ! extern int CGFontGetAscent(CGFontRef font); ! extern int CGFontGetDescent(CGFontRef font); ! extern int CGFontGetUnitsPerEm(CGFontRef font); ! extern CGFontRef CGContextGetFont(CGContextRef context); ! extern void CGFontGetGlyphsForUnichars (CGFontRef, const UniChar[], const CGGlyph[], size_t); ! extern CGFontRef CGFontCreateWithFontName (CFStringRef name); struct RoadMapColor { *************** *** 68,71 **** --- 72,77 ---- static RoadMapCanvasView *RoadMapDrawingArea; static CGContextRef RoadMapGc; + static LKLayer *mainLayer; + static int CanvasWidth, CanvasHeight; static RoadMapPen CurrentPen; *************** *** 101,105 **** while (points < end) { cgpoints->x = points->x; ! cgpoints->y = points->y; cgpoints += 1; points += 1; --- 107,111 ---- while (points < end) { cgpoints->x = points->x; ! cgpoints->y = CanvasHeight - points->y; cgpoints += 1; points += 1; *************** *** 114,118 **** while (points < end) { rects->origin.x = points->x; ! rects->origin.y = points->y; rects->size.width = 1.0; rects->size.height = 1.0; --- 120,124 ---- while (points < end) { rects->origin.x = points->x; ! rects->origin.y = CanvasHeight - points->y; rects->size.width = 1.0; rects->size.height = 1.0; *************** *** 124,138 **** void roadmap_canvas_get_text_extents (const char *text, int size, int *width, ! int *ascent, int *descent, int *can_tilt) { ! /* These values are currently _very_ rough estimates! */ ! *width = strlen(text) * ROADMAP_CHARWIDTH; ! *ascent = ROADMAP_LINEHEIGHT; ! *descent = 0; ! if (can_tilt) *can_tilt = 1; } RoadMapPen roadmap_canvas_select_pen (RoadMapPen pen) { ! float lengths[2] = {2.0f, 2.0f}; RoadMapPen old_pen = CurrentPen; CurrentPen = pen; --- 130,170 ---- void roadmap_canvas_get_text_extents (const char *text, int size, int *width, ! int *ascent, int *descent, int *can_tilt) ! { ! float size_f = (size * 1.0f); ! UniChar buf[2048]; ! CGGlyph glyphs[2048]; ! CFStringRef string; ! CGPoint point; ! ! CGFontRef font = CGContextGetFont(RoadMapGc); ! CGContextSetFontSize(RoadMapGc, size_f); ! ! string = CFStringCreateWithCString(NULL, text, kCFStringEncodingUTF8); ! CFIndex length = CFStringGetLength(string); ! if (length >= 2048) ! return; ! CFStringGetCharacters (string, CFRangeMake(0, length), buf); ! ! CGFontGetGlyphsForUnichars(font, buf, glyphs, length); ! ! CGContextSetTextDrawingMode (RoadMapGc, kCGTextInvisible); ! CGContextSetTextPosition(RoadMapGc, 0,0); ! CGContextShowGlyphs(RoadMapGc, glyphs, length); ! point = CGContextGetTextPosition(RoadMapGc); ! CGContextSetTextDrawingMode (RoadMapGc, kCGTextFill); ! ! int unitsperem = CGFontGetUnitsPerEm(font); ! float unitsperpixel = unitsperem / size_f; ! ! *width = point.x + 0.5; ! *ascent = CGFontGetAscent(font) / unitsperpixel; ! *descent = -(CGFontGetDescent(font) / unitsperpixel); ! if (can_tilt) *can_tilt = 1; } RoadMapPen roadmap_canvas_select_pen (RoadMapPen pen) { ! float lengths[2] = {3.0f, 3.0f}; RoadMapPen old_pen = CurrentPen; CurrentPen = pen; *************** *** 145,149 **** CGContextSetLineWidth(RoadMapGc, pen->lineWidth); CGContextSetRGBStrokeColor( RoadMapGc, pen->stroke.r, pen->stroke.g, pen->stroke.b, pen->stroke.a); ! CGContextSetRGBFillColor( RoadMapGc, pen->stroke.r, pen->stroke.b, pen->stroke.b, pen->stroke.a); return old_pen; --- 177,181 ---- CGContextSetLineWidth(RoadMapGc, pen->lineWidth); CGContextSetRGBStrokeColor( RoadMapGc, pen->stroke.r, pen->stroke.g, pen->stroke.b, pen->stroke.a); ! CGContextSetRGBFillColor( RoadMapGc, pen->stroke.r, pen->stroke.g, pen->stroke.b, pen->stroke.a); return old_pen; *************** *** 171,174 **** --- 203,207 ---- pen->stroke.b = 0.0; pen->stroke.a = 1.0; + pen->lineWidth = 1.0; pen->next = RoadMapPenList; *************** *** 269,291 **** int size, int angle, const char *text) { - char buf[2048]; CGAffineTransform trans; float angle_f = (angle * -1.0f) * M_PI / 180.0f; float x = center->x * 1.0f; ! float y = center->y * 1.0f; CFStringRef string; string = CFStringCreateWithCString(NULL, text, kCFStringEncodingUTF8); ! CFStringGetCString(string, buf, 2048, kCFStringEncodingMacRoman); ! trans = CGAffineTransformMakeScale(1.0, -1.0); ! /* CGContextSelectFont (RoadMapGc, "Verdana", 14.0, kCGEncodingMacRoman); ! CGContextSetTextDrawingMode (RoadMapGc, kCGTextFill); ! */ ! CGAffineTransform rotatedTrans = CGAffineTransformRotate(trans, angle_f); ! CGContextSetTextMatrix(RoadMapGc, rotatedTrans); ! CGContextShowTextAtPoint(RoadMapGc, x, y, buf, strlen(buf)); ! } void roadmap_canvas_draw_multiple_points (int count, RoadMapGuiPoint *points) { --- 302,331 ---- int size, int angle, const char *text) { CGAffineTransform trans; float angle_f = (angle * -1.0f) * M_PI / 180.0f; float x = center->x * 1.0f; ! float y = CanvasHeight - center->y * 1.0f; ! float size_f = (size * 1.0f); ! UniChar buf[2048]; ! CGGlyph glyphs[2048]; CFStringRef string; + CGFontRef font = CGContextGetFont(RoadMapGc); + + CGContextSetFontSize(RoadMapGc, size_f); + string = CFStringCreateWithCString(NULL, text, kCFStringEncodingUTF8); ! CFIndex length = CFStringGetLength(string); ! if (length >= 2048) ! return; ! CFStringGetCharacters (string, CFRangeMake(0, length), buf); ! CGFontGetGlyphsForUnichars(font, buf, glyphs, length); ! ! trans = CGAffineTransformMakeRotation(angle_f); + CGContextSetTextMatrix(RoadMapGc, trans); + CGContextShowGlyphsAtPoint(RoadMapGc, x, y, glyphs, length); + } void roadmap_canvas_draw_multiple_points (int count, RoadMapGuiPoint *points) { *************** *** 337,343 **** (int count, int *polygons, RoadMapGuiPoint *points, int filled, int fast_draw) { - int i; - int x; int count_of_points; CGPoint cgpoints[1024]; --- 377,381 ---- *************** *** 384,388 **** int r = radius[i]; ! CGRect circle = CGRectMake(centers[i].x-r, centers[i].y-r, r*2, r*2); CGContextAddEllipseInRect(RoadMapGc, circle); if (filled) --- 422,426 ---- int r = radius[i]; ! CGRect circle = CGRectMake(centers[i].x-r, (CanvasHeight - centers[i].y)-r, r*2, r*2); CGContextAddEllipseInRect(RoadMapGc, circle); if (filled) *************** *** 451,467 **** int roadmap_canvas_width (void) { ! ! if (RoadMapDrawingArea == NULL) { ! return 0; ! } ! return [RoadMapDrawingArea frame].size.width; } int roadmap_canvas_height (void) { ! ! if (RoadMapDrawingArea == NULL) { ! return 0; ! } ! return [RoadMapDrawingArea frame].size.height; } --- 489,497 ---- int roadmap_canvas_width (void) { ! return CanvasWidth; } int roadmap_canvas_height (void) { ! return CanvasHeight; } *************** *** 483,498 **** -(RoadMapCanvasView *) initWithFrame: (struct CGRect) rect { self = [super initWithFrame: rect]; RoadMapDrawingArea = self; ! CGColorSpaceRef imageColorSpace = CGColorSpaceCreateDeviceRGB(); ! ! RoadMapGc = CGBitmapContextCreate(nil, rect.size.width, rect.size.height, 8, 0, imageColorSpace, kCGImageAlphaPremultipliedFirst); CGColorSpaceRelease(imageColorSpace); ! CGContextSelectFont (RoadMapGc, "Verdana", 14.0, kCGEncodingMacRoman); CGContextSetTextDrawingMode (RoadMapGc, kCGTextFill); (*RoadMapCanvasConfigure) (); --- 513,535 ---- -(RoadMapCanvasView *) initWithFrame: (struct CGRect) rect { + CanvasWidth = rect.size.width; + CanvasHeight = rect.size.height; self = [super initWithFrame: rect]; RoadMapDrawingArea = self; ! CGColorSpaceRef imageColorSpace = CGColorSpaceCreateDeviceRGB(); ! RoadMapGc = CGBitmapContextCreate(nil, CanvasWidth, CanvasHeight, 8, 0, imageColorSpace, kCGImageAlphaPremultipliedFirst); CGColorSpaceRelease(imageColorSpace); ! CGFontRef font = CGFontCreateWithFontName((CFStringRef)@"arialuni") ; ! CGContextSetFont(RoadMapGc, font); CGContextSetTextDrawingMode (RoadMapGc, kCGTextFill); + CGContextSetLineCap(RoadMapGc, kCGLineCapRound); + + mainLayer = [[LKLayer layer] retain]; + [mainLayer setFrame: rect]; + [self._layer addSublayer: mainLayer]; (*RoadMapCanvasConfigure) (); *************** *** 506,512 **** /* CGBitmapContextCreateImage might use copy-on-change so if we're lucky no copy is actually made! */ ! CGImageRef image = CGBitmapContextCreateImage (RoadMapGc); ! CGContextDrawImage (UICurrentContext(), [self frame], image); ! CGImageRelease(image); } } --- 543,549 ---- /* CGBitmapContextCreateImage might use copy-on-change so if we're lucky no copy is actually made! */ ! CGImageRef ref = CGBitmapContextCreateImage(RoadMapGc); ! [mainLayer setContents: (id)ref]; ! CGImageRelease(ref); } } Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/iphone/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 4 May 2008 16:49:21 -0000 1.1 --- Makefile 20 Jun 2008 13:09:19 -0000 1.2 *************** *** 51,54 **** --- 51,55 ---- cp Info.plist.roadmap $(INSTALLDIR)/Info.plist cp ../icons/iphone_default.png $(INSTALLDIR)/icon.png + cp -r ../icons $(INSTALLDIR)/resources/pixmaps uninstall: Index: roadmap_iphonemain.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/iphone/roadmap_iphonemain.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_iphonemain.h 4 May 2008 16:49:21 -0000 1.1 --- roadmap_iphonemain.h 20 Jun 2008 13:09:19 -0000 1.2 *************** *** 50,53 **** --- 50,55 ---- @interface RoadMapApp : UIApplication { } + -(void)buttonBarItemTapped:(id) sender; + -(UIButtonBar *)createButtonBar; -(void) newWithTitle: (const char *)title andWidth: (int) width andHeight: (int) height; -(void) ioCallback: (id) notify; |
|
From: Danny B. <dan...@us...> - 2008-06-19 19:42:20
|
Update of /cvsroot/roadmap/roadmap/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21589 Modified Files: Makefile Log Message: Reverse the comment about tools Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/win32/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile 30 May 2008 08:02:23 -0000 1.11 --- Makefile 19 Jun 2008 19:42:17 -0000 1.12 *************** *** 2,14 **** # WinCE Makefile, based around the arm-wince-mingw32ce cross toolchain, # which comes from http://cegcc.sourceforge.net/ ! # Code built this way *DOES NOT WORK* as of july 2007. # The code may work if built with microsoft tools, in which case this # makefile isn't used, and the project files under wince_env/ may ! # need updating. ! # ! # support for win32 and wince is better in the roadmap_editor ! # branch of RoadMap CVS, so it's probably worth looking there for ! # fixes if things are really obviously broken. that branch only ! # uses native windows tools, though -- not mingw32ce. # --- 2,10 ---- # WinCE Makefile, based around the arm-wince-mingw32ce cross toolchain, # which comes from http://cegcc.sourceforge.net/ ! # Code built this way is known to work. ! # # The code may work if built with microsoft tools, in which case this # makefile isn't used, and the project files under wince_env/ may ! # need updating. Not tested recently. # |
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21334 Modified Files: roadgps_screen.c roadgps_start.c roadmap_download.c roadmap_preferences.c roadmap_screen.c roadmap_start.c roadmap_start.h Log Message: separate "manual" screen updates from "automatic" updates, so that GPS updates don't continuously cause the current update to be interrupted. roadgps_screen.c also contains sun/moon position changes. Index: roadmap_download.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_download.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_download.c 15 May 2008 00:12:02 -0000 1.20 --- roadmap_download.c 17 Jun 2008 01:30:13 -0000 1.21 *************** *** 701,705 **** roadmap_file_remove (NULL, path); ! roadmap_start_request_repaint_map (); roadmap_download_delete_populate (); --- 701,705 ---- roadmap_file_remove (NULL, path); ! roadmap_start_request_repaint_map (REPAINT_NOW); roadmap_download_delete_populate (); Index: roadgps_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadgps_screen.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** roadgps_screen.c 15 May 2008 00:46:39 -0000 1.22 --- roadgps_screen.c 17 Jun 2008 01:30:13 -0000 1.23 *************** *** 41,44 **** --- 41,45 ---- #include "roadmap_canvas.h" #include "roadgps_screen.h" + #include "roadmap_sunrise.h" static RoadMapConfigDescriptor RoadMapConfigGPSBackground = *************** *** 140,143 **** --- 141,146 ---- RoadMapPen RoadGpsLabels; RoadMapPen RoadGpsValues; + RoadMapPen RoadGpsMoonPen; + RoadMapPen RoadGpsSunPen; int RoadMapGPSFontSize; *************** *** 167,170 **** --- 170,214 ---- } + static void roadgps_screen_draw_sunmoon_position () + { + double scale = 0.0; + double azimuth, elevation; + + RoadMapGuiPoint centers[1]; + int radius[1]; + + roadmap_sunposition(&RoadGpsPosition, &azimuth, &elevation); + if (elevation > 0.0) + { + + scale = RoadGpsFrame.position_scale * (90 - elevation) / 90; + + azimuth *= DEGRE2RADIAN; + + centers[0].x = RoadGpsFrame.centers[0].x + (short) (sin(azimuth) * scale); + centers[0].y = RoadGpsFrame.centers[0].y - (short) (cos(azimuth) * scale); + + radius[0]=10; + roadmap_canvas_select_pen (RoadGpsSunPen); + roadmap_canvas_draw_multiple_circles (1, centers, radius, 1, 0); + + } + + roadmap_moonposition(&RoadGpsPosition, &azimuth, &elevation); + if (elevation > 0.0) + { + scale = RoadGpsFrame.position_scale * (90 - elevation) / 90; + + azimuth *= DEGRE2RADIAN; + + centers[0].x = RoadGpsFrame.centers[0].x + (short) (sin(azimuth) * scale); + centers[0].y = RoadGpsFrame.centers[0].y - (short) (cos(azimuth) * scale); + + radius[0]=10; + roadmap_canvas_select_pen (RoadGpsMoonPen); + roadmap_canvas_draw_multiple_circles (1, centers, radius, 1, 0); + } + } + static void roadgps_screen_draw_satellite_position *************** *** 483,486 **** --- 527,533 ---- } + if (RoadMapGpsReceivedTime != 0) { + roadgps_screen_draw_sunmoon_position(); + } roadgps_screen_draw_position(); roadmap_canvas_refresh (); *************** *** 489,493 **** void roadgps_screen_request_repaint(void) { ! roadmap_start_request_repaint(ROADMAP_GPS); } --- 536,540 ---- void roadgps_screen_request_repaint(void) { ! roadmap_start_request_repaint(ROADMAP_GPS, 1); } *************** *** 678,681 **** --- 725,738 ---- (roadmap_config_get (&RoadMapConfigGPSInactiveFill)); + RoadGpsSunPen = roadmap_canvas_create_pen ("gps/sun"); + roadmap_canvas_set_thickness (2); + roadmap_canvas_set_foreground + ("yellow"); + + RoadGpsMoonPen = roadmap_canvas_create_pen ("gps/moon"); + roadmap_canvas_set_thickness (2); + roadmap_canvas_set_foreground + ("LightYellow"); + RoadGpsActiveLabels = roadmap_canvas_create_pen ("gps/activelabels"); roadmap_canvas_set_thickness (2); *************** *** 736,739 **** --- 793,797 ---- roadmap_gps_register_listener (roadgps_screen_listener); + RoadMapGpsReceivedTime = time(NULL); } Index: roadmap_start.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_start.h 27 Apr 2008 00:08:55 -0000 1.7 --- roadmap_start.h 17 Jun 2008 01:30:13 -0000 1.8 *************** *** 46,53 **** int roadmap_start_return_to_map(void); void roadmap_start_do_callback(RoadMapCallback cb); int roadmap_start_repaint_scheduled(void); ! void roadmap_start_request_repaint_map (void); ! void roadmap_start_request_repaint (int screen); #define ROADMAP_MAP 1 #define ROADMAP_GPS 2 --- 46,59 ---- int roadmap_start_return_to_map(void); void roadmap_start_do_callback(RoadMapCallback cb); + + enum { + REPAINT_NOT_NEEDED = 0, + REPAINT_MAYBE, + REPAINT_NOW + }; int roadmap_start_repaint_scheduled(void); ! void roadmap_start_request_repaint_map (int interrupt); ! void roadmap_start_request_repaint (int screen, int priority); #define ROADMAP_MAP 1 #define ROADMAP_GPS 2 Index: roadgps_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadgps_start.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** roadgps_start.c 14 Jun 2008 06:02:01 -0000 1.24 --- roadgps_start.c 17 Jun 2008 01:30:13 -0000 1.25 *************** *** 234,238 **** } ! void roadmap_start_request_repaint (int screen) { roadgps_screen_draw(); --- 234,238 ---- } ! void roadmap_start_request_repaint (int screen, int priority) { roadgps_screen_draw(); Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.142 retrieving revision 1.143 diff -C2 -d -r1.142 -r1.143 *** roadmap_start.c 30 May 2008 16:23:25 -0000 1.142 --- roadmap_start.c 17 Jun 2008 01:30:13 -0000 1.143 *************** *** 248,251 **** --- 248,255 ---- } + void roadmap_start_download_done_callback(void) { + roadmap_start_request_repaint_map (REPAINT_NOW); + } + static void roadmap_start_toggle_download (void) { *************** *** 272,281 **** } ! roadmap_download_subscribe_when_done (roadmap_start_request_repaint_map); roadmap_locator_declare_downloader (roadmap_download_get_county); roadmap_download_unblock_all (); } ! roadmap_start_request_repaint_map (); } --- 276,286 ---- } ! roadmap_download_subscribe_when_done ! (roadmap_start_download_done_callback); roadmap_locator_declare_downloader (roadmap_download_get_county); roadmap_download_unblock_all (); } ! roadmap_start_request_repaint_map (REPAINT_NOW); } *************** *** 298,302 **** if (RoadMapStartScreenActive != ROADMAP_MAP) { RoadMapStartScreenActive = ROADMAP_MAP; ! roadmap_start_request_repaint(ROADMAP_MAP); return 1; } --- 303,307 ---- if (RoadMapStartScreenActive != ROADMAP_MAP) { RoadMapStartScreenActive = ROADMAP_MAP; ! roadmap_start_request_repaint(ROADMAP_MAP, 1); return 1; } *************** *** 306,310 **** void roadmap_start_gps_console(void) { RoadMapStartScreenActive = ROADMAP_GPS; ! roadmap_start_request_repaint(ROADMAP_GPS); } --- 311,315 ---- void roadmap_start_gps_console(void) { RoadMapStartScreenActive = ROADMAP_GPS; ! roadmap_start_request_repaint(ROADMAP_GPS, 1); } *************** *** 347,351 **** ! static int RoadMapStartRepaintNeeded; static int RoadMapStartIdleInstalled; --- 352,356 ---- ! static int RoadMapStartRepaintNeeded = REPAINT_NOT_NEEDED; static int RoadMapStartIdleInstalled; *************** *** 357,364 **** static void roadmap_start_repaint_if_requested(void) { ! // fprintf(stderr, "start_repaint_if_requested: req is %d\n", RoadMapStartRepaintNeeded); ! while (RoadMapStartRepaintNeeded) { ! RoadMapStartRepaintNeeded = 0; if (RoadMapStartScreenActive == ROADMAP_MAP) { --- 362,368 ---- static void roadmap_start_repaint_if_requested(void) { ! while (RoadMapStartRepaintNeeded != REPAINT_NOT_NEEDED) { ! RoadMapStartRepaintNeeded = REPAINT_NOT_NEEDED; if (RoadMapStartScreenActive == ROADMAP_MAP) { *************** *** 373,385 **** } ! void roadmap_start_request_repaint (int which_screen) { ! /* the repaint is actually invoked via the gui's mainloop ! * idle routine. we need to install and remove this routine * on an as-needed basis, because otherwise installing something * in the gui's idle loop causes it to eat CPU (i.e., it can't * sleep -- it has to spin.) */ - // fprintf(stderr, "requesting repaint was %d", RoadMapStartRepaintNeeded); if (RoadMapStartScreenActive == which_screen) { if (!RoadMapStartIdleInstalled) { --- 377,400 ---- } ! /* The "which_screen" parameter tells us whether we're being ! * asked to upgrade the regular map screen or the gps console ! * screen. There's no point in rendering a hidden screen. The ! * "priority" parameter tells us (usually) whether the requested ! * repaint was user-initiated or not. The difference is in ! * whether we interrupt a repaint already in progress or not: we ! * assume the user wants instant gratification, and so we'll ! * interrupt an in-progress repaint. A repaint requested because ! * the GPS moved, or because the time changed, is lower priority, ! * and won't happen unless there's nothing else to do. That's ! * the theory anyway. ! */ ! void roadmap_start_request_repaint (int which_screen, int priority) { ! /* The repaint is actually invoked via the gui's mainloop ! * idle routine. We need to install and remove this routine * on an as-needed basis, because otherwise installing something * in the gui's idle loop causes it to eat CPU (i.e., it can't * sleep -- it has to spin.) */ if (RoadMapStartScreenActive == which_screen) { if (!RoadMapStartIdleInstalled) { *************** *** 387,399 **** RoadMapStartIdleInstalled = 1; } ! RoadMapStartRepaintNeeded = 1; } - - // fprintf(stderr, ".. is %d\n", RoadMapStartRepaintNeeded); } ! void roadmap_start_request_repaint_map (void) { ! roadmap_start_request_repaint (ROADMAP_MAP); } --- 402,412 ---- RoadMapStartIdleInstalled = 1; } ! RoadMapStartRepaintNeeded = priority ? REPAINT_NOW : REPAINT_MAYBE; } } ! void roadmap_start_request_repaint_map (int priority) { ! roadmap_start_request_repaint (ROADMAP_MAP, priority); } *************** *** 1437,1441 **** roadmap_main_set_periodic (period, roadmap_start_periodic); ! roadmap_start_request_repaint_map (); } --- 1450,1454 ---- roadmap_main_set_periodic (period, roadmap_start_periodic); ! roadmap_start_request_repaint_map (REPAINT_NOW); } Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** roadmap_screen.c 15 Jun 2008 16:09:58 -0000 1.128 --- roadmap_screen.c 17 Jun 2008 01:30:13 -0000 1.129 *************** *** 774,779 **** * them in a temporary buffer, and reverse them below. */ ! shape_points = realloc(shape_points, ! (last_shape - first_shape + 1) * sizeof (*shape_points)); shape_ptr = shape_points; } else { --- 774,780 ---- * them in a temporary buffer, and reverse them below. */ ! int shape_points_size = ! (last_shape - first_shape + 1) * sizeof(*shape_points); ! shape_points = realloc(shape_points, shape_points_size); shape_ptr = shape_points; } else { *************** *** 1368,1372 **** if (!RoadMapScreenDragging && roadmap_screen_busy_check(total, progress)) { ! if (roadmap_start_repaint_scheduled()) { if (progress < (3 * total) / 4) { return 1; --- 1369,1373 ---- if (!RoadMapScreenDragging && roadmap_screen_busy_check(total, progress)) { ! if (roadmap_start_repaint_scheduled() == REPAINT_NOW) { if (progress < (3 * total) / 4) { return 1; *************** *** 1599,1603 **** if (RoadMapScreenInitialized) { ! roadmap_start_request_repaint_map(); } --- 1600,1604 ---- if (RoadMapScreenInitialized) { ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1625,1629 **** roadmap_display_activate ("Selected Street", &line, &position, &street); ! roadmap_start_request_repaint_map(); } --- 1626,1630 ---- roadmap_display_activate ("Selected Street", &line, &position, &street); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1753,1761 **** /* debug support: set to 'printf' to be told why a refresh occurred */ // #define REPORT_REFRESH(x) fprintf(stderr, "%s\n", x) ! #define REPORT_REFRESH(x) 1 void roadmap_screen_refresh (void) { int refresh = 0; roadmap_log_push ("roadmap_screen_refresh"); --- 1754,1763 ---- /* debug support: set to 'printf' to be told why a refresh occurred */ // #define REPORT_REFRESH(x) fprintf(stderr, "%s\n", x) ! #define REPORT_REFRESH(x) void roadmap_screen_refresh (void) { int refresh = 0; + int force_refresh = REPAINT_MAYBE; roadmap_log_push ("roadmap_screen_refresh"); *************** *** 1765,1769 **** roadmap_screen_reset_delta (); roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! refresh = 1 && REPORT_REFRESH ("focus changed"); if (RoadMapScreenOrientationDynamic) { --- 1767,1772 ---- roadmap_screen_reset_delta (); roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! force_refresh = REPAINT_NOW; ! REPORT_REFRESH ("focus changed"); if (RoadMapScreenOrientationDynamic) { *************** *** 1775,1779 **** roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! refresh |= 1 && REPORT_REFRESH("focus moved"); if (!RoadMapScreenOrientationDynamic) --- 1778,1783 ---- roadmap_math_set_center (roadmap_trip_get_focus_position ()); ! refresh = 1; ! REPORT_REFRESH("focus moved"); if (!RoadMapScreenOrientationDynamic) *************** *** 1801,1817 **** * probably use a callback registration system for this.) */ ! refresh |= roadmap_config_match (&RoadMapConfigMapRefresh, "forced") && REPORT_REFRESH( "forced\n" ); ! refresh |= roadmap_trip_is_refresh_needed() && REPORT_REFRESH( "trip\n" ); ! refresh |= roadmap_landmark_is_refresh_needed() && REPORT_REFRESH( "landmark\n" ); ! refresh |= roadmap_track_is_refresh_needed() && REPORT_REFRESH( "track\n" ); ! refresh |= roadmap_display_is_refresh_needed() && REPORT_REFRESH( "display\n" ); ! if (refresh) roadmap_start_request_repaint_map(); roadmap_log_pop (); --- 1805,1832 ---- * probably use a callback registration system for this.) */ ! if (roadmap_config_match (&RoadMapConfigMapRefresh, "forced")) { ! force_refresh = REPAINT_NOW; REPORT_REFRESH( "forced\n" ); ! } ! if (roadmap_trip_is_refresh_needed()) { ! force_refresh = REPAINT_NOW; REPORT_REFRESH( "trip\n" ); ! } ! if (roadmap_landmark_is_refresh_needed()) { ! force_refresh = REPAINT_NOW; REPORT_REFRESH( "landmark\n" ); ! } ! if (roadmap_track_is_refresh_needed()) { ! refresh = 1; REPORT_REFRESH( "track\n" ); ! } ! if (roadmap_display_is_refresh_needed()) { ! refresh = 1; REPORT_REFRESH( "display\n" ); + } ! if (refresh || force_refresh != REPAINT_NOT_NEEDED) ! roadmap_start_request_repaint_map(force_refresh); roadmap_log_pop (); *************** *** 1829,1833 **** RoadMapScreenFrozen = 0; ! roadmap_start_request_repaint_map(); } --- 1844,1848 ---- RoadMapScreenFrozen = 0; ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1862,1866 **** roadmap_math_set_orientation (calculated_rotation); RoadMapScreenRotation = rotation; ! roadmap_start_request_repaint_map(); } --- 1877,1881 ---- roadmap_math_set_orientation (calculated_rotation); RoadMapScreenRotation = rotation; ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1882,1886 **** VIEW_MODE_3D : VIEW_MODE_2D; roadmap_screen_set_horizon(); ! roadmap_start_request_repaint_map(); } --- 1897,1901 ---- VIEW_MODE_3D : VIEW_MODE_2D; roadmap_screen_set_horizon(); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1888,1892 **** RoadMapScreenLabels = ! RoadMapScreenLabels; ! roadmap_start_request_repaint_map(); } --- 1903,1907 ---- RoadMapScreenLabels = ! RoadMapScreenLabels; ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1909,1913 **** RoadMapScreen3dHorizon += 100; roadmap_math_set_horizon (RoadMapScreen3dHorizon); ! roadmap_start_request_repaint_map(); } --- 1924,1928 ---- RoadMapScreen3dHorizon += 100; roadmap_math_set_horizon (RoadMapScreen3dHorizon); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1919,1923 **** RoadMapScreen3dHorizon -= 100; roadmap_math_set_horizon (RoadMapScreen3dHorizon); ! roadmap_start_request_repaint_map(); } --- 1934,1938 ---- RoadMapScreen3dHorizon -= 100; roadmap_math_set_horizon (RoadMapScreen3dHorizon); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1928,1932 **** roadmap_screen_record_move (0, 0 - (RoadMapScreenHeight / FRACMOVE)); ! roadmap_start_request_repaint_map(); } --- 1943,1947 ---- roadmap_screen_record_move (0, 0 - (RoadMapScreenHeight / FRACMOVE)); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1935,1939 **** roadmap_screen_record_move (0, RoadMapScreenHeight / FRACMOVE); ! roadmap_start_request_repaint_map(); } --- 1950,1954 ---- roadmap_screen_record_move (0, RoadMapScreenHeight / FRACMOVE); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1942,1946 **** roadmap_screen_record_move (RoadMapScreenHeight / FRACMOVE, 0); ! roadmap_start_request_repaint_map(); } --- 1957,1961 ---- roadmap_screen_record_move (RoadMapScreenHeight / FRACMOVE, 0); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1949,1953 **** roadmap_screen_record_move (0 - (RoadMapScreenHeight / FRACMOVE), 0); ! roadmap_start_request_repaint_map(); } --- 1964,1968 ---- roadmap_screen_record_move (0 - (RoadMapScreenHeight / FRACMOVE), 0); ! roadmap_start_request_repaint_map(REPAINT_NOW); } *************** *** 1958,1962 **** roadmap_layer_adjust (); roadmap_math_compute_scale (); ! roadmap_start_request_repaint_map(); roadmap_screen_refresh(); } --- 1973,1977 ---- roadmap_layer_adjust (); roadmap_math_compute_scale (); ! roadmap_start_request_repaint_map(REPAINT_NOW); roadmap_screen_refresh(); } *************** *** 1970,1974 **** roadmap_layer_adjust (); roadmap_math_compute_scale (); ! roadmap_start_request_repaint_map(); roadmap_screen_refresh(); } --- 1985,1989 ---- roadmap_layer_adjust (); roadmap_math_compute_scale (); ! roadmap_start_request_repaint_map(REPAINT_NOW); roadmap_screen_refresh(); } *************** *** 1982,1986 **** roadmap_layer_adjust (); roadmap_math_compute_scale (); ! roadmap_start_request_repaint_map(); roadmap_screen_refresh(); } --- 1997,2001 ---- roadmap_layer_adjust (); roadmap_math_compute_scale (); ! roadmap_start_request_repaint_map(REPAINT_NOW); roadmap_screen_refresh(); } *************** *** 2019,2022 **** --- 2034,2040 ---- } + void roadmap_screen_state_refresh(void) { + roadmap_start_request_repaint_map(REPAINT_MAYBE); + } void roadmap_screen_initialize (void) { *************** *** 2087,2091 **** roadmap_state_add ("get_orientation", &roadmap_screen_get_orientation_mode); ! roadmap_state_monitor (&roadmap_start_request_repaint_map); } --- 2105,2110 ---- roadmap_state_add ("get_orientation", &roadmap_screen_get_orientation_mode); ! roadmap_state_monitor (&roadmap_screen_state_refresh); ! } Index: roadmap_preferences.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_preferences.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** roadmap_preferences.c 27 Apr 2008 00:08:55 -0000 1.14 --- roadmap_preferences.c 17 Jun 2008 01:30:13 -0000 1.15 *************** *** 75,79 **** roadmap_dialog_hide (name); ! roadmap_start_request_repaint_map (); } --- 75,79 ---- roadmap_dialog_hide (name); ! roadmap_start_request_repaint_map (REPAINT_NOW); } |
|
From: Paul F. <pg...@us...> - 2008-06-17 01:27:58
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20880 Modified Files: roadmap_sunrise.h Log Message: add sun and moon positions to gps console (Morten Bek) Index: roadmap_sunrise.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_sunrise.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_sunrise.h 29 Nov 2003 18:07:27 -0000 1.1 --- roadmap_sunrise.h 17 Jun 2008 01:27:55 -0000 1.2 *************** *** 47,50 **** --- 47,56 ---- time_t roadmap_sunrise (const RoadMapGpsPosition *position); time_t roadmap_sunset (const RoadMapGpsPosition *position); + void roadmap_moonposition( + const RoadMapGpsPosition *position, + double *azimuth, double *elevation); + void roadmap_sunposition( + const RoadMapGpsPosition *position, + double *azimuth, double *elevation); #endif // INCLUDE__ROADMAP_SUNRISE_H |
|
From: Paul F. <pg...@us...> - 2008-06-17 01:27:08
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20462 Modified Files: roadmap_sunrise.c Log Message: add sun and moon positions to gps console (Morten Bek) Index: roadmap_sunrise.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_sunrise.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_sunrise.c 15 Jul 2005 21:29:20 -0000 1.7 --- roadmap_sunrise.c 17 Jun 2008 01:27:01 -0000 1.8 *************** *** 25,28 **** --- 25,34 ---- * * see roadmap_sunrise.h + * + * Sun and moon position calculations are (simplified) from: + * http://www.satellite-calculations.com/Satellite/suncalc.htm + * who got the actual formulas from the terrific site: + * http://www.stjarnhimlen.se/comp/tutorial.html + * (This implementation by Morten Bek.) */ *************** *** 109,112 **** --- 115,350 ---- } + static double rad(double deg) + { + return (deg * RADIANS); + } + + static double deg(double rad) + { + return( rad * DEGREES); + } + + static double Rev(double number) + { + double x; + x= number - floor(number/360.0)*360 ; + return x; + } + + static int dayofyear(int year, int month, int day) + { + int x; + int monthday[] = {0,31,59,90,120,151,181,212,243,273,304,334}; + + x = monthday[month-1] + day; + if ((year%4 == 0) && ((year%100!=0)||(year%400==0)) && (month>2)) + x++; + return x; + } + + void roadmap_sunposition( + const RoadMapGpsPosition *position, + double *azimuth, double *height) + { + time_t gmt; + struct tm curtime; + int year, month, day, hour, min, sec; + double J, J2; + double Zgl, MOZ, WOZ, w; + double decl; + double sunaz, sunhi; + double asinGs; + double acosAs; + double lat = LU_TO_DEG(position->latitude); + double lon = LU_TO_DEG(position->longitude); + + if (azimuth == NULL || height == NULL) + return; + + time(&gmt); + + curtime = *(gmtime(&gmt)); + year = curtime.tm_year + 1900; + month = curtime.tm_mon+1; + day = curtime.tm_mday; + hour = curtime.tm_hour; + min = curtime.tm_min; + sec = curtime.tm_sec; + + J2 = 365; + if (year % 4 == 0) J2++; + J = dayofyear(year, month, day); + MOZ = hour + min/60.0 + sec/3600.0; + MOZ += lon / 15.0; + J = J * 360 / J2 + MOZ / 24; + decl = 0.3948 - 23.2559 * cos(rad(J + 9.1)) - 0.3915 * cos(rad(2 * J + 5.4)) - 0.1764 * cos(rad(3 * J + 26.0)); + Zgl = 0.0066 + 7.3525 * cos(rad(J + 85.9)) + 9.9359 * cos(rad(2 * J + 108.9)) + 0.3387 * cos(rad(3 * J + 105.2)); + WOZ = MOZ + Zgl / 60; + w = (12 - WOZ) * 15; + asinGs = cos(rad(w)) * cos(rad(lat)) * cos(rad(decl)) + sin(rad(lat)) * sin(rad(decl)); + if (asinGs > 1) asinGs = 1; + if (asinGs < -1) asinGs = -1; + sunhi = deg(asin(asinGs)); + acosAs = (sin(rad(sunhi)) * sin(rad(lat)) - sin(rad(decl))) / (cos(rad(sunhi)) * cos(rad(lat))); + if (acosAs > 1) acosAs = 1; + if (acosAs < -1) acosAs = -1; + sunaz = deg(acos(acosAs)); + if ((WOZ > 12) || (WOZ < 0)) { + sunaz = 180 + sunaz; + } else { + sunaz = 180 - sunaz; + }; + *azimuth = sunaz; + *height = sunhi; + } + + void roadmap_moonposition( + const RoadMapGpsPosition *position, + double *azimuth, double *elevation) + { + double HourAngle,SIDEREALTIME; + double w,a,e,M,N,oblecl,E,x,y,r,v,sunlon,z,xequat,yequat,zequat,GMST0,UT; + double xhor,yhor,zhor; + double E0,E1,xeclip,yeclip,zeclip,Ls; + double Moon_RA,Moon_Decl; + double xh,yh,zh,Iterations,E_error,Ebeforeit,Eafterit,E_ErrorBefore; + + double lat = LU_TO_DEG(position->latitude); + double lon = LU_TO_DEG(position->longitude); + int d_int; + + time_t gmt; + struct tm curtime; + int year, month, day, hour, min, sec; + double wsun, Msun, d, i; + double moon_longitude, moon_latitude; + + if (azimuth == NULL || elevation == NULL) + return; + + time(&gmt); + + curtime = *(gmtime(&gmt)); + year = curtime.tm_year + 1900; + month = curtime.tm_mon+1; + day = curtime.tm_mday; + hour = curtime.tm_hour; + min = curtime.tm_min; + sec = curtime.tm_sec; + + d_int = 367*year - (7*(year + ((month+9)/12)))/4 + (275*month)/9 + day - 730530; + d = d_int + (hour * 3600 + min * 60 + sec) / 86400.0; + + //*********CALCULATE Moon DATA ********************* + N=125.1228-0.0529538083*d; + i=5.1454; + + w=318.0634 + 0.1643573223 * d ; + a=60.2666; + + e= 0.054900; + M= 115.3654 + 13.0649929509 * d; + + w=Rev(w); + M=Rev(M); + N=Rev(N); + + + + E=M+ DEGREES*e*sin(RADIANS * M)*(1+e * cos(RADIANS*M)); + E=Rev(E); + + Ebeforeit=E; + + // now iterate until difference between E0 and E1 is less than 0.005_deg + // use E0, calculate E1 + + Iterations=0; + E_error=9; + + while ((E_error>0.0005) && (Iterations<20)) + { + Iterations=Iterations+1; + E0=E; + E1= E0-(E0-DEGREES*e*sin(RADIANS*E0)-M) / (1-e * cos(RADIANS*E0)) ; + E=Rev(E1); + + Eafterit=E; + + if (E<E0) E_error=E0-E; + else E_error=E-E0; + + + if (E<Ebeforeit) E_ErrorBefore=Ebeforeit-E; + else E_ErrorBefore=E-Ebeforeit; + + } + + x= a*(cos(RADIANS*E) -e) ; + y= a*sin(RADIANS * (Rev(E)))*sqrt(1-e*e); + r=sqrt(x*x+y*y); + v=deg(atan2(y,x)); + + sunlon=Rev(v+w); + + x=r*cos(RADIANS * sunlon); + y=r*sin(RADIANS * sunlon); + z=0; + + xeclip=r*( cos(rad(N))*cos(rad(v+w)) - sin(rad(N)) * sin(rad(v+w))*cos(rad(i)) ); + yeclip=r*( sin(rad(N))*cos(rad(v+w)) + cos(rad(N)) * sin(rad(v+w))*cos(rad(i)) ); + zeclip=r*sin(rad(v+w))*sin(rad(i)); + + moon_longitude=Rev(deg(atan2(yeclip,xeclip))); + moon_latitude=deg(atan2(zeclip,sqrt(xeclip*xeclip +yeclip*yeclip ) )); + + // printf ("lon: %f, lat: %f\n", moon_longitude, moon_latitude); + // get the Eliptic coordinates + + oblecl=23.4393 -3.563E-7 * d ; + xh=r*cos(rad(moon_longitude))*cos(rad(moon_latitude)); + yh=r*sin(rad(moon_longitude))*cos(rad(moon_latitude)); + zh=r*sin(rad(moon_latitude)); + // rotate to rectangular equatorial coordinates + xequat=xh; + yequat=yh*cos(rad(oblecl))-zh*sin(rad(oblecl)); + zequat=yh*sin(rad(oblecl))+zh*cos(rad(oblecl)); + + Moon_RA=Rev(deg(atan2(yequat,xequat))); + Moon_Decl=deg(atan2(zequat,sqrt(xequat*xequat + yequat*yequat ) )); + + wsun=282.9404 + 4.70935E-5 * d ; + Msun= 356.0470 + 0.9856002585 * d; + Ls=wsun+Rev(Msun); + + Ls=Rev(Ls); + + GMST0=(Ls+180); + + + //*********CALCULATE TIME ********************* + + UT=d-floor(d); + + SIDEREALTIME=GMST0+UT*360+lon; + HourAngle=SIDEREALTIME-Moon_RA; + + + x=cos(HourAngle*RADIANS) * cos(Moon_Decl*RADIANS); + y=sin(HourAngle*RADIANS) * cos(Moon_Decl*RADIANS); + z=sin(Moon_Decl*RADIANS); + + xhor=x*sin(lat*RADIANS) - z*cos(lat*RADIANS); + yhor=y; + zhor=x*cos(lat*RADIANS) + z*sin(lat*RADIANS); + + *elevation=deg(asin(zhor)); + *elevation-=deg(asin( 1/r * cos(rad(*elevation)))); + + *azimuth=deg(atan2(yhor,xhor)); + //if (lat<0) + *azimuth+=180; + + } /* Calling parameters: *************** *** 331,334 **** --- 569,579 ---- printf("current date/time: %s", asctime(realtime)); + double a, b; + roadmap_sunposition(&position, &a, &b); + printf ("Sun azimuth: %.2f\nSun elevation: %.2f\n", a, b); + + roadmap_moonposition(&position, &a, &b); + printf ("Moon azimuth: %.2f\nMoon elevation: %.2f\n", a, b); + rawtime = roadmap_sunrise (&position); realtime = localtime(&rawtime); |
|
From: Paul F. <pg...@us...> - 2008-06-17 01:15:27
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17286 Modified Files: options.mk Log Message: don't set NDEBUG unconditionally Index: options.mk =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/options.mk,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** options.mk 22 May 2008 17:42:04 -0000 1.26 --- options.mk 17 Jun 2008 01:15:24 -0000 1.27 *************** *** 250,254 **** LIBS := $(LIBS) -lm else ! CFLAGS += -I$(TOP) -I/usr/local/include -DNDEBUG \ -D_TXT=\"\" -D_EXE=\"\" LIBS := -L/usr/local/lib $(LIBS) -lm --- 250,254 ---- LIBS := $(LIBS) -lm else ! CFLAGS += -I$(TOP) -I/usr/local/include \ -D_TXT=\"\" -D_EXE=\"\" LIBS := -L/usr/local/lib $(LIBS) -lm |
|
From: Paul F. <pg...@us...> - 2008-06-15 17:36:21
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16006 Modified Files: roadmap_locator.c roadmap_osm.c Log Message: use realloc rather than malloc to be sure we track changes to the array size that might have happened in roadmap_osm.c Index: roadmap_locator.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_locator.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** roadmap_locator.c 27 Feb 2008 03:57:43 -0000 1.23 --- roadmap_locator.c 15 Jun 2008 17:36:14 -0000 1.24 *************** *** 300,307 **** count = roadmap_county_count(); ! if (*fipslistp == NULL) { ! *fipslistp = malloc (count * sizeof(int)); ! roadmap_check_allocated(*fipslistp); ! } return count; --- 300,308 ---- count = roadmap_county_count(); ! /* note that this can also be resized during tile splitting in ! * roadmap_osm.c -- see usage of roadmap_osm_tilelist in that file. ! */ ! *fipslistp = realloc (*fipslistp, count * sizeof(int)); ! roadmap_check_allocated(*fipslistp); return count; Index: roadmap_osm.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_osm.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_osm.c 2 Mar 2008 15:27:16 -0000 1.5 --- roadmap_osm.c 15 Jun 2008 17:36:14 -0000 1.6 *************** *** 246,249 **** --- 246,255 ---- + /* these aren't really the "master home" of these pointers. they're + * static simply to simplify the parameters used in the recursive tile + * splitting. they actually are set/restored from the *fips parameter + * in roadmap_osm_by_position(), and so are really the same as the fipslistp + * passed from roadmap_locator.c + */ static int *roadmap_osm_tilelist; static int roadmap_osm_tilelist_len; |
|
From: Paul F. <pg...@us...> - 2008-06-15 16:10:13
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16167 Modified Files: roadmap_screen.c Log Message: eliminate previous_point pointer, which kept dangling into realloc'ed buffer. Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** roadmap_screen.c 15 Jun 2008 15:35:51 -0000 1.127 --- roadmap_screen.c 15 Jun 2008 16:09:58 -0000 1.128 *************** *** 605,609 **** RoadMapPosition position, *startpos, *endpos; RoadMapGuiPoint *polystart; ! RoadMapGuiPoint *previous_point; RoadMapGuiPoint *shape_ptr; static RoadMapGuiPoint *shape_points; --- 605,609 ---- RoadMapPosition position, *startpos, *endpos; RoadMapGuiPoint *polystart; ! RoadMapGuiPoint prev_point; RoadMapGuiPoint *shape_ptr; static RoadMapGuiPoint *shape_points; *************** *** 673,677 **** polystart = LinePoints.cursor; ! previous_point = &null_point; /* for every line in the polygon... */ --- 673,677 ---- polystart = LinePoints.cursor; ! prev_point = null_point; /* for every line in the polygon... */ *************** *** 702,706 **** (unsigned)(LinePoints.end - LinePoints.cursor)) { ! int polyoff, prevoff; /* since roadmap_screen_pb_init() may --- 702,706 ---- (unsigned)(LinePoints.end - LinePoints.cursor)) { ! int polyoff; /* since roadmap_screen_pb_init() may *************** *** 708,723 **** */ polyoff = polystart - LinePoints.data; - prevoff = previous_point - LinePoints.data; roadmap_screen_pb_init (&LinePoints, 0); polystart = polyoff + LinePoints.data; - previous_point = prevoff + LinePoints.data; } roadmap_math_coordinate (startpos, LinePoints.cursor); ! if ((LinePoints.cursor->x != previous_point->x) || ! (LinePoints.cursor->y != previous_point->y)) { ! previous_point = LinePoints.cursor; LinePoints.cursor++; } --- 708,721 ---- */ polyoff = polystart - LinePoints.data; roadmap_screen_pb_init (&LinePoints, 0); polystart = polyoff + LinePoints.data; } roadmap_math_coordinate (startpos, LinePoints.cursor); ! if ((LinePoints.cursor->x != prev_point.x) || ! (LinePoints.cursor->y != prev_point.y)) { ! prev_point = *LinePoints.cursor; LinePoints.cursor++; } *************** *** 756,760 **** (LinePoints.end - LinePoints.cursor)) { ! int polyoff, prevoff; /* since roadmap_screen_pb_init() may --- 754,758 ---- (LinePoints.end - LinePoints.cursor)) { ! int polyoff; /* since roadmap_screen_pb_init() may *************** *** 762,769 **** */ polyoff = polystart - LinePoints.data; - prevoff = previous_point - LinePoints.data; roadmap_screen_pb_init (&LinePoints, 0); polystart = polyoff + LinePoints.data; - previous_point = prevoff + LinePoints.data; } --- 760,765 ---- *************** *** 793,800 **** roadmap_math_coordinate (&position, shape_ptr); ! if ((shape_ptr->x != previous_point->x) || ! (shape_ptr->y != previous_point->y)) { ! previous_point = shape_ptr; shape_ptr++; } --- 789,796 ---- roadmap_math_coordinate (&position, shape_ptr); ! if ((shape_ptr->x != prev_point.x) || ! (shape_ptr->y != prev_point.y)) { ! prev_point = *shape_ptr; shape_ptr++; } *************** *** 814,819 **** roadmap_math_coordinate (endpos, LinePoints.cursor); ! if ((LinePoints.cursor->x != previous_point->x) || ! (LinePoints.cursor->y != previous_point->y)) { LinePoints.cursor++; } --- 810,815 ---- roadmap_math_coordinate (endpos, LinePoints.cursor); ! if ((LinePoints.cursor->x != prev_point.x) || ! (LinePoints.cursor->y != prev_point.y)) { LinePoints.cursor++; } |
|
From: Paul F. <pg...@us...> - 2008-06-15 15:35:54
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1961 Modified Files: roadmap_screen.c Log Message: plug memory leak from lost shape point buffer used when drawing "reversed" polygons Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** roadmap_screen.c 10 Jun 2008 03:50:03 -0000 1.126 --- roadmap_screen.c 15 Jun 2008 15:35:51 -0000 1.127 *************** *** 607,611 **** RoadMapGuiPoint *previous_point; RoadMapGuiPoint *shape_ptr; ! RoadMapGuiPoint *shape_points = NULL; RoadMapGuiPoint upper_left; --- 607,611 ---- RoadMapGuiPoint *previous_point; RoadMapGuiPoint *shape_ptr; ! static RoadMapGuiPoint *shape_points; RoadMapGuiPoint upper_left; |
|
From: Paul F. <pg...@us...> - 2008-06-14 06:02:06
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24187 Modified Files: roadgps_start.c Log Message: initialize roadmap_math, since there's now a critical context pointer that needs to be set. Index: roadgps_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadgps_start.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** roadgps_start.c 2 Jun 2008 22:42:54 -0000 1.23 --- roadgps_start.c 14 Jun 2008 06:02:01 -0000 1.24 *************** *** 266,269 **** --- 266,270 ---- roadmap_option (argc, argv, 1, roadgps_start_usage); + roadmap_math_initialize (); roadgps_start_set_unit (); |