Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions SysID/SysID.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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]
}
}
Expand Down
4 changes: 4 additions & 0 deletions SysID/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ <h2 style="text-align:center">Flight Data</h2>
}

function setMatrixA(vehicle_axis) {
let rows, cols, cellSelector, inputElement
if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") {
rows = 4;
cols = 4;
Expand Down Expand Up @@ -691,6 +692,7 @@ <h2 style="text-align:center">Flight Data</h2>
}

function setMatrixB(vehicle_axis) {
let rows, cols, cellSelector, inputElement
if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") {
rows = 4;
cols = 1;
Expand Down Expand Up @@ -723,6 +725,7 @@ <h2 style="text-align:center">Flight Data</h2>
}

function setH0(vehicle_axis) {
let rows, cols, cellSelector, inputElement
if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") {
rows = 2;
cols = 4;
Expand Down Expand Up @@ -757,6 +760,7 @@ <h2 style="text-align:center">Flight Data</h2>
}

function setH1(vehicle_axis) {
let rows, cols, cellSelector, inputElement
if (vehicle_axis == "MR_Roll" || vehicle_axis == "MR_Pitch") {
rows = 2;
cols = 4;
Expand Down
5 changes: 1 addition & 4 deletions eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Loading