From d80a308f4d28eccf92b945b32726aab9476f405e Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sun, 24 May 2020 22:07:24 +0200 Subject: [PATCH] Removed check for end --- src/renderer/utils/check.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/renderer/utils/check.js b/src/renderer/utils/check.js index 34669c4..7bcc318 100644 --- a/src/renderer/utils/check.js +++ b/src/renderer/utils/check.js @@ -43,8 +43,8 @@ async function checkGroundnet(data) { var runwayNodes = data.map(mapRunwayNodes).filter(n => n !== undefined); var pushbackNodes = data.map(mapPushbackNodes).filter(n => n !== undefined); var edges = data.map(mapEdges).filter(n => n !== undefined); - this.max = parkings.length * runwayNodes.length + - parkings.length; + this.max = 4 * parkings.length * runwayNodes.length + + 3 * parkings.length; this.postMessage(['max', this.max]); var graph = {}; @@ -59,7 +59,7 @@ async function checkGroundnet(data) { edges.forEach(edge => { graph[edge.start] = {}; graph[edge.end] = {}; - //debugger; + // Check if there are segments > 2km edge.latLngs.forEach((latLng, index, arr) => { if (index>0) { var d = distance([arr[index-1].lng, arr[index-1].lat], [latLng.lng, latLng.lat]); @@ -169,12 +169,13 @@ async function checkGroundnet(data) { notOkNodes = notOkNodes.concat(notOkNodes2); // Ends that are not on Runway and not a Parking or Pushback - var wrongPushbackEnds = pushbackNodes.filter( + /*var wrongPushbackEnds = pushbackNodes.filter( (v, i) => allEnds.map(a => Number(a[0])).indexOf(Number(v)) < 0 ).map( v => { return { id: Number(v), message: 'Pushback node not an end' } } ); - notOkNodes = notOkNodes.concat(wrongPushbackEnds).concat(wrongPushbackRoutes); + notOkNodes = notOkNodes.concat(wrongPushbackEnds)*/ + notOkNodes = notOkNodes.concat(wrongPushbackRoutes); var parkingNodes = data.map(mapParkingNode).filter(n => n !== undefined); @@ -203,7 +204,7 @@ async function checkGroundnet(data) { this.postMessage(['progress', 1]); } }); - // Check for intersecting radii + // Check for name parkingNodes.forEach(parkingNode => { if (!parkingNode.name || /^\s*$/.test(parkingNode.name)) { notOkNodes.push({ id: parkingNode.index, message: 'Empty name' });