<!--
-
- - Copyright (C) 2006, 2007 John Costigan.
+ - Copyright (C) 2006 - 2008 John Costigan.
-
- This file is part of Maemo Mapper.
-
<display_text>By Area</display_text> option is selected in the
<display_text>Setup</display_text> tab, defines the rectangular area
of the world for which maps will be downloaded or deleted. If
- applicable, the fields are pre-filled with your current and previous
- view center coordinates. This allows you to graphically choose your
- rectangle by first centering on one corner of the rectangle, then
- centering on the opposite corner, by tapping the screen or by using
- the <display_text>Lat/Lon</display_text> menu item of the
- <display_text>Go to</display_text> menu.
+ applicable, the fields are pre-filled to specify the area
+ visible on-screen. This allows you to graphically change your
+ rectangle simply by zooming in and panning to see the area you
+ want to download.
</para>
</topic>
<topic>
<topictitle>About Maemo Mapper</topictitle>
<context contextUID="help_maemomapper_about"/>
<para>
- Current Version: 2.4.1
+ Current Version: 2.4.2
</para>
<para>
Maemo Mapper was created and developed by John Costigan (aka
<display_text>gnuite</display_text>).
</para>
<para>
- Copyright © 2006-2007 John Costigan.
+ Copyright © 2006-2008 John Costigan.
</para>
<para>
POI and GPS-Info code originally written by Cezary Jackiewicz.
<display_text>By Area</display_text> option is selected in the
<display_text>Setup</display_text> tab, defines the rectangular area
of the world for which maps will be downloaded or deleted. If
- applicable, the fields are pre-filled with your current and previous
- view center coordinates. This allows you to graphically choose your
- rectangle by first centering on one corner of the rectangle, then
- centering on the opposite corner, by tapping the screen or by using
- the <display_text>Lat/Lon</display_text> menu item of the
- <display_text>Go to</display_text> menu.
+ applicable, the fields are pre-filled to specify the area
+ visible on-screen. This allows you to graphically change your
+ rectangle simply by zooming in and panning to see the area you
+ want to download.
</para>
</topic>
<topic>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../tohtml.xsl?root=maemo-mapper"?>
+
+<!--
+ -
+ - Copyright (C) 2006, 2007 John Costigan.
+ -
+ - Tämä tiedosto on osa Maemo Mapper ohjelmaa.
+ -
+ - Tämä on vapaa ohjelma: tätä ohjelmaa saa levittää edelleen ja
+ - muuttaa Free Software Foundationin julkaiseman GNU General
+ - Public Licensen (GPL-lisenssi) version 3 tai (valinnan mukaan)
+ - myöhemmän version ehtojen mukaisesti
+ -
+ - Tätä ohjelmaa levitetään siinä toivossa, että se olisi hyödyllinen
+ - mutta ilman mitään takuuta; edes hiljaista takuuta kaupallisesti
+ - hyväksyttävästä laadusta tai soveltuvuudesta tiettyyn tarkoitukseen.
+ - Katso GPL- lisenssistä lisää yksityiskohtia.
+ -
+ - Tämän ohjelman mukana pitäisi tulla kopio GPL-lisenssistä. Jos näin
+ - ei ole, katso <http://www.gnu.org/licenses/>.
+ -
+-->
<ossohelpsource>
<folder>
<title>Maemo Mapper</title>
pohjassa vierittääksesi
</listitem>
<listitem>
- <graphic filename="2686KEY_scroll_center"/> - Valitse
- <ref refid="Auto-Center" refdoc="Automaattinen keskitys"/>
+ <graphic filename="2686KEY_scroll_center"/> - Valitse automaattinen keskitys
</listitem>
<listitem>
<graphic filename="2686KEY_esc"/> - Ohjelmoitavissa; oletuksena
<display_text>Tyhjennä</display_text> - Tyhjentää käytössä olevan
reittijäljen.
</listitem>
+ <listitem>
+ <display_text>Reittijälki käytössä</display_text> - Tällä valinnalla
+ hallitaan onko reittijälki käytössä Maemo Mapperissa. Mikäli
+ valittuna, reittijälki talletetaan tiedostoon joka voidaan tallettaa
+ GPX-muodossa käyttäen valikon "Tallenna..." valintaa. Maemo Mapper
+ ei voi näyttää reittijälkeä, mikäli tämä valinta ei ole valittuna.
+ </listitem>
</list>
<heading>Kartat</heading>
<para>
</list>
<note>
Kartan korjaus on vähän käytetty ominaisuus, joka korjaa harvinaisen
- kartta ongelman. Joissakin paikoissa (kuten Brasiliassa ja Québecissä),
+ karttaongelman. Joissakin paikoissa (kuten Brasiliassa ja Québecissä),
reittitiedot eivät välttämättä ole tarkat, vaikkakin ongelma on
- systemaattinen. Virheen voi suomata liikkuessa, jolloin reittijälki
- saattaa olla muutaman sata metriä syrjässä verrattuna käytetyn
- karttavaraston tiehen. Kartan korjaus korjaa tämän ongelman. Kun
- GPS-vastaanottin on saanut lukituksen ja Maemo Mapper näyttää sijantisi
- väärin, niin kosketa ja pidä kohta jonka <i>luulet</i> olevan oikea
- painettuna hetken aikaa ja valitse valikosta tämä valinta.
- Korjaustieto tallennetaan osana Maemo Mapperin pysyviä asetuksia,
- joten se säilyy myös silloin, kun Maemo Mapper tai laite käynnistetään
- uudelleen.
+ systemaattinen. Virheen voi huomata liikkuessa, jolloin reittijälki
+ saattaa olla muutaman sata metriä syrjässä verrattuna käytettyyn karttaan.
+ Kartan korjaus korjaa tämän ongelman. Kun GPS-vastaanottin on saanut
+ lukituksen ja Maemo Mapper näyttää sijantisi väärin, niin kosketa ja pidä
+ kohta jonka <i>luulet</i> olevan oikea painettuna hetken aikaa ja valitse
+ valikosta tämä valinta. Korjaustieto tallennetaan osana Maemo Mapperin
+ pysyviä asetuksia, joten se säilyy myös silloin, kun Maemo Mapper tai
+ laite käynnistetään uudelleen.
</note>
<heading>Kohdepiste</heading>
<para>
VERSION_SUFFIX=-os2008
fi
-# Test if this is the armel build (as opposed to the x86 build)
-GCC_HOST_IS_ARMEL=`gcc --version | head -n 1 | grep arm`
-if [ "x$GCC_HOST_IS_ARMEL" != "x" ]; then
- DBP_EXTRA=-B
-fi
-
sed -i "1,1s/(\([0-9.][0-9.]*\)[-a-zA-Z0-9]*)/(\1$VERSION_SUFFIX)/" $CHANGELOG
-dpkg-buildpackage -rfakeroot -i $DBP_EXTRA
+dpkg-buildpackage -rfakeroot -i -sa
sed -i "1,1s/(\([0-9.][0-9.]*\)[-a-zA-Z0-9]*)/(\1)/" $CHANGELOG
# include "gpsbt.h"
#endif
+#ifdef HAVE_LIBGPSMGR
+# include "gpsmgr.h"
+#endif
+
#include "path.h"
#include "util.h"
GThread *my_thread = g_thread_self();
gboolean error = FALSE;
#ifdef HAVE_LIBGPSBT
- gpsbt_t gps_context;
+ gpsbt_t gpsbt_context;
+#endif
+#ifdef HAVE_LIBGPSMGR
+ gpsmgr_t gpsmgr_context;
#endif
gboolean is_context = FALSE;
{
gchar errstr[BUFFER_SIZE] = "";
/* We need to start gpsd (via gpsbt) first. */
- memset(&gps_context, 0, sizeof(gps_context));
+ memset(&gpsbt_context, 0, sizeof(gpsbt_context));
errno = 0;
if(gpsbt_start(gri->bt_mac, 0, 0, 0, errstr, sizeof(errstr),
- 0, &gps_context) < 0)
+ 0, &gpsbt_context) < 0)
{
g_printerr("Error connecting to GPS receiver: (%d) %s (%s)\n",
errno, strerror(errno), errstr);
if (!gpsd_ctrl_sock)
gpsd_ctrl_sock = "/tmp/.gpsd_ctrl_sock";
- memset(&gps_context, 0, sizeof(gps_context));
+ memset(&gpsmgr_context, 0, sizeof(gpsmgr_context));
errno = 0;
if(gpsmgr_start(gpsd_prog, devs, gpsd_ctrl_sock,
- 0, 0, &gps_context.mgr) < 0)
+ 0, 0, &gpsmgr_context) < 0)
{
g_printerr("Error opening GPS device: (%d) %s\n",
errno, strerror(errno));
{
#ifdef HAVE_LIBGPSBT
case GPS_RCVR_BT:
- gpsbt_stop(&gps_context);
+ gpsbt_stop(&gpsbt_context);
break;
#endif
#ifdef HAVE_LIBGPSMGR
case GPS_RCVR_FILE:
- gpsmgr_stop(&gps_context.mgr);
+ gpsmgr_stop(&gpsmgr_context);
break;
#endif
#include "path.h"
#include "util.h"
+/** This enum defines the states of the SAX parsing state machine. */
+typedef enum
+{
+ START,
+ INSIDE_GPX,
+ INSIDE_WPT,
+ INSIDE_WPT_NAME,
+ INSIDE_WPT_DESC,
+ INSIDE_WPT_CMT,
+ INSIDE_PATH,
+ INSIDE_PATH_SEGMENT,
+ INSIDE_PATH_POINT,
+ INSIDE_PATH_POINT_ELE,
+ INSIDE_PATH_POINT_TIME,
+ INSIDE_PATH_POINT_DESC,
+ INSIDE_PATH_POINT_CMT,
+ FINISH,
+ UNKNOWN,
+ ERROR,
+} SaxState;
+
+/** Data used during the SAX parsing operation. */
+typedef struct _SaxData SaxData;
+struct _SaxData {
+ SaxState state;
+ SaxState prev_state;
+ gint unknown_depth;
+ gboolean at_least_one_trkpt;
+ GString *chars;
+};
+
+typedef struct _PathSaxData PathSaxData;
+struct _PathSaxData {
+ SaxData sax_data;
+ Path path;
+};
+
+typedef struct _PoiSaxData PoiSaxData;
+struct _PoiSaxData {
+ SaxData sax_data;
+ GList *poi_list;
+ PoiInfo *curr_poi;
+};
+
/**
* Handle a start tag in the parsing of a GPX file.
*/
case INSIDE_PATH_POINT_ELE:
case INSIDE_PATH_POINT_TIME:
case INSIDE_PATH_POINT_DESC:
+ case INSIDE_PATH_POINT_CMT:
for(i = 0; i < len; i++)
data->chars = g_string_append_c(data->chars, ch[i]);
vprintf("%s\n", data->chars->str);
if(!strcmp((gchar*)name, "gpx"))
data->sax_data.state = INSIDE_GPX;
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case INSIDE_GPX:
if(!strcmp((gchar*)name, "trk"))
data->sax_data.state = INSIDE_PATH;
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case INSIDE_PATH:
if(!strcmp((gchar*)name, "trkseg"))
data->sax_data.at_least_one_trkpt = FALSE;
}
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case INSIDE_PATH_SEGMENT:
if(!strcmp((gchar*)name, "trkpt"))
data->sax_data.state = ERROR;
}
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case INSIDE_PATH_POINT:
if(!strcmp((gchar*)name, "time"))
data->sax_data.state = INSIDE_PATH_POINT_ELE;
else if(!strcmp((gchar*)name, "desc"))
data->sax_data.state = INSIDE_PATH_POINT_DESC;
+ else if(!strcmp((gchar*)name, "cmt"))
+ data->sax_data.state = INSIDE_PATH_POINT_CMT;
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case UNKNOWN:
data->sax_data.unknown_depth++;
else
data->sax_data.state = ERROR;
break;
+ case INSIDE_PATH_POINT_CMT:
+ /* only parse description for routes */
+ if(!strcmp((gchar*)name, "cmt"))
+ {
+ if(data->path.wtail < data->path.whead
+ || data->path.wtail->point != data->path.tail)
+ {
+ MACRO_PATH_INCREMENT_WTAIL(data->path);
+ data->path.wtail->point = data->path.tail;
+ data->path.wtail->desc
+ = g_string_free(data->sax_data.chars, FALSE);
+ }
+ else
+ g_string_free(data->sax_data.chars, TRUE);
+
+ data->sax_data.chars = g_string_new("");
+ data->sax_data.state = INSIDE_PATH_POINT;
+ }
+ else
+ data->sax_data.state = ERROR;
+ break;
case INSIDE_PATH_POINT_DESC:
/* only parse description for routes */
if(!strcmp((gchar*)name, "desc"))
{
- MACRO_PATH_INCREMENT_WTAIL(data->path);
+ /* If we already have a desc (e.g. from cmt), then overwrite */
+ if(data->path.wtail >= data->path.whead
+ && data->path.wtail->point == data->path.tail)
+ g_free(data->path.wtail->desc);
+ else
+ {
+ MACRO_PATH_INCREMENT_WTAIL(data->path);
+ }
data->path.wtail->point = data->path.tail;
data->path.wtail->desc
= g_string_free(data->sax_data.chars, FALSE);
case UNKNOWN:
if(!--data->sax_data.unknown_depth)
data->sax_data.state = data->sax_data.prev_state;
- else
- data->sax_data.state = ERROR;
break;
default:
;
if(!strcmp((gchar*)name, "gpx"))
data->sax_data.state = INSIDE_GPX;
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case INSIDE_GPX:
if(!strcmp((gchar*)name, "wpt"))
data->sax_data.state = ERROR;
}
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case INSIDE_WPT:
if(!strcmp((gchar*)name, "name"))
data->sax_data.state = INSIDE_WPT_NAME;
else if(!strcmp((gchar*)name, "desc"))
data->sax_data.state = INSIDE_WPT_DESC;
+ else if(!strcmp((gchar*)name, "cmt"))
+ data->sax_data.state = INSIDE_WPT_CMT;
else
+ {
MACRO_SET_UNKNOWN();
+ }
break;
case UNKNOWN:
- printf("UNKNOWN!\n");
data->sax_data.unknown_depth++;
break;
default:
else
data->sax_data.state = ERROR;
break;
+ case INSIDE_WPT_CMT:
+ if(!strcmp((gchar*)name, "cmt"))
+ {
+ /* Only use if we don't already have a desc */
+ if(!data->curr_poi->desc)
+ {
+ data->curr_poi->desc
+ = g_string_free(data->sax_data.chars, FALSE);
+ data->sax_data.chars = g_string_new("");
+ data->sax_data.state = INSIDE_WPT;
+ }
+ }
+ else
+ data->sax_data.state = ERROR;
+ break;
case INSIDE_WPT_DESC:
if(!strcmp((gchar*)name, "desc"))
{
+ /* If we already have a desc (e.g. from cmt), then overwrite */
+ if(data->curr_poi->desc)
+ g_free(data->curr_poi->desc);
data->curr_poi->desc
= g_string_free(data->sax_data.chars, FALSE);
data->sax_data.chars = g_string_new("");
data->sax_data.state = ERROR;
break;
case UNKNOWN:
- printf("UNKNOWN!\n");
if(!--data->sax_data.unknown_depth)
data->sax_data.state = data->sax_data.prev_state;
- else
- data->sax_data.state = ERROR;
break;
default:
;
# define _voice_synth_path "/usr/bin/flite"
printf("%s %s\n", _voice_synth_path,
_last_spoken_phrase);
- execl(_voice_synth_path, _voice_synth_path,
+ execl("/bin/sh", _voice_synth_path, _voice_synth_path,
"-t", _last_spoken_phrase, (char *)NULL);
exit(0);
}
" where c.enabled = 1"
" and p.label like $QUERY or p.desc like $QUERY"
" order by (($LAT - p.lat) * ($LAT - p.lat) "
- "+ ($LON - p.lon) * ($LON - p.lon)) DESC",
+ "+ ($LON - p.lon) * ($LON - p.lon)) DESC "
+ " limit 100",
-1, &_stmt_browse_poi, NULL);
/* browse poi by category */
" and p.cat_id = $CATID"
" and ( p.label like $QUERY or p.desc like $QUERY )"
" order by (($LAT - p.lat) * ($LAT - p.lat) "
- "+ ($LON - p.lon) * ($LON - p.lon)) DESC",
+ "+ ($LON - p.lon) * ($LON - p.lon)) DESC"
+ " limit 100",
-1, &_stmt_browsecat_poi, NULL);
/* Prepare our SQL statements. */
CENTER_LATLON = 2
} CenterMode;
-/** This enum defines the states of the SAX parsing state machine. */
-typedef enum
-{
- START,
- INSIDE_GPX,
- INSIDE_WPT,
- INSIDE_WPT_NAME,
- INSIDE_WPT_DESC,
- INSIDE_PATH,
- INSIDE_PATH_SEGMENT,
- INSIDE_PATH_POINT,
- INSIDE_PATH_POINT_ELE,
- INSIDE_PATH_POINT_TIME,
- INSIDE_PATH_POINT_DESC,
- FINISH,
- UNKNOWN,
- ERROR,
-} SaxState;
-
/** POI dialog action **/
typedef enum
{
WayPoint *wcap; /* points after last slot in array. */
};
-/** Data used during the SAX parsing operation. */
-typedef struct _SaxData SaxData;
-struct _SaxData {
- SaxState state;
- SaxState prev_state;
- gint unknown_depth;
- gboolean at_least_one_trkpt;
- GString *chars;
-};
-
-typedef struct _PathSaxData PathSaxData;
-struct _PathSaxData {
- SaxData sax_data;
- Path path;
-};
-
/** Data to describe a POI. */
typedef struct _PoiInfo PoiInfo;
struct _PoiInfo {
gchar *clabel;
};
-typedef struct _PoiSaxData PoiSaxData;
-struct _PoiSaxData {
- SaxData sax_data;
- GList *poi_list;
- PoiInfo *curr_poi;
-};
-
/** Data regarding a map repository. */
typedef struct _RepoData RepoData;
struct _RepoData {