adjusted to in/out. only emit one of them for depart/arrive
This commit is contained in:
committed by
Patrick Niklaus
parent
4d9aa65e78
commit
9c8bf820de
@@ -17,8 +17,8 @@ Feature: Intersections Data
|
||||
| bd | corner |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270 false:0,true:90 true:180 false:270;true:90 true:270 false:0 |
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270,true:90 true:180 false:270;true:90 true:270 |
|
||||
|
||||
Scenario: Passing Three Way North
|
||||
Given the node map
|
||||
@@ -32,8 +32,8 @@ Feature: Intersections Data
|
||||
| bd | corner |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270 false:0,true:0 true:90 false:270;true:90 true:270 false:0 |
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270,true:0 true:90 false:270;true:90 true:270 |
|
||||
|
||||
Scenario: Passing Oneway Street In
|
||||
Given the node map
|
||||
@@ -48,7 +48,7 @@ Feature: Intersections Data
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270 false:0,false:0 true:90 false:270;true:90 true:270 false:0 |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270,false:0 true:90 false:270;true:90 true:270 |
|
||||
|
||||
Scenario: Passing Oneway Street Out
|
||||
Given the node map
|
||||
@@ -62,8 +62,8 @@ Feature: Intersections Data
|
||||
| bd | corner | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270 false:0,true:0 true:90 false:270;true:90 true:270 false:0 |
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,c | through,through | depart,arrive | true:90 true:270,true:0 true:90 false:270;true:90 true:270 |
|
||||
|
||||
Scenario: Passing Two Intersections
|
||||
Given the node map
|
||||
@@ -80,8 +80,8 @@ Feature: Intersections Data
|
||||
| cf | corner |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,d | through,through | depart,arrive | true:90 true:270 false:0,true:0 true:90 false:270,true:90 true:180 false:270;true:90 true:270 false:0 |
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,d | through,through | depart,arrive | true:90 true:270,true:0 true:90 false:270,true:90 true:180 false:270;true:90 true:270 |
|
||||
|
||||
Scenario: Passing Two Intersections, Collapsing
|
||||
Given the node map
|
||||
@@ -98,9 +98,9 @@ Feature: Intersections Data
|
||||
| cf | corner |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,d | through,through | depart,arrive | true:90 true:270 false:0,true:0 true:90 false:270,true:90 true:180 false:270;true:90 true:270 false:0 |
|
||||
| f,a | corner,throughbridge,through | depart,end of road left,arrive | true:0 true:180;true:90 false:180 true:270,true:0 false:90 true:270;true:90 true:270 false:0 |
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,d | through,through | depart,arrive | true:90 true:270,true:0 true:90 false:270,true:90 true:180 false:270;true:90 true:270 |
|
||||
| f,a | corner,throughbridge,through | depart,end of road left,arrive | true:0 true:180;true:90 false:180 true:270,true:0 false:90 true:270;true:90 true:270 |
|
||||
|
||||
Scenario: Roundabouts
|
||||
Given the node map
|
||||
@@ -125,10 +125,10 @@ Feature: Intersections Data
|
||||
| hd | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| e,f | ea,fb,fb | depart,abcda-exit-1,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:90 true:270 false:0 |
|
||||
| e,g | ea,gc,gc | depart,abcda-exit-2,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270,true:30 true:180 false:330;true:0 true:180 |
|
||||
| e,h | ea,hd,hd | depart,abcda-exit-3,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270,true:30 true:180 false:330,true:90 false:210 true:330;true:90 true:270 false:0 |
|
||||
| e,2 | ea,abcda,abcda | depart,abcda-exit-undefined,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:146 false:326 false:0 |
|
||||
| 1,g | abcda,gc,gc | depart,abcda-exit-2,arrive | false:34 true:214 false:0;false:34 true:214,false:30 true:150 true:270,true:30 true:180 false:330;true:0 true:180 |
|
||||
| 1,3 | abcda,abcda | depart,arrive | false:34 true:214 false:0,false:30 true:150 true:270,true:30 true:180 false:330;true:34 false:214 false:0 |
|
||||
| waypoints | route | turns | intersections |
|
||||
| e,f | ea,fb,fb | depart,abcda-exit-1,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:90 true:270 |
|
||||
| e,g | ea,gc,gc | depart,abcda-exit-2,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270,true:30 true:180 false:330;true:0 true:180 |
|
||||
| e,h | ea,hd,hd | depart,abcda-exit-3,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270,true:30 true:180 false:330,true:90 false:210 true:330;true:90 true:270 |
|
||||
| e,2 | ea,abcda,abcda | depart,abcda-exit-undefined,arrive | true:0 true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:146 false:326 |
|
||||
| 1,g | abcda,gc,gc | depart,abcda-exit-2,arrive | false:34 true:214;false:34 true:214,false:30 true:150 true:270,true:30 true:180 false:330;true:0 true:180 |
|
||||
| 1,3 | abcda,abcda | depart,arrive | false:34 true:214,false:30 true:150 true:270,true:30 true:180 false:330;true:34 false:214 |
|
||||
|
||||
@@ -138,7 +138,9 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
this.bearingList = (instructions) => {
|
||||
return this.extractInstructionList(instructions, s => s.intersections[0].bearings[s.intersections[0].bearing_after]);
|
||||
return this.extractInstructionList(instructions, s => (typeof s.intersections[0].out !== 'undefined')
|
||||
? s.intersections[0].bearings[s.intersections[0].out]
|
||||
: 0);
|
||||
};
|
||||
|
||||
this.annotationList = (instructions) => {
|
||||
@@ -187,8 +189,8 @@ module.exports = function () {
|
||||
for( i = 1; i < intersection.bearings.length; ++i )
|
||||
string = string + ' ' + intersection.entry[i]+':'+intersection.bearings[i];
|
||||
return string;
|
||||
}).join(',')
|
||||
}).join(';')
|
||||
}).join(',');
|
||||
}).join(';');
|
||||
};
|
||||
|
||||
this.modeList = (instructions) => {
|
||||
|
||||
Reference in New Issue
Block a user