QC: Add gun deltas warning check

This commit is contained in:
D. Berge
2020-09-12 21:22:34 +02:00
parent 69f43c129b
commit 52cdc8904b
2 changed files with 32 additions and 0 deletions

View File

@@ -122,6 +122,37 @@
true;
}
-
name: "Synchronisation (warning)"
check: |
const currentShot = currentItem;
const gunData = currentShot._("raw_meta.smsrc");
let result = [];
if (gunData && gunData.num_nofire == 0) {
// These are the indices into the gun array for the different
// values of interest.
const subarray = 0;
const aimpoint = 7;
const firetime = 8;
// We only care about the source which actually fired (or was supposed to)
const sourceFired = gunData.guns.filter(g => g[2] == gunData.src_number);
sourceFired
.filter(gun => Math.abs(gun[firetime]-gun[aimpoint]) >= parameters.gunTimingWarning && Math.abs(gun[firetime]-gun[aimpoint]) <= parameters.gunTiming)
.forEach(gun => {
const value = Math.abs(gun[firetime]-gun[aimpoint]);
result.push(`Delta error: source ${gun[2]}, string ${gun[0]}, gun ${gun[1]}: ${parameters.gunTimingWarning} ≤ ${value.toFixed(2)} ≤ ${parameters.gunTimingWarning}`);
});
}
if (result.length) {
result.join("; ");
} else {
// Either there were no error or gun data was missing, which we take care of elsewhere
true;
}
-
name: "Autofire"
check: |

View File

@@ -1,6 +1,7 @@
gunDepth: 6.0
gunDepthTolerance: 0.5
gunTimingWarning: 1.0
gunTiming: 1.5
gunTimingSubarrayAverage: 0.5
gunPressureNominal: 2000