navit
0.5.3-trunk
|
#include <glib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include "item.h"
#include "attr.h"
#include "track.h"
#include "xmlconfig.h"
#include "debug.h"
#include "transform.h"
#include "coord.h"
#include "route.h"
#include "projection.h"
#include "map.h"
#include "mapset.h"
#include "plugin.h"
#include "vehicleprofile.h"
#include "vehicle.h"
#include "roadprofile.h"
#include "util.h"
#include "config.h"
#include "callback.h"
Data Structures | |
struct | tracking_line |
struct | cdf_speed |
Conatins a list of previous speeds. More... | |
struct | cdf_data |
Contains data for the CDF. More... | |
struct | tracking |
struct | map_priv |
Represents the map from a single binfile. More... | |
struct | map_rect_priv |
Implementation-specific map rect data. More... | |
Macros | |
#define | CDF_MINAVG 1.f |
#define | CDF_MAXAVG 6.f |
#define | CDF_MINDIST 49 |
Functions | |
static void | tracking_init_cdf (struct cdf_data *cdf, int hist_size) |
int | tracking_get_angle (struct tracking *tr) |
struct coord * | tracking_get_pos (struct tracking *tr) |
int | tracking_get_street_direction (struct tracking *tr) |
int | tracking_get_segment_pos (struct tracking *tr) |
struct street_data * | tracking_get_street_data (struct tracking *tr) |
int | tracking_get_attr (struct tracking *_this, enum attr_type type, struct attr *attr, struct attr_iter *attr_iter) |
struct item * | tracking_get_current_item (struct tracking *_this) |
int * | tracking_get_current_flags (struct tracking *_this) |
int | tracking_get_current_tunnel (struct tracking *_this) |
static void | tracking_get_angles (struct tracking_line *tl) |
static int | street_data_within_selection (struct street_data *sd, struct map_selection *sel) |
static void | tracking_doupdate_lines (struct tracking *tr, struct coord *pc, enum projection pro) |
void | tracking_flush (struct tracking *tr) |
static int | tracking_angle_diff (int a1, int a2, int full) |
static int | tracking_angle_abs_diff (int a1, int a2, int full) |
static int | tracking_angle_delta (struct tracking *tr, int vehicle_angle, int street_angle, int flags) |
static int | tracking_is_connected (struct tracking *tr, struct coord *c1, struct coord *c2) |
static int | tracking_is_no_stop (struct tracking *tr, struct coord *c1, struct coord *c2) |
static int | tracking_is_on_route (struct tracking *tr, struct route *rt, struct item *item) |
static int | tracking_value (struct tracking *tr, struct tracking_line *t, int offset, struct coord *lpnt, int min, int flags) |
void | tracking_update (struct tracking *tr, struct vehicle *v, struct vehicleprofile *vehicleprofile, enum projection pro) |
Processes a position update. More... | |
static int | tracking_set_attr_do (struct tracking *tr, struct attr *attr, int initial) |
int | tracking_set_attr (struct tracking *tr, struct attr *attr) |
int | tracking_add_attr (struct tracking *this_, struct attr *attr) |
int | tracking_remove_attr (struct tracking *this_, struct attr *attr) |
struct tracking * | tracking_new (struct attr *parent, struct attr **attrs) |
void | tracking_set_mapset (struct tracking *this, struct mapset *ms) |
void | tracking_set_route (struct tracking *this, struct route *rt) |
void | tracking_destroy (struct tracking *tr) |
struct map * | tracking_get_map (struct tracking *this_) |
static void | tracking_map_item_coord_rewind (void *priv_data) |
static int | tracking_map_item_coord_get (void *priv_data, struct coord *c, int count) |
static void | tracking_map_item_attr_rewind (void *priv_data) |
static int | tracking_map_item_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr) |
static void | tracking_map_destroy (struct map_priv *priv) |
static void | tracking_map_rect_init (struct map_rect_priv *priv) |
static struct map_rect_priv * | tracking_map_rect_new (struct map_priv *priv, struct map_selection *sel) |
static void | tracking_map_rect_destroy (struct map_rect_priv *priv) |
static struct item * | tracking_map_get_item (struct map_rect_priv *priv) |
static struct item * | tracking_map_get_item_byid (struct map_rect_priv *priv, int id_hi, int id_lo) |
static struct map_priv * | tracking_map_new (struct map_methods *meth, struct attr **attrs, struct callback_list *cbl) |
void | tracking_init (void) |
Variables | |
struct object_func | tracking_func |
static struct item_methods | tracking_map_item_methods |
static struct map_methods | tracking_map_meth |
#define CDF_MAXAVG 6.f |
#define CDF_MINAVG 1.f |
#define CDF_MINDIST 49 |
|
static |
References street_data::c, map_selection::c_rect, street_data::count, coord_rect::lu, map_selection::next, coord_rect::rl, map_selection::u, coord::x, and coord::y.
Referenced by tracking_doupdate_lines().
References attr::callback, tracking::callback_list, callback_list_add(), attr::type, and attr::u.
|
static |
References tracking_angle_diff().
Referenced by tracking_angle_delta(), and tracking_update().
|
static |
References profile, tracking_angle_abs_diff(), and tracking::vehicleprofile.
Referenced by tracking_update(), and tracking_value().
|
static |
Referenced by tracking_angle_abs_diff(), and tracking_update().
void tracking_destroy | ( | struct tracking * | tr | ) |
References tracking::attr, attr_free(), tracking::callback_list, callback_list_destroy(), and tracking_flush().
|
static |
References street_data::count, dbg, item, item_get_default_flags(), tracking::lines, lvl_debug, map_projection(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), map_selection_destroy(), mapset_close(), mapset_next(), mapset_open(), tracking::ms, tracking_line::next, route_rect(), tracking_line::street, street_data_free(), street_data_within_selection(), street_get_data(), tracking_get_angles(), transform_from_geo(), transform_to_geo(), item::type, coord::x, and coord::y.
Referenced by tracking_update().
void tracking_flush | ( | struct tracking * | tr | ) |
References tracking::curr_line, dbg, tracking::lines, lvl_debug, next, tracking_line::next, tracking_line::street, and street_data_free().
Referenced by tracking_destroy(), and tracking_update().
int tracking_get_angle | ( | struct tracking * | tr | ) |
References tracking::curr_angle.
Referenced by navit_get_cursor_pnt().
|
static |
References tracking_line::angle, street_data::c, street_data::count, tracking_line::street, and transform_get_angle_delta().
Referenced by tracking_doupdate_lines().
int tracking_get_attr | ( | struct tracking * | _this, |
enum attr_type | type, | ||
struct attr * | attr, | ||
struct attr_iter * | attr_iter | ||
) |
References tracking::attr, attr_dup(), attr_free(), attr_to_name(), c, attr::coord_geo, tracking::coord_geo, tracking::coord_geo_valid, tracking::curr_line, tracking::curr_out, dbg, tracking::direction, tracking::direction_matched, item::id_hi, item::id_lo, attr::item, item, street_data::item, item_attr_get(), tracking::lines, lvl_debug, item::map, map_rect_destroy(), map_rect_get_item_byid(), map_rect_new(), tracking_line::next, attr::num, attr::numd, tracking::pro, tracking::speed, tracking_line::street, tracking::street_direction, transform_to_geo(), attr::type, type, attr::u, tracking::valid, coord::x, pcoord::x, coord::y, and pcoord::y.
Referenced by destination_address(), gui_internal_search_list_set_default_country(), Java_org_navitproject_navit_NavitGraphics_getDefaultCountry(), navit_vehicle_update_position(), NGQProxySearch::NGQProxySearch(), osd_speed_warner_draw(), osd_text_draw(), and request_tracking_get_attr().
int* tracking_get_current_flags | ( | struct tracking * | _this | ) |
References tracking::curr_line, street_data::flags, and tracking_line::street.
Referenced by osd_speed_warner_draw(), osd_text_draw(), and vehicle_demo_position_attr_get().
References tracking::curr_line, street_data::item, and tracking_line::street.
Referenced by osd_speed_warner_draw(), and osd_text_draw().
int tracking_get_current_tunnel | ( | struct tracking * | _this | ) |
References tracking::tunnel.
Referenced by navit_layout_switch().
References attr::attrs, data, description(), tracking::map, map_new(), attr::navigation, and type.
Referenced by navit_init().
References tracking::curr_out.
Referenced by route_set_position_from_tracking().
int tracking_get_segment_pos | ( | struct tracking * | tr | ) |
References tracking::pos.
Referenced by route_set_position_from_tracking().
struct street_data* tracking_get_street_data | ( | struct tracking * | tr | ) |
References tracking::curr_line, and tracking_line::street.
Referenced by route_set_position_from_tracking().
int tracking_get_street_direction | ( | struct tracking * | tr | ) |
References tracking::street_direction.
Referenced by route_set_position_from_tracking().
void tracking_init | ( | void | ) |
References tracking_map_new().
Referenced by main_real().
|
static |
References cdf_data::available, cdf_data::dir_hist, cdf_data::extrapolating, cdf_data::hist_size, cdf_data::last_dist, cdf_data::pos_hist, and cdf_data::poscount.
Referenced by tracking_new().
|
static |
References c1, c2, and tracking::connected_pref.
Referenced by tracking_update(), and tracking_value().
|
static |
References c1, c2, and tracking::nostop_pref.
Referenced by tracking_value().
|
static |
References route_contains(), and tracking::route_pref.
Referenced by tracking_value().
|
static |
|
static |
References map_rect_priv::coord, street_data::count, map_rect_priv::curr, dbg, item::id_hi, item::id_lo, map_rect_priv::item, lvl_debug, tracking_line::next, map_rect_priv::next, tracking_line::street, map_rect_priv::tracking, tracking_map_item_attr_rewind(), tracking_map_item_coord_rewind(), tracking_value(), item::type, and value.
Referenced by tracking_map_get_item_byid().
|
static |
References item::id_hi, item::id_lo, tracking_map_get_item(), and tracking_map_rect_init().
|
static |
References tracking_line::angle, map_rect_priv::attr_next, c, street_data::c, map_rect_priv::coord, map_rect_priv::curr, tracking::curr_angle, tracking::curr_in, map_rect_priv::debug_idx, street_data::flags, tracking::offroad_limit_pref, attr::str, map_rect_priv::str, tracking_line::street, map_rect_priv::tracking, tracking_value(), attr::type, attr::u, value, coord::x, pcoord::x, coord::y, and pcoord::y.
|
static |
References map_rect_priv::attr_next, and map_rect_priv::debug_idx.
Referenced by tracking_map_get_item().
|
static |
|
static |
References map_rect_priv::ccount.
Referenced by tracking_map_get_item().
|
static |
References attr_search(), attr::attrs, attr::tracking, map_priv::tracking, tracking_map_meth, and attr::u.
Referenced by tracking_init().
|
static |
|
static |
References map_rect_priv::coord, map_rect_priv::curr, item::id_hi, item::id_lo, map_rect_priv::item, tracking::lines, map_rect_priv::next, and map_rect_priv::tracking.
Referenced by tracking_map_get_item_byid(), and tracking_map_rect_new().
|
static |
References attr::callback, tracking::callback_list, callback_list_remove(), attr::type, and attr::u.
References tracking_set_attr_do().
References tracking::angle_pref, tracking::connected_pref, tracking::nostop_pref, attr::num, tracking::offroad_limit_pref, tracking::overspeed_percent_pref, tracking::overspeed_pref, tracking::route_pref, tracking::tunnel_extrapolation, attr::type, and attr::u.
Referenced by tracking_new(), and tracking_set_attr().
Referenced by navit_init().
Referenced by navit_init().
void tracking_update | ( | struct tracking * | tr, |
struct vehicle * | v, | ||
struct vehicleprofile * | vehicleprofile, | ||
enum projection | pro | ||
) |
Processes a position update.
tr | The which will receive the position update |
v | The vehicle whose position has changed |
vehicleprofile | The vehicle profile to use |
pro | The projection to use for transformations |
References AF_UNDERGROUND, tracking_line::angle, angle_delta(), tracking::angle_pref, attr_position_valid_invalid, attr_position_valid_static, attr_position_valid_valid, street_data::c, tracking::callback_list, callback_list_call_attr_0, tracking::connected_pref, tracking::coord_geo_valid, street_data::count, tracking::curr, tracking::curr_angle, tracking::curr_in, tracking::curr_line, tracking::curr_out, dbg, tracking::direction, tracking::direction_matched, street_data::flags, iso8601_to_secs(), tracking::last, tracking::last_in, tracking::last_out, tracking::last_updated, tracking::lines, lvl_debug, lvl_error, lvl_info, tracking_line::next, tracking::no_gps, tracking::nostop_pref, attr::num, attr::numd, tracking::offroad_limit_pref, tracking::pos, tracking::pro, tracking::speed, attr::str, tracking_line::street, tracking::street_direction, tracking::time, tracking_angle_abs_diff(), tracking_angle_delta(), tracking_angle_diff(), tracking_doupdate_lines(), tracking_flush(), tracking_is_connected(), tracking_value(), transform_distance(), transform_distance_line_sq(), transform_from_geo(), transform_project(), tracking::tunnel, tracking::tunnel_extrapolation, attr::u, tracking::valid, value, tracking::vehicle, vehicle_get_attr(), attr::vehicleprofile, tracking::vehicleprofile, vehicleprofile_get_attr(), coord::x, and coord::y.
Referenced by navit_vehicle_update_position().
|
static |
References AF_UNDERGROUND, tracking_line::angle, tracking::angle_pref, street_data::c, c1, c2, tracking::connected_pref, tracking::curr_angle, tracking::curr_in, dbg, street_data::flags, street_data::item, tracking::last, tracking::last_out, lvl_info, tracking::no_gps, tracking::nostop_pref, offset, tracking::overspeed_percent_pref, tracking::overspeed_pref, vehicleprofile::roadprofile_hash, tracking::route_pref, tracking::rt, roadprofile::speed, tracking::speed, tracking_line::street, tracking_angle_delta(), tracking_is_connected(), tracking_is_no_stop(), tracking_is_on_route(), transform_distance_line_sq(), item::type, value, tracking::vehicleprofile, coord::x, and coord::y.
Referenced by tracking_map_get_item(), tracking_map_item_attr_get(), and tracking_update().
struct object_func tracking_func |
Navit, a modular navigation system. Copyright (C) 2005-2018 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.
Referenced by object_func_lookup(), and tracking_new().
|
static |
Referenced by tracking_map_rect_new().
|
static |
Referenced by tracking_map_new().