From ba1fa6cb4f36ea09ff11cff10e59051b8d1df3cb Mon Sep 17 00:00:00 2001 From: portree_kid Date: Thu, 2 Jul 2020 21:29:27 +0200 Subject: [PATCH] Check only for real runway ends --- src/renderer/utils/check.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/renderer/utils/check.js b/src/renderer/utils/check.js index 7b20662..ba1e585 100644 --- a/src/renderer/utils/check.js +++ b/src/renderer/utils/check.js @@ -81,6 +81,16 @@ async function checkGroundnet(data) { var node2 = graph[element.end]; node2[Number(element.start)] = 1; }); + var isLegitEnd = function(v) { + if( Object.keys(graph[v]).length <= 1 ) { + return true; + } + return Object.keys(graph[v]).filter( v => runwayNodes[v]).length === 0; + } + debugger; + runwayNodes = runwayNodes.filter( + (v, i) => isLegitEnd(v) + ); // Check if there is a route from every parking to every runway node var okNodes = []; logger('info', graph); @@ -142,9 +152,6 @@ async function checkGroundnet(data) { }); }); var rogueHoldPoints = pushbackNodes.map( - - //multiplePushbackRoutes.push(); - id => { var routes = noPushbackGraph[id]; if(Object.keys(routes).length<1)