/[zanavi_public1]/navit/navit/route.h
ZANavi

Diff of /navit/navit/route.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 39 Revision 40
119 int percent; /**< ratio of lenneg to lenght of whole street in percent */ 119 int percent; /**< ratio of lenneg to lenght of whole street in percent */
120 struct street_data *street; /**< The street lp is on */ 120 struct street_data *street; /**< The street lp is on */
121 int street_direction; /**< Direction of vehicle on street -1 = Negative direction, 1 = Positive direction, 0 = Unknown */ 121 int street_direction; /**< Direction of vehicle on street -1 = Negative direction, 1 = Positive direction, 0 = Unknown */
122 int dir; /**< Direction to take when following the route -1 = Negative direction, 1 = Positive direction */ 122 int dir; /**< Direction to take when following the route -1 = Negative direction, 1 = Positive direction */
123}; 123};
124
125
126/**
127 * @brief A segment in the route graph or path
128 *
129 * This is a segment in the route graph or path. A segment represents a driveable way.
130 */
131struct route_segment_data
132{
133 struct item item; /**< The item (e.g. street) that this segment represents. */
134 int flags;
135 int len; /**< Length of this segment */
136/*NOTE: After a segment, various fields may follow, depending on what flags are set. Order of fields:
137 1.) maxspeed Maximum allowed speed on this segment. Present if NAVIT_AF_SPEED_LIMIT is set.
138 2.) offset If the item is segmented (i.e. represented by more than one segment), this
139 indicates the position of this segment in the item. Present if NAVIT_AF_SEGMENTED is set.
140 */
141};
142
143struct size_weight_limit
144{
145 int width;
146 int length;
147 int height;
148 int weight;
149 int axle_weight;
150};
151
152
153/**
154 * @brief A point in the route graph
155 *
156 * This represents a point in the route graph. A point usually connects two or more segments,
157 * but there are also points which don't do that (e.g. at the end of a dead-end).
158 */
159struct route_graph_point
160{
161 struct route_graph_point *hash_next; /**< Pointer to a chained hashlist of all route_graph_points with this hash */
162 struct route_graph_segment *start; /**< Pointer to a list of segments of which this point is the start. The links
163 * of this linked-list are in route_graph_segment->start_next.*/
164 struct route_graph_segment *end; /**< Pointer to a list of segments of which this pointer is the end. The links
165 * of this linked-list are in route_graph_segment->end_next. */
166 struct route_graph_segment *seg; /**< Pointer to the segment one should use to reach the destination at
167 * least costs */
168 struct fibheap_el *el; /**< When this point is put on a Fibonacci heap, this is a pointer
169 * to this point's heap-element */
170 int value; /**< The cost at which one can reach the destination from this point on */
171 struct coord c; /**< Coordinates of this point */
172 int flags; /**< Flags for this point (eg traffic distortion) */
173
174 /*
175 Dijkstra values:
176 ================
177 seg -> what segment to use
178 value -> cost to reach destination
179 */
180};
181
182
183struct route_graph_segment_data
184{
185 struct item *item;
186 int offset;
187 int flags;
188 int len;
189 int maxspeed;
190 struct size_weight_limit size_weight;
191 int dangerous_goods;
192};
193
194/**
195 * @brief A segment in the route graph
196 *
197 * This is a segment in the route graph. A segment represents a driveable way.
198 */
199struct route_graph_segment
200{
201 struct route_graph_segment *next; /**< Linked-list pointer to a list of all route_graph_segments */
202 struct route_graph_segment *start_next; /**< Pointer to the next element in the list of segments that start at the
203 * same point. Start of this list is in route_graph_point->start. */
204 struct route_graph_segment *end_next; /**< Pointer to the next element in the list of segments that end at the
205 * same point. Start of this list is in route_graph_point->end. */
206 struct route_graph_point *start; /**< Pointer to the point this segment starts at. */
207 struct route_graph_point *end; /**< Pointer to the point this segment ends at. */
208
209 // -- NEW --
210 struct coord c_start_plus_1; // second coord
211 struct coord c_end_minus_1; // second to last coord
212 // -- NEW --
213
214 struct route_segment_data data; /**< The segment data */
215};
216
217
218
219
220
221
222
124 223
125struct street_data; 224struct street_data;
126struct tracking; 225struct tracking;
127struct vehicleprofile; 226struct vehicleprofile;
128struct route *route_new(struct attr *parent, struct attr **attrs); 227struct route *route_new(struct attr *parent, struct attr **attrs);
161void route_init(void); 260void route_init(void);
162void route_destroy(struct route *this_); 261void route_destroy(struct route *this_);
163void route_path_destroy(struct route_path *this, int recurse); 262void route_path_destroy(struct route_path *this, int recurse);
164void route_graph_destroy(struct route_graph *this); 263void route_graph_destroy(struct route_graph *this);
165void route_path_update(struct route *this, int cancel, int async); 264void route_path_update(struct route *this, int cancel, int async);
265int route_get_real_oneway_mask(int road_flag, int mask);
266struct route_graph_segment *route_graph_get_segment(struct route_graph *graph, struct street_data *sd, struct route_graph_segment *last);
267
166/* end of prototypes */ 268/* end of prototypes */
167#ifdef __cplusplus 269#ifdef __cplusplus
168} 270}
169#endif 271#endif
170 272

Legend:
Removed from v.39  
changed lines
  Added in v.40

   
Visit the ZANavi Wiki