This commit is contained in:
@@ -70,7 +70,7 @@ async function checkGroundnet(data) {
|
||||
var normalNodes = data.map(mapEdges).filter(n => n !== undefined)
|
||||
.flatMap(m => m.latLngs).filter(n => runwayNodeIDs.indexOf(Number(n.index)) < 0);
|
||||
|
||||
var runways = data.map(mapRunways).filter(n => n !== undefined);
|
||||
var takeoffPads = data.map(mapTakeoffPads).filter(n => n !== undefined);
|
||||
|
||||
this.max = 30;
|
||||
this.postMessage(['max', this.max]);
|
||||
@@ -104,7 +104,8 @@ async function checkGroundnet(data) {
|
||||
resolve([{ id: -1, message: check_msg.NO_EDGES }]);
|
||||
}
|
||||
this.postMessage(['progress', 1]);
|
||||
if (runways.length === 0) {
|
||||
//debugger;
|
||||
if (takeoffPads.length === 0) {
|
||||
resolve([{ id: -1, message: check_msg.NO_RUNWAYS }]);
|
||||
}
|
||||
this.postMessage(['progress', 1]);
|
||||
@@ -297,7 +298,7 @@ async function checkGroundnet(data) {
|
||||
var notOkNodesRunways = runwayNodeIDs.filter(
|
||||
(v, i) => okNodes.indexOf(v) < 0
|
||||
).map(
|
||||
id => { return { id: id, message: check_msg.NO_RUNWAY_ROUTE } }
|
||||
id => { return { id: id, message: check_msg.NO_PARKING_ROUTE } }
|
||||
);
|
||||
this.postMessage(['progress', 1]);
|
||||
|
||||
@@ -382,7 +383,8 @@ async function checkGroundnet(data) {
|
||||
this.postMessage(['progress', 1]);
|
||||
//Check if runwaynodes are on runway
|
||||
runwayNodes.forEach(runwayNode => {
|
||||
if (runways.filter(r => turf.booleanContains(r, latToTurf(runwayNode))).length === 0) {
|
||||
// debugger;
|
||||
if (takeoffPads.filter(r => turf.booleanContains(r, latToTurf(runwayNode))).length === 0) {
|
||||
notOkNodes.push({ id: runwayNode.index, message: check_msg.RUNWAY_NODE_NOT_ON_RUNWAY });
|
||||
}
|
||||
});
|
||||
@@ -391,7 +393,7 @@ async function checkGroundnet(data) {
|
||||
//Check if nodes no normal nodes are on runway
|
||||
normalNodes.forEach(normalNode => {
|
||||
//debugger;
|
||||
if (runways.filter(r => turf.booleanContains(r, latToTurf(normalNode))).length > 0) {
|
||||
if (takeoffPads.filter(r => turf.booleanContains(r, latToTurf(normalNode))).length > 0) {
|
||||
notOkNodes.push({ id: normalNode.index, message: check_msg.NON_RUNWAYNODE_ON_RUNWAY });
|
||||
}
|
||||
});
|
||||
@@ -514,8 +516,8 @@ var mapRunwayNode = function (o) {
|
||||
}
|
||||
}
|
||||
|
||||
var mapRunways = function (o) {
|
||||
if (o.type === 'runway_poly') {
|
||||
var mapTakeoffPads = function (o) {
|
||||
if (o.type === 'takeoffpad_poly') {
|
||||
var pts = o.pavement[0].map(latLngToArray);
|
||||
pts.push(pts[0]);
|
||||
return turf.polygon([pts]);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"LONG_ROUTE_START" : ["Start of long route", "Route segments of >2km are Taxidraw artefacts"],
|
||||
"LONG_ROUTE_END": ["End of long route", "Route segments of >2km are Taxidraw artefacts"],
|
||||
"EDGE_MISSING_DIRECTION": ["Edge missing direction", "Each edge must have a direction (forward, backward, bi-directional)"],
|
||||
"NO_RUNWAY_ROUTE": ["No way from parking to each runway", ""],
|
||||
"NO_PARKING_ROUTE": ["No way from runway to each parking", ""],
|
||||
"NO_RUNWAY_ROUTE": ["No way from parking to each runway", "There must be a route from each parking to each runway."],
|
||||
"NO_PARKING_ROUTE": ["No way from runway to each parking", "There must be a route from each runway to each parking."],
|
||||
"NO_PARKINGS": ["No parkings", ""],
|
||||
"NO_RUNWAY_NODES": ["No Runwaynodes", "Fine for parking only"],
|
||||
"NOT_LEGIT_END": ["Node not a legimate end", "Taxiroutes must end either at a parking or on a runway"],
|
||||
@@ -13,19 +13,19 @@
|
||||
"TYPE_EMPTY" :["Parking type empty", "The parking type must not be empty"],
|
||||
"PARKING_TYPE_INVALID" :["Parking type not valid", "The type of parking must be one of ()"],
|
||||
"DUAL_PUSHBACK": ["Dual runway/ pushback node", "A runway node can not be a hold node at the same time"],
|
||||
"RUNWAY_NODE_NOT_ON_RUNWAY" : ["Runwaynode not on runway", ""],
|
||||
"NON_RUNWAYNODE_ON_RUNWAY": ["Non Runwaynode on runway", ""],
|
||||
"RUNWAY_NODE_NOT_ON_RUNWAY" : ["Runwaynode not in takeoff pad", ""],
|
||||
"NON_RUNWAYNODE_ON_RUNWAY": ["Non Runwaynode in takeoff pad", ""],
|
||||
"PARKINGS_VALID": ["Parkings valid", "All Ok"],
|
||||
"NO_OVERLAPPING_PARKINGS": ["No parkings overlapping", ""],
|
||||
"NO_OVERLAPPING_PARKINGS": ["No parkings overlapping", "Parking positions may not overlap. Reduce the radius or move."],
|
||||
"NO_INVALID_ENDS": ["No invalid ends", ""],
|
||||
"ROUTES_FROM_PARKINGS_OK": ["Routes from parkings OK", ""],
|
||||
"ROUTES_FROM_RUNWAYS_OK": ["Routes from runways OK", ""],
|
||||
"PUSHBACK_ROUTES_OK": ["Pushback routes OK", ""],
|
||||
"UNCONNECTED_PUSHBACK": ["Unconnected Pushbacknode", ""],
|
||||
"NO_WAY_TO_HOLDPOINT":["No way to pushback holdpoint", "There is no route to the pushback hold point"],
|
||||
"NO_WAY_TO_HOLDPOINT":["No way to pushback holdpoint", "There is no route from the parking to the pushback hold point-"],
|
||||
"MULTIPLE_PUSHBACK": ["Multiple connected pushback points", "There are more than one possible pushback holdpoint routes."],
|
||||
"PUSHBACK_NOT_CONNECTED": ["Pushback Holding Point not Connected to Pushback Route", ""],
|
||||
"TO_MANY_PUSHBACK_TAXI_ROUTES": ["Too many Taxi routes from Pushback Holding Point", ""],
|
||||
"TO_MANY_PUSHBACK_TAXI_ROUTES": ["Too many Taxi routes from Pushback Holding Point", "There must be only one pushback point reachable from the parking."],
|
||||
"PUSHBACK_EXIT_NOT_BIDRECTIONAL": ["Pushback Holding Point Exit route is not bidirectional", ""],
|
||||
"NO_EDGES": ["No Edges", "No checks are run if there are no edges present"],
|
||||
"NO_RUNWAYS": ["No Runways", "No checks are run if there are no runways present. APT layer visible?"],
|
||||
|
||||
Reference in New Issue
Block a user