This commit is contained in:
portree_kid
2020-03-20 17:30:53 +01:00
parent ffca8da053
commit ec629a7ef4
6 changed files with 13 additions and 9 deletions
+6 -4
View File
@@ -73,16 +73,18 @@ async function checkGroundnet(data) {
if(ok) {
okNodes.push(parkingNode);
okNodes.push(runwayNode);
}
} else {
console.log(`No route from ${parkingNode} to ${runwayNode}`);
}
this.postMessage(['progress', 1]);
});
});
okNodes = okNodes.filter((v,i) => okNodes.indexOf(v) === i);
var allLegitimateEndNodes = parkings.concat(runwayNodes);
var notOkNodes = allLegitimateEndNodes.filter(
var allLegitimateEndNodes = parkings.concat(runwayNodes).concat(pushbackNodes);
var notOkNodes = parkings.concat(runwayNodes).filter(
(v,i) => okNodes.indexOf(v) < 0
).map(
id => {return {id:id, message:'Node not connected'}}
id => {return {id:id, message:'No way to each runway'}}
);
if (parkings.length === 0) {
notOkNodes.push({id:0, message:'No parkings'});