Update magloop.html

pull/2/head
miguel 2020-10-19 16:47:06 +11:00
rodzic 4eed41294e
commit 0565496ac1
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -89,8 +89,10 @@
function updateFrequencies() {
const hamFrequencies = [
//1.6, 2.0, 4.0, 6.0, 8.0
1.8, 3.5, 5.0, 7.0, 10.1, 14.0, 18.068, 21.0, 24.89, 28.0
//1.8, 2.2, 2.8, 3.5, 5.0, 6.0, 7.0, 8.0, 9.0, 10.1, 12.0, 14.0, 16.0, 18.068, 21.0, 24.89, 28.0
//1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
];
frequencies = [];
hamFrequencies.forEach(freq => {
@ -122,6 +124,7 @@
const rr = (n_turns ** 2.0) * k * (l ** 4.0);
return rr;
}
function calculateRadiationResistance() {
var retval = [];
frequencies.forEach(freq => {
@ -168,6 +171,7 @@
const proximityResistance = {
// From G. S. Smith, "Radiation Efficiency of Electrically Small Multiturn Loop Antennas", IEEE Trans Antennas Propagation, September 1972
// 0 - this is the corresponding x-axis value. 1 - single loop adds zero to proximity resistance. Others measured empirically.
0:[ 1.1, 1.15, 1.20, 1.25, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.20, 2.40, 2.50, 2.60, 2.80, 3.00, 3.50, 4.00],
1:[0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000],
2:[0.299, 0.284, 0.268, 0.254, 0.240, 0.214, 0.191, 0.173, 0.155, 0.141, 0.128, 0.116, 0.098, 0.032, 0.077, 0.071, 0.061, 0.054, 0.040, 0.031],
@ -224,6 +228,7 @@
const R_ohmic = lossResistance(freq);
const R_rad = radiationResistance(freq);
const efficiency = 100.0 / (1.0 + (R_ohmic / R_rad));
//const efficiency = 10.0 * Math.log10(1.0 / (1.0 + (R_ohmic / R_rad))); // for Efficiency in dB
retval.push({x:freq, y:efficiency});
});
return retval;
@ -341,7 +346,7 @@
*/
const chartCanvasContext = document.getElementById("chartCanvas").getContext('2d');
console.log(chartCanvasContext);
// console.log(chartCanvasContext);
var myChart = new Chart(chartCanvasContext, {
type: 'line',