Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / traffic_navigation / validTurns.h @ 1950

History | View | Annotate | Download (1.11 KB)

1
#ifndef _VALID_TURNS_
2
#define _VALID_TURNS_
3

    
4

    
5
/****************************
6
 * Intersection Information: 5-bit Integer
7
 *         3 bits of intersection type
8
 *         2 bits of entry information
9
 * 
10
 * Also contains a "feature id": 4 bits in positions 13,14,15,16
11
 *
12
 ****************************/
13

    
14
/********************************
15
 *  Intersection TYPES:
16
 *
17
 *  SINGLE      0
18
 *  ON_RAMP     1
19
 *  OFF_RAMP    2
20
 *  DOUBLE_C    3
21
 *  DOUBLE_T    4
22
 *
23
 ********************************/
24

    
25
 /********************************
26
 *  Turn TYPES:
27
 *  
28
 *  ISTRAIGHT                0
29
 *  ILEFT                1
30
 *  IRIGHT                2
31
 *  IUTURN                3
32
 *
33
 ********************************/
34

    
35

    
36
/********************************
37
 *  Intersection ENTRYPOINTS:
38
 *  INTERSECTION_DOUBLE_C
39
 *  use T-Junction positions
40
 *  
41
 *  INTERSECTION_DOUBLE_T
42
 *  TLEFT                0                        
43
 *  TRIGHT                1                        
44
 *  TMIDDLE                2
45
 *  
46
 *  INTERSECTION_SINGLE
47
 *  SACROSS                0
48
 *  SUP                1
49
 *  
50
 *  INTERSECTION_ON_RAMP
51
 *  R_LEFT                0
52
 *  R_RIGHT                1
53
 *  R_RAMP                2
54
 *  
55
 *  INTERSECTION_OFF_RAMP
56
 *  use On_ramp positions
57
 *
58
 *****************************/
59
 
60
int validateTurn(int barcode, int turn_type);
61
int getTurnType(int barcode);
62

    
63
#endif