diff --git a/SysID/SysID.js b/SysID/SysID.js index 0e819e1b..47ac9bcf 100644 --- a/SysID/SysID.js +++ b/SysID/SysID.js @@ -416,7 +416,7 @@ async function run_transfer_function_ID(parser) { const ind2_i = nearestIndex(timeData_arr, t_end*1000000) console.log("ind1: ",ind1_i," ind2: ",ind2_i) - timeData = Array.from(timeData_arr) + let timeData = Array.from(timeData_arr) console.log("time field pre slicing size: ", timeData.length) timeData = timeData.slice(ind1_i, ind2_i) @@ -453,7 +453,7 @@ async function run_transfer_function_ID(parser) { mult = parseFloat(outputValues.multipliers[0]) } let ang_data = parser.get("ATT", outputValues.compensations[0]) - ang_data_arr = Array.from(ang_data) + let ang_data_arr = Array.from(ang_data) ang_data_arr.slice(att_ind1, att_ind2) console.log("data field ", outputValues.compensations[0], " pre slicing size: ", outputData.length) const G = 9.81 @@ -677,7 +677,7 @@ async function run_SS_ID(parser) { const ind2_i = nearestIndex(timeData_arr, t_end_ss*1000000) console.log("ind1: ",ind1_i," ind2: ",ind2_i) - timeData = Array.from(timeData_arr) + let timeData = Array.from(timeData_arr) console.log("time field pre slicing size: ",timeData.length) timeData = timeData.slice(ind1_i, ind2_i) @@ -718,19 +718,17 @@ async function run_SS_ID(parser) { mult = parseFloat(outputValues.multipliers[i]) } let ang_data = parser.get("ATT", outputValues.compensations[i]) - ang_data_arr = Array.from(ang_data) + let ang_data_arr = Array.from(ang_data) ang_data_arr.slice(att_ind1, att_ind2) console.log("data field ", outputValues.compensations[i], " pre slicing size: ", data_arr.length) const G = 9.81 if (outputValues.compensations[i] == "Roll") { for (let j = 0; j < data_arr.length; j++) { - temp_data = data_arr[j] data_arr[j] = data_arr[j] + (Math.PI/180) * mult * G * ang_data_arr[att_ind1 + j] } } if (outputValues.compensations[i] == "Pitch") { for (let j = 0; j < data_arr.length; j++) { - temp_data = data_arr[j] data_arr[j] = data_arr[j] - (Math.PI/180) * mult * G * ang_data_arr[att_ind1 + j] } } diff --git a/SysID/index.html b/SysID/index.html index 9e00eb61..8340279e 100644 --- a/SysID/index.html +++ b/SysID/index.html @@ -593,6 +593,7 @@

Flight Data

} function setMatrixA(vehicle_axis) { + let rows, cols, cellSelector, inputElement if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") { rows = 4; cols = 4; @@ -691,6 +692,7 @@

Flight Data

} function setMatrixB(vehicle_axis) { + let rows, cols, cellSelector, inputElement if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") { rows = 4; cols = 1; @@ -723,6 +725,7 @@

Flight Data

} function setH0(vehicle_axis) { + let rows, cols, cellSelector, inputElement if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") { rows = 2; cols = 4; @@ -757,6 +760,7 @@

Flight Data

} function setH1(vehicle_axis) { + let rows, cols, cellSelector, inputElement if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") { rows = 2; cols = 4; diff --git a/eslint-suppressions.json b/eslint-suppressions.json index d509b65e..f7d18107 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -123,13 +123,10 @@ }, "SysID/SysID.js": { "no-undef": { - "count": 27 + "count": 3 } }, "SysID/index.html": { - "no-undef": { - "count": 132 - }, "no-unused-vars": { "count": 1 }