track.c (navit-0.5.5) | : | track.c (navit-0.5.6) | ||
---|---|---|---|---|
skipping to change at line 85 | skipping to change at line 85 | |||
struct cdf_speed *speed_hist; | struct cdf_speed *speed_hist; | |||
struct pcoord *pos_hist; | struct pcoord *pos_hist; | |||
int *dir_hist; | int *dir_hist; | |||
double last_dist; | double last_dist; | |||
struct pcoord last_out; | struct pcoord last_out; | |||
int last_dir; | int last_dir; | |||
}; | }; | |||
struct tracking { | struct tracking { | |||
NAVIT_OBJECT | NAVIT_OBJECT | |||
struct callback_list *callback_list; | struct callback_list *callback_list; /**< Callbacks which will be called | |||
struct mapset *ms; | whenever the position changes */ | |||
struct route *rt; | struct mapset *ms; /**< The mapset */ | |||
struct map *map; | struct route *rt; /**< The route */ | |||
struct vehicle *vehicle; | struct map *map; /**< The tracking map which holds o | |||
struct vehicleprofile *vehicleprofile; | ur past movements */ | |||
struct vehicle *vehicle; /**< The vehicle from which we are | ||||
obtaining location data */ | ||||
struct vehicleprofile *vehicleprofile; /**< The current vehicle profile */ | ||||
struct coord last_updated; | struct coord last_updated; | |||
struct tracking_line *lines; | struct tracking_line *lines; | |||
struct tracking_line *curr_line; | struct tracking_line *curr_line; | |||
int pos; | int pos; | |||
struct coord curr[2], curr_in, curr_out; | struct coord curr[2], curr_in, curr_out; | |||
int curr_angle; | int curr_angle; | |||
struct coord last[2], last_in, last_out; | struct coord last[2], last_in, last_out; | |||
struct cdf_data cdf; | struct cdf_data cdf; | |||
struct attr *attr; | struct attr *attr; | |||
int valid; | int valid; /**< Whether we have valid location data */ | |||
int time; | int time; | |||
double direction, direction_matched; | double direction, direction_matched; | |||
double speed; | double speed; /**< Current speed */ | |||
int coord_geo_valid; | int coord_geo_valid; | |||
struct coord_geo coord_geo; | struct coord_geo coord_geo; | |||
enum projection pro; | enum projection pro; | |||
int street_direction; | int street_direction; | |||
int no_gps; | int no_gps; | |||
int tunnel; | int tunnel; /**< Whether we are in a tunnel */ | |||
int angle_pref; | int angle_pref; | |||
int connected_pref; | int connected_pref; | |||
int nostop_pref; | int nostop_pref; | |||
int offroad_limit_pref; | int offroad_limit_pref; | |||
int route_pref; | int route_pref; | |||
int overspeed_pref; | int overspeed_pref; | |||
int overspeed_percent_pref; | int overspeed_percent_pref; | |||
int tunnel_extrapolation; | int tunnel_extrapolation; | |||
}; | }; | |||
skipping to change at line 630 | skipping to change at line 630 | |||
if (!vehicle_get_attr(tr->vehicle, attr_position_valid, &valid, NULL)) | if (!vehicle_get_attr(tr->vehicle, attr_position_valid, &valid, NULL)) | |||
valid.u.num=attr_position_valid_valid; | valid.u.num=attr_position_valid_valid; | |||
if (valid.u.num == attr_position_valid_invalid) { | if (valid.u.num == attr_position_valid_invalid) { | |||
tr->valid=valid.u.num; | tr->valid=valid.u.num; | |||
return; | return; | |||
} | } | |||
if (!vehicle_get_attr(tr->vehicle, attr_position_speed, &speed_attr, NULL) | | | if (!vehicle_get_attr(tr->vehicle, attr_position_speed, &speed_attr, NULL) | | | |||
!vehicle_get_attr(tr->vehicle, attr_position_direction, &direction_a ttr, NULL) || | !vehicle_get_attr(tr->vehicle, attr_position_direction, &direction_a ttr, NULL) || | |||
!vehicle_get_attr(tr->vehicle, attr_position_coord_geo, &coord_geo, NULL) || | !vehicle_get_attr(tr->vehicle, attr_position_coord_geo, &coord_geo, NULL) || | |||
!vehicle_get_attr(tr->vehicle, attr_position_time_iso8601, &time_att r, NULL)) { | !vehicle_get_attr(tr->vehicle, attr_position_time_iso8601, &time_att r, NULL)) { | |||
dbg(lvl_error,"failed to get position data %d %d %d", | dbg(lvl_error,"failed to get position data speed:%d direction:%d coord:% d time:%d", | |||
vehicle_get_attr(tr->vehicle, attr_position_speed, &speed_attr, NULL ), | vehicle_get_attr(tr->vehicle, attr_position_speed, &speed_attr, NULL ), | |||
vehicle_get_attr(tr->vehicle, attr_position_direction, &direction_at tr, NULL), | vehicle_get_attr(tr->vehicle, attr_position_direction, &direction_at tr, NULL), | |||
vehicle_get_attr(tr->vehicle, attr_position_coord_geo, &coord_geo, N | vehicle_get_attr(tr->vehicle, attr_position_coord_geo, &coord_geo, N | |||
ULL)); | ULL), | |||
vehicle_get_attr(tr->vehicle, attr_position_time_iso8601, &time_attr | ||||
, NULL)); | ||||
return; | return; | |||
} | } | |||
if (tr->tunnel_extrapolation) { | if (tr->tunnel_extrapolation) { | |||
struct attr fix_type; | struct attr fix_type; | |||
if (!vehicle_get_attr(tr->vehicle, attr_position_fix_type, &fix_type, NU LL)) | if (!vehicle_get_attr(tr->vehicle, attr_position_fix_type, &fix_type, NU LL)) | |||
fix_type.u.num=2; | fix_type.u.num=2; | |||
if (fix_type.u.num) { | if (fix_type.u.num) { | |||
tr->no_gps=0; | tr->no_gps=0; | |||
tr->tunnel=0; | tr->tunnel=0; | |||
} else | } else | |||
End of changes. 6 change blocks. | ||||
12 lines changed or deleted | 17 lines changed or added |