navit
0.5.3-trunk
|
#include <math.h>
#include <stdio.h>
#include <glib.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <errno.h>
#include <sys/ioctl.h>
#include "config.h"
#include <navit/item.h>
#include <navit/xmlconfig.h>
#include <navit/main.h>
#include <navit/debug.h>
#include <navit/point.h>
#include <navit/graphics.h>
#include <navit/transform.h>
#include <navit/map.h>
#include <navit/navit.h>
#include <navit/callback.h>
#include <navit/file.h>
#include <navit/color.h>
#include <navit/route.h>
#include <navit/plugin.h>
#include <navit/layout.h>
#include <navit/mapset.h>
#include <navit/osd.h>
#include <navit/event.h>
#include <navit/command.h>
#include <navit/config_.h>
#include <navit/vehicle.h>
Data Structures | |
struct | pedestrian |
struct | rocket |
struct | marker |
struct | map_priv |
Represents the map from a single binfile. More... | |
struct | map_rect_priv |
Implementation-specific map rect data. More... | |
struct | building |
struct | tilt_data |
Macros | |
#define | ORIENTATION_UNKNOWN 0 |
#define | ORIENTATION_PORTRAIT 1 |
#define | ORIENTATION_LANDSCAPE 2 |
#define | ORIENTATION_FLAT 3 |
#define | TYPE_ACCELEROMETER 1 |
#define | TYPE_MAGNETIC_FIELD 2 |
#define | DEBUG_COORD_GET |
Functions | |
static void | pedestrian_rocket_idle (struct rocket *rocket) |
static void | pedestrian_cmd_pedestrian_rocket (struct rocket *rocket) |
static void | osd_rocket_init (struct navit *nav) |
static void | osd_marker_draw (struct marker *this, struct navit *nav) |
static void | osd_marker_init (struct marker *this, struct navit *nav) |
static struct osd_priv * | osd_marker_new (struct navit *nav, struct osd_methods *meth, struct attr **attrs) |
static int | map_route_occluded_bbox (struct map *map, struct coord_rect *bbox) |
static void | map_route_occluded_buildings_free (void) |
static void | map_route_occluded_get_buildings (struct mapset *mapset, struct coord_rect *r) |
static int | side (struct coord *l0, struct coord *l1, struct coord *p) |
static void | map_route_occluded_check_buildings (struct coord *c0) |
static int | intersect (struct coord *p1, struct coord *p2, struct coord *p3, struct coord *p4, struct coord *i) |
static int | is_visible_line (struct coord *c0, struct coord *c1, struct coord *c2) |
static void | map_route_occluded_coord_rewind (void *priv_data) |
static void | map_route_occluded_attr_rewind (void *priv_data) |
static int | map_route_occluded_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr) |
static int | coord_next (struct map_rect_priv *mr, struct coord *c) |
static int | map_route_occluded_coord_get (void *priv_data, struct coord *c, int count) |
static void | map_route_occluded_destroy (struct map_priv *priv) |
static struct map_rect_priv * | map_route_occluded_rect_new (struct map_priv *priv, struct map_selection *sel) |
static void | map_route_occluded_rect_destroy (struct map_rect_priv *mr) |
static struct item * | map_route_occluded_get_item (struct map_rect_priv *mr) |
static struct item * | map_route_occluded_get_item_byid (struct map_rect_priv *mr, int id_hi, int id_lo) |
static struct map_priv * | map_route_occluded_new (struct map_methods *meth, struct attr **attrs) |
static void | pedestrian_graphics_resize (struct graphics *gra, int w, int h) |
static void | pedestrian_draw_arrow (struct graphics *gra, char *name, int x, int y) |
static void | pedestrian_draw_arrows (struct graphics *gra) |
static void | pedestrian_graphics_postdraw (struct graphics *gra) |
void | pedestrian_write_tilt (int fd, int axis) |
void | pedestrian_read_tilt (int fd, struct navit *nav, struct tilt_data *data) |
void | pedestrian_write_tilt_timer (int fd, struct tilt_data *data) |
void | pedestrian_setup_tilt (struct navit *nav) |
static void | pedestrian_log (char **logstr) |
static void | pedestrian_navit_init (struct navit *nav) |
static void | pedestrian_navit (struct navit *nav, int add) |
void | plugin_init (void) |
The plugin entry point. More... | |
Variables | |
static struct map * | global_map |
int | orientation |
int | orientation_old |
struct pedestrian | pedestrian_data |
int | sensors_locked |
struct attr initial_layout | main_layout |
static struct command_table | commands [] = {{"pedestrian_rocket", command_cast(pedestrian_cmd_pedestrian_rocket)},} |
static struct building * | buildings |
FILE * | debug |
FILE * | debug2 |
static struct item_methods | methods_route_occluded_item |
static int | no_recurse |
static struct map_methods | map_route_occluded_methods |
#define DEBUG_COORD_GET |
#define ORIENTATION_FLAT 3 |
#define ORIENTATION_LANDSCAPE 2 |
#define ORIENTATION_PORTRAIT 1 |
#define ORIENTATION_UNKNOWN 0 |
Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define TYPE_ACCELEROMETER 1 |
#define TYPE_MAGNETIC_FIELD 2 |
|
static |
References c, street_data::c, street_data::count, map_rect_priv::idx, and map_rect_priv::sd.
Referenced by map_route_occluded_coord_get().
References buildings, c1, c2, dbg, intersect(), lvl_debug, building::next, building::right, side(), coord::x, and coord::y.
Referenced by map_route_occluded_coord_get().
|
static |
References dbg, item_attr_get(), lvl_debug, and map_rect_priv::route_item.
|
static |
References dbg, item_attr_rewind(), lvl_debug, and map_rect_priv::route_item.
|
static |
References bbox(), c, coord_rect_extend(), item, item_coord_get(), coord_rect::lu, map_rect_destroy(), map_rect_get_item(), map_rect_new(), and coord_rect::rl.
Referenced by map_route_occluded_rect_new().
|
static |
References buildings, next, building::next, building::sd, and street_data_free().
Referenced by map_route_occluded_get_buildings().
|
static |
References buildings, c, street_data::c, street_data::count, dbg, lvl_debug, building::next, building::right, building::sd, side(), coord::x, and coord::y.
Referenced by map_route_occluded_coord_get().
|
static |
References c, street_data::c, map_rect_priv::c0, map_rect_priv::c_next, map_rect_priv::c_next_base, map_rect_priv::c_out, map_rect_priv::checked, coord_next(), street_data::count, dbg, dbg_assert, debug, map_rect_priv::first, item::id_lo, map_rect_priv::idx, map_rect_priv::idx_base, is_visible_line(), street_data::item, map_rect_priv::last, map_rect_priv::lseg, map_rect_priv::lseg_base, map_rect_priv::lseg_done, map_rect_priv::lseg_done_base, lvl_debug, map_route_occluded_check_buildings(), map_rect_priv::route_item_done, map_rect_priv::sd, coord::x, and coord::y.
Referenced by map_route_occluded_get_item().
|
static |
References map_rect_priv::c_next, map_rect_priv::c_next_base, dbg, map_rect_priv::first, map_rect_priv::idx, map_rect_priv::idx_base, item_coord_rewind(), map_rect_priv::last, map_rect_priv::lseg, map_rect_priv::lseg_base, map_rect_priv::lseg_done, map_rect_priv::lseg_done_base, lvl_debug, and map_rect_priv::route_item.
Referenced by map_route_occluded_get_item().
|
static |
|
static |
References buildings, map_selection::c_rect, item::id_hi, item::id_lo, item, map_rect_destroy(), map_rect_get_item(), map_rect_new(), map_route_occluded_buildings_free(), mapset_next(), mapset_open(), item_range::max, map_selection::next, building::next, map_selection::order, map_selection::range, building::sd, street_get_data(), item::type, and map_selection::u.
Referenced by map_route_occluded_rect_new().
|
static |
References c, dbg, item::id_lo, map_rect_priv::item, item_to_name(), map_rect_priv::last, lvl_debug, map_rect_get_item(), map_route_occluded_coord_get(), map_route_occluded_coord_rewind(), map_rect_priv::route_item, map_rect_priv::route_item_done, map_rect_priv::route_map_rect, map_rect_priv::sd, street_data_free(), street_get_data(), and item::type.
Referenced by map_route_occluded_get_item_byid().
|
static |
References item::id_lo, and map_route_occluded_get_item().
|
static |
References attr_search(), attr::attrs, dbg, lvl_debug, map_route_occluded_methods, eval::navit, and map_priv::navit.
Referenced by plugin_init().
|
static |
References debug, debug2, global_map, map_dump_file(), map_rect_destroy(), no_recurse, map_rect_priv::route_map_rect, map_rect_priv::sd, and street_data_free().
|
static |
References dbg, debug, debug2, item::id_lo, map_rect_priv::item, map_rect_priv::last, map_rect_priv::lseg_done_base, lvl_debug, attr::map, map_dump_file(), map_rect_new(), map_route_occluded_bbox(), map_route_occluded_get_buildings(), item::meth, methods_route_occluded_item, map_rect_priv::mpriv, map_priv::navit, navit_get_attr(), no_recurse, item::priv_data, route_get_attr(), map_rect_priv::route_item_done, map_rect_priv::route_map_rect, and attr::u.
References dbg, lvl_debug, navit_get_attr(), and p.
Referenced by osd_marker_init().
References attr_free(), attr_new_from_text(), coord_new_from_attrs(), cursor_add_attr(), cursor_new(), attr::element, element_add_attr(), itemgra_add_attr(), itemgra_new(), osd_marker_draw(), attr::polygon, and attr::u.
Referenced by osd_marker_new().
|
static |
References callback_cast, callback_new_attr_1, navit_add_callback(), and osd_marker_init().
Referenced by plugin_init().
|
static |
References rocket::callback, callback_cast, attr::callback_list, callback_new_1, command_add_table(), commands, dbg, attr::layout, rocket::layout, lvl_debug, rocket::navit, navit_get_attr(), pedestrian_rocket_idle(), and attr::u.
Referenced by pedestrian_navit_init().
|
static |
|
static |
References graphics_gc::gra, graphics_draw_image(), graphics_gc_destroy(), graphics_gc_new(), graphics_gc_set_foreground(), graphics_icon_path(), graphics_image_free(), graphics_image_new(), name, p, point::x, and point::y.
Referenced by pedestrian_draw_arrows().
|
static |
References c, center, dbg, pedestrian::h, item, item_coord_get(), lvl_debug, attr::map, map_rect_destroy(), map_rect_get_item(), map_rect_new(), pedestrian::nav, navit_get_attr(), navit_get_trans(), orientation, ORIENTATION_FLAT, pedestrian_data, pedestrian_draw_arrow(), route_get_attr(), transform_get_angle_delta(), transform_get_center(), item::type, attr::u, pedestrian::w, and pedestrian::yaw.
Referenced by pedestrian_graphics_postdraw().
|
static |
References c, graphics_gc::gra, graphics_draw_rectangle(), graphics_gc_destroy(), graphics_gc_new(), graphics_gc_set_foreground(), p, and pedestrian_draw_arrows().
Referenced by pedestrian_navit_init().
|
static |
References graphics_get_data(), pedestrian::h, pedestrian_data, and pedestrian::w.
Referenced by pedestrian_navit_init().
|
static |
References vehicle_log_gpx_add_tag().
Referenced by pedestrian_navit_init().
|
static |
References callback_cast, callback_new_attr_0, dbg, lvl_debug, navit_add_attr(), pedestrian_navit_init(), and callback::type.
Referenced by plugin_init().
|
static |
References active, android_activity, android_find_class_global(), attr_to_name(), attr::callback, callback_cast, callback_new_1, callback_new_attr_0, callback_new_attr_1, callback_new_attr_2, dbg, global_map, graphics_add_callback(), graphics_set_attr(), attr_iter::iter, jnienv, attr::layout, lvl_debug, main_layout, attr::map, map_new(), map_set_attr(), mapset_add_attr(), layout::name, pedestrian::nav, navit_attr_iter_destroy(), navit_attr_iter_new(), navit_get_attr(), navit_get_trans(), navit_set_attr(), attr::num, orientation, orientation_old, ORIENTATION_UNKNOWN, osd_rocket_init(), pedestrian_data, pedestrian_graphics_postdraw(), pedestrian_graphics_resize(), pedestrian_log(), pedestrian_setup_tilt(), route_get_attr(), transform_set_distance(), transform_set_hog(), transform_set_pitch(), transform_set_roll(), transform_set_scale(), transform_set_scales(), attr::type, attr::u, attr::vehicle, and vehicle_add_attr().
Referenced by pedestrian_navit(), and plugin_init().
References data, dbg, lvl_debug, navit_get_attr(), pedestrian_write_tilt(), transform_set_pitch(), transform_set_roll(), attr::transformation, and attr::u.
Referenced by pedestrian_setup_tilt().
|
static |
References rocket::a, dbg, rocket::dl, event_remove_idle(), rocket::g, rocket::gra, graphics_displaylist_draw(), graphics_overlay_disable(), rocket::hog, rocket::idle, rocket::layout, lvl_debug, rocket::navit, navit_draw(), navit_set_attr(), attr::num, sensors_locked, rocket::t, rocket::trans, transform_get_scale(), transform_set_hog(), transform_set_order_base(), transform_set_scale(), attr::type, attr::u, rocket::v, and rocket::vscale.
Referenced by osd_rocket_init().
void pedestrian_setup_tilt | ( | struct navit * | nav | ) |
References callback_cast, callback_new_2, callback_new_3, data, dbg, event_add_timeout(), event_add_watch(), event_watch_cond_read, lvl_error, pedestrian_read_tilt(), pedestrian_write_tilt(), and pedestrian_write_tilt_timer().
Referenced by pedestrian_navit_init().
void pedestrian_write_tilt | ( | int | fd, |
int | axis | ||
) |
References dbg, and lvl_debug.
Referenced by pedestrian_read_tilt(), pedestrian_setup_tilt(), and pedestrian_write_tilt_timer().
void pedestrian_write_tilt_timer | ( | int | fd, |
struct tilt_data * | data | ||
) |
References data, and pedestrian_write_tilt().
Referenced by pedestrian_setup_tilt().
void plugin_init | ( | void | ) |
The plugin entry point.
The plugin entry point
References android_activity, android_find_class_global(), callback_cast, callback_new_attr_0, config_add_attr(), config_attr_iter_destroy(), config_attr_iter_new(), config_get_attr(), dbg, attr_iter::iter, jnienv, lvl_error, map_route_occluded_new(), osd_marker_new(), pedestrian_navit(), pedestrian_navit_init(), and callback::type.
References p, coord::x, and coord::y.
Referenced by is_visible_line(), and map_route_occluded_check_buildings().
|
static |
|
static |
Referenced by osd_rocket_init().
FILE* debug |
FILE * debug2 |
Referenced by intersect(), map_route_occluded_rect_destroy(), and map_route_occluded_rect_new().
|
static |
Referenced by map_route_occluded_rect_destroy(), and pedestrian_navit_init().
struct attr initial_layout main_layout |
Referenced by pedestrian_navit_init().
|
static |
Referenced by map_route_occluded_new().
|
static |
Referenced by map_route_occluded_rect_new().
|
static |
Referenced by map_route_occluded_rect_destroy(), and map_route_occluded_rect_new().
int orientation |
int orientation_old |
Referenced by pedestrian_navit_init().
struct pedestrian pedestrian_data |
Referenced by pedestrian_draw_arrows(), pedestrian_graphics_resize(), and pedestrian_navit_init().
int sensors_locked |
Referenced by pedestrian_rocket_idle().