const tuning = []; /** * 測定時刻指定フォーム・操作ボタン作成 */ function make_select_form() { var date = new Date(); const y = date.getFullYear(); const m = date.getMonth() + 1; const d = date.getDate(); const h = date.getHours(); const ii = date.getMinutes(); var html_code = '
場所 | '; for (var i = 0; i < suishitsu_list.length; i++) { var kome = ''; /* if(suishitsu_list[i] == "三浦") { kome = "' + suishitsu_list[i] + kome + ' | '; } else { html_code += '' + suishitsu_list[i] + kome + ' | '; } } html_code += '|||
測定日時 | '; for (var i = 0; i < suishitsu_list.length; i++) { if( typeof suishitsu[i] === "undefined" ){ // Add html_code += '--- --- | ';
continue;
}
if (buoy == suishitsu_list[i]) {
html_code +=
'' + suishitsu[i][0] + ' ' + suishitsu[i][1] + ' | ';
} else {
html_code += '' + suishitsu[i][0] + ' ' + suishitsu[i][1] + ' | ';
}
}
html_code += '||
水温[℃] | '; html_code += '' + deep_list[0] + ' | '; for (var i = 0; i < suishitsu_list.length; i++) { if( typeof suishitsu[i] === "undefined" ){ // Add html_code += '欠測 | '; continue; } if (suishitsu[i] == -1) { html_code += '欠測 | '; continue; } if (suishitsu[i][2] != 'Err') { if (mode == 0) { var value = round_data(suishitsu[i][2], 1); } else { var value = suishitsu[i][2]; } } else { if (!sensor_list[suishitsu_list[i]][2]) { var value = 'NA'; } else { var value = err; } } if (buoy == suishitsu_list[i]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '
' + deep_list[i] + ' | '; for (var j = 0; j < suishitsu_list.length; j++) { if( typeof suishitsu[j] === "undefined" ){ // Add continue; } if (suishitsu[j] == -1) continue; var value; switch (deep_list[i]) { case '10m': if (!sensor_list[suishitsu_list[j]][6]) { value = 'NA'; break; } //value = (parseFloat(suishitsu[j][6]) + parseFloat(suishitsu[j][10])) / 2; value = 0; var count = 0; if (suishitsu[j][6] != 'Err') { value += parseFloat(suishitsu[j][6]); count++; } if (suishitsu[j][10] != 'Err') { value += parseFloat(suishitsu[j][10]); count++; } if (count == 0) { value = err; } else { value /= count; value = '' + value; value = round_data(value, 3); if (mode == 0) { value = round_data(value, 1); } } break; case '20m': if (!sensor_list[suishitsu_list[j]][13]) { value = 'NA'; break; } value = suishitsu[j][13]; if (value == 'Err') { value = err; } else { if (mode == 0) { value = round_data(value, 1); } } break; } if (buoy == suishitsu_list[j]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '|||
クロロフィル[ppb] | '; html_code += '' + cr_deep[0] + ' | '; for (var i = 0; i < suishitsu_list.length; i++) { if( typeof suishitsu[i] === "undefined" ){ // Add continue; } if (suishitsu[i] == -1) continue; if (!sensor_list[suishitsu_list[i]][3]) { value = 'NA'; } else { var value = suishitsu[i][3]; if (value == 'Err') { value = err; } else { if (mode == 0) { value = round_data(value, 1); } } } if (buoy == suishitsu_list[i]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '||
' + cr_deep[i] + ' | '; for (var j = 0; j < suishitsu_list.length; j++) { if( typeof suishitsu[j] === "undefined" ){ // Add continue; } if (suishitsu[j] == -1) continue; if (!sensor_list[suishitsu_list[j]][3 + i * 4]) { value = 'NA'; } else { var value = suishitsu[j][3 + i * 4]; if (value == 'Err') { value = err; } else { if (mode == 0) { value = round_data(value, 1); } } } if (buoy == suishitsu_list[j]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '|||
濁度[FTU] | '; html_code += '' + cr_deep[0] + ' | '; for (var i = 0; i < suishitsu_list.length; i++) { if( typeof suishitsu[i] === "undefined" ){ // Add continue; } if (suishitsu[i] == -1) continue; if (!sensor_list[suishitsu_list[i]][4]) { value = 'NA'; } else { var value = suishitsu[i][4]; if (value == 'Err') { value = err; } else { if (mode == 0) { value = round_data(value, 1); } } } if (buoy == suishitsu_list[i]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '||
' + cr_deep[i] + ' | '; for (var j = 0; j < suishitsu_list.length; j++) { if( typeof suishitsu[j] === "undefined" ){ // Add continue; } if (suishitsu[j] == -1) continue; if (!sensor_list[suishitsu_list[j]][4 + i * 4]) { value = 'NA'; } else { var value = suishitsu[j][4 + i * 4]; if (value == 'Err') { value = err; } else { if (mode == 0) { value = round_data(value, 1); } } } if (buoy == suishitsu_list[j]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '|||
溶存酸素飽和率[%] | '; html_code += '' + do_deep[0] + ' | '; for (var i = 0; i < suishitsu_list.length; i++) { if( typeof suishitsu[i] === "undefined" ){ // Add continue; } if (suishitsu[i] == -1) continue; if (!sensor_list[suishitsu_list[i]][11]) { value = 'NA'; } else { var value = suishitsu[i][11]; if (value == 'Err') { value = err; } else { if (mode == 0) { value = round_data(value, 0); } } } if (buoy == suishitsu_list[i]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '||
' + do_deep[i] + ' | '; for (var j = 0; j < suishitsu_list.length; j++) { if( typeof suishitsu[j] === "undefined" ){ // Add continue; } if (suishitsu[j] == -1) continue; if (!sensor_list[suishitsu_list[j]][11 + i * 3]) { value = 'NA'; } else { var value = suishitsu[j][11 + i * 3]; if (value == 'Err') { value = err; } else { if (mode == 0) { value = round_data(value, 0); } } } if (buoy == suishitsu_list[j]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '|||
溶存酸素量[㎎/ℓ] | '; html_code += '' + do_deep[0] + ' | '; for (var i = 0; i < suishitsu_list.length; i++) { if( typeof suishitsu[i] === "undefined" ){ // Add continue; } if (suishitsu[i] == -1) continue; var value = cal_ao(suishitsu[i], do_deep[0], i); if (value != err && value != 'NA') { if (mode == 0) { value = round_data(value, 2); } } if (buoy == suishitsu_list[i]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '||
' + do_deep[i] + ' | '; for (var j = 0; j < suishitsu_list.length; j++) { if( typeof suishitsu[j] === "undefined" ){ // Add continue; } if (suishitsu[j] == -1) continue; var value = cal_ao(suishitsu[j], do_deep[i], j); if (value != err && value != 'NA') { if (mode == 0) { value = round_data(value, 2); } } if (buoy == suishitsu_list[j]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } html_code += '|||
電源電圧[V] | '; for (var i = 0; i < suishitsu_list.length; i++) { if( typeof suishitsu[i] === "undefined" ){ // Add continue; } if (suishitsu[i] == -1) continue; var value = (parseFloat(suishitsu[i][5]) + parseFloat(suishitsu[i][9]) + parseFloat(suishitsu[i][12]) + parseFloat(suishitsu[i][15])) / 4; value = Math.round(value * 1000) / 1000; value = '' + value; if (value.indexOf('.') == -1) { for (var j = 0; j < 3; j++) { value += '0'; } } else { var sp = value.split('.'); if (sp[1].length < 3) { for (var j = 3; j > sp[1].length; j--) sp[1] += '0'; } value = sp[0] + '.' + sp[1]; } if (buoy == suishitsu_list[i]) { html_code += '' + value + ' | '; } else { html_code += '' + value + ' | '; } } } document.getElementById('suishitsu_table').innerHTML = html_code; }