Check in built version
This commit is contained in:
parent
c2b0fe2a7b
commit
ffca8da053
@ -115,7 +115,7 @@
|
||||
this.scanning = true
|
||||
const winURL = process.env.NODE_ENV === 'development'
|
||||
? `http://localhost:9080/src/renderer/utils/check.js`
|
||||
: `file://${__dirname}/check.js`
|
||||
: `file://${process.resourcesPath}/workers/check.js`
|
||||
console.log('make a check worker: ', path.resolve(__dirname, 'check.js'))
|
||||
|
||||
const worker = new Worker(winURL)
|
||||
@ -191,6 +191,9 @@
|
||||
} else if (o instanceof L.RunwayNode) {
|
||||
console.log(o)
|
||||
return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'type': 'runway' };
|
||||
} else if (o instanceof L.HoldNode) {
|
||||
console.log(o)
|
||||
return { 'index': Number(o['glueindex']), '_leaflet_id': o._leaflet_id, 'type': o.holdPointType };
|
||||
} else if (o instanceof L.Polyline) {
|
||||
console.log(o)
|
||||
return { 'start': Number(o['begin']), 'end': Number(o['end']), '_leaflet_id': o._leaflet_id, 'type': 'poly' };
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable */
|
||||
const winURL = process.env.NODE_ENV === 'development'
|
||||
? `http://localhost:9080/src/renderer/utils/`
|
||||
: `file://D:/GIT/flightgear-airports/src/renderer/utils/`
|
||||
: `file://${process.resourcesPath}/workers/`
|
||||
|
||||
var path = require('path');
|
||||
const fs = require('fs');
|
||||
@ -41,6 +41,7 @@ async function checkGroundnet(data) {
|
||||
// debugger;
|
||||
var parkings = data.map(mapParkings).filter(n => n !== undefined);
|
||||
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;
|
||||
@ -115,6 +116,12 @@ async function checkGroundnet(data) {
|
||||
this.postMessage(['progress', 1]);
|
||||
});
|
||||
});
|
||||
//Check for dual pushback/runway nodes
|
||||
runwayNodes.forEach(runwayNode => {
|
||||
if( pushbackNodes.indexOf(runwayNode) >= 0 ) {
|
||||
notOkNodes.push({id: runwayNode, message:'Dual runway/ pushback node'});
|
||||
}
|
||||
});
|
||||
|
||||
// check1(graph);
|
||||
// check2();
|
||||
@ -161,6 +168,12 @@ function check2(params) {
|
||||
|
||||
}
|
||||
|
||||
var mapPushbackNodes = function (o) {
|
||||
if(o.type === 'PushBack' )
|
||||
return o.index;
|
||||
console.log(o);
|
||||
}
|
||||
|
||||
var mapParkings = function (o) {
|
||||
if(o.type === 'parking')
|
||||
return o.index;
|
||||
|
Loading…
Reference in New Issue
Block a user