Check of RunwayNodes
This commit is contained in:
parent
503dacd54a
commit
fc25b62737
@ -46,11 +46,11 @@
|
||||
this.$store.dispatch('removeFrequency', this.frequency)
|
||||
},
|
||||
isValid (frequency) {
|
||||
let ok = frequency >= 118 && frequency <= 137
|
||||
let ok = frequency >= 11800 && frequency <= 13700
|
||||
if (!ok) {
|
||||
return false
|
||||
}
|
||||
let fractions = (frequency - Math.trunc(frequency)) * 1000
|
||||
let fractions = (frequency - (Math.trunc(frequency/100)*100))
|
||||
let subFraction = Math.round(fractions % 25)
|
||||
switch (subFraction) {
|
||||
case 0:
|
||||
@ -100,7 +100,7 @@
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
this.frequency.value = newValue;
|
||||
ok = this.isValid(newValue);
|
||||
this.ok = this.isValid(newValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,11 +125,17 @@ async function checkGroundnet(data) {
|
||||
|
||||
okNodes = okNodes.filter((v, i) => okNodes.indexOf(v) === i);
|
||||
var allLegitimateEndNodes = parkings.concat(runwayNodes).concat(pushbackNodes);
|
||||
var notOkNodes = parkings.concat(runwayNodes).filter(
|
||||
var notOkNodes = parkings.filter(
|
||||
(v, i) => okNodes.indexOf(v) < 0
|
||||
).map(
|
||||
id => { return { id: id, message: 'No way to each runway' } }
|
||||
id => { return { id: id, message: 'No way from parking to each runway' } }
|
||||
);
|
||||
var notOkNodes2 = runwayNodes.filter(
|
||||
(v, i) => okNodes.indexOf(v) < 0
|
||||
).map(
|
||||
id => { return { id: id, message: 'No way from runway to each parking' } }
|
||||
);
|
||||
|
||||
if (parkings.length === 0) {
|
||||
notOkNodes.push({ id: 0, message: 'No parkings' });
|
||||
}
|
||||
@ -146,6 +152,8 @@ async function checkGroundnet(data) {
|
||||
v => { return { id: Number(v[0]), message: 'Node not a legimate end' } }
|
||||
);
|
||||
notOkNodes = notOkNodes.concat(danglingEnds);
|
||||
notOkNodes = notOkNodes.concat(notOkNodes2);
|
||||
|
||||
// Ends that are not on Runway and not a Parking or Pushback
|
||||
var wrongPushbackEnds = pushbackNodes.filter(
|
||||
(v, i) => allEnds.map(a => Number(a[0])).indexOf(Number(v)) < 0
|
||||
|
Loading…
Reference in New Issue
Block a user