From 4e74851de4c31b4df76a2d1c82fb527e934e98f3 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Tue, 5 Oct 2021 13:57:48 +0100 Subject: [PATCH] Antenna Tools update Calculate dish effective area. Adjust beamwidth calculation for 10dB illumination taper and better correlation with measurement. --- .../feature/antennatools/antennatoolsgui.cpp | 20 +- .../feature/antennatools/antennatoolsgui.h | 1 + .../feature/antennatools/antennatoolsgui.ui | 245 ++++++++++-------- .../antennatools/antennatoolsplugin.cpp | 2 +- plugins/feature/antennatools/readme.md | 12 +- 5 files changed, 164 insertions(+), 116 deletions(-) diff --git a/plugins/feature/antennatools/antennatoolsgui.cpp b/plugins/feature/antennatools/antennatoolsgui.cpp index ad501eea5..dea51118d 100644 --- a/plugins/feature/antennatools/antennatoolsgui.cpp +++ b/plugins/feature/antennatools/antennatoolsgui.cpp @@ -163,6 +163,7 @@ void AntennaToolsGUI::displaySettings() calcDishFocalLength(); calcDishBeamwidth(); calcDishGain(); + calcDishEffectiveArea(); } void AntennaToolsGUI::leaveEvent(QEvent*) @@ -410,7 +411,10 @@ void AntennaToolsGUI::calcDishFocalLength() void AntennaToolsGUI::calcDishBeamwidth() { - double beamwidth = 70.0 * dishLambda() / dishDiameterMetres(); + // The constant here depends on the illumination tapering. + // 1.15 equals about 10dB: (4.14) in Fundamentals of Radio Astronomy + // 1.2 is also a commonly used value: https://www.cv.nrao.edu/~sransom/web/Ch3.html#E96 + double beamwidth = Units::radiansToDegrees(1.15 * dishLambda() / dishDiameterMetres()); ui->dishBeamwidth->setValue(beamwidth); } @@ -424,12 +428,22 @@ void AntennaToolsGUI::calcDishGain() ui->dishGain->setValue(gainDB); } +void AntennaToolsGUI::calcDishEffectiveArea() +{ + double gainDB = ui->dishGain->value(); + double g = pow(10.0, gainDB/10.0); + double lambda = dishLambda(); + double ae = g * lambda * lambda / (4.0 * M_PI); + ui->dishEffectiveArea->setValue(ae); +} + void AntennaToolsGUI::on_dishFrequency_valueChanged(double value) { m_settings.m_dishFrequencyMHz = value; applySettings(); calcDishBeamwidth(); calcDishGain(); + calcDishEffectiveArea(); } void AntennaToolsGUI::on_dishFrequencySelect_currentIndexChanged(int index) @@ -453,6 +467,7 @@ void AntennaToolsGUI::on_dishDiameter_valueChanged(double value) calcDishFocalLength(); calcDishBeamwidth(); calcDishGain(); + calcDishEffectiveArea(); } void AntennaToolsGUI::on_dishLengthUnits_currentIndexChanged(int index) @@ -462,6 +477,7 @@ void AntennaToolsGUI::on_dishLengthUnits_currentIndexChanged(int index) calcDishFocalLength(); calcDishBeamwidth(); calcDishGain(); + calcDishEffectiveArea(); } void AntennaToolsGUI::on_dishDepth_valueChanged(double value) @@ -476,6 +492,7 @@ void AntennaToolsGUI::on_dishEfficiency_valueChanged(int value) m_settings.m_dishEfficiency = value; applySettings(); calcDishGain(); + calcDishEffectiveArea(); } void AntennaToolsGUI::on_dishSurfaceError_valueChanged(double value) @@ -483,6 +500,7 @@ void AntennaToolsGUI::on_dishSurfaceError_valueChanged(double value) m_settings.m_dishSurfaceError= value; applySettings(); calcDishGain(); + calcDishEffectiveArea(); } double AntennaToolsGUI::getDeviceSetFrequencyMHz(int index) diff --git a/plugins/feature/antennatools/antennatoolsgui.h b/plugins/feature/antennatools/antennatoolsgui.h index 28c9fc397..968f2d195 100644 --- a/plugins/feature/antennatools/antennatoolsgui.h +++ b/plugins/feature/antennatools/antennatoolsgui.h @@ -74,6 +74,7 @@ private: void calcDishFocalLength(); void calcDishBeamwidth(); void calcDishGain(); + void calcDishEffectiveArea(); double dishLambda() const; double dishLengthMetres(double length) const; double dishMetresToLength(double m) const; diff --git a/plugins/feature/antennatools/antennatoolsgui.ui b/plugins/feature/antennatools/antennatoolsgui.ui index dfc972041..6699b0767 100644 --- a/plugins/feature/antennatools/antennatoolsgui.ui +++ b/plugins/feature/antennatools/antennatoolsgui.ui @@ -6,8 +6,8 @@ 0 0 - 377 - 499 + 394 + 523 @@ -42,8 +42,8 @@ 16 19 - 351 - 451 + 371 + 481 @@ -219,10 +219,23 @@ Dish - - + + - Beamwidth (°) + Focal length + + + + + + + Diameter of the dish + + + 1000.000000000000000 + + + 100.000000000000000 @@ -233,16 +246,10 @@ - - + + - - - - :/antennatools/antennatools/dish.png - - - Qt::AlignCenter + Diameter @@ -270,10 +277,36 @@ - - + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - Focal length + Gain (dB) + + + + + + + Halfpower (-3dB) beamwidth in degrees + + + true + + + 360.000000000000000 @@ -297,25 +330,22 @@ - - + + - Depth + Beamwidth (°) - - - - Qt::Vertical + + + + Depth of the dish - - - 20 - 40 - + + 1000.000000000000000 - + @@ -330,33 +360,40 @@ - - - - Halfpower (-3dB) beamwidth in degrees - - - true - - - 360.000000000000000 - - - - - - - Depth of the dish - - - 1000.000000000000000 - - - - - + + - Gain (dB) + Surface error + + + + + + + + + + :/antennatools/antennatools/dish.png + + + Qt::AlignCenter + + + + + + + f/D + + + + + + + Dish efficiency in percent + + + 100 @@ -376,43 +413,16 @@ - - + + - Diameter of the dish - - - 1000.000000000000000 - - - 100.000000000000000 - - - - - - - Focal length to diameter ratio + RMS surface error (as a length) - true + false - 1.000000000000000 - - - - - - - Diameter - - - - - - - f/D + 360.000000000000000 @@ -450,33 +460,43 @@ - - + + - Dish efficiency in percent - - - 100 - - - - - - - Surface error - - - - - - - RMS surface error (as a length) + Focal length to diameter ratio - false + true - 360.000000000000000 + 1.000000000000000 + + + + + + + Depth + + + + + + + Effective area (m<sup>2</sup>) + + + + + + + Effective area + + + true + + + 100000000.000000000000000 @@ -511,6 +531,7 @@ dishFD dishBeamwidth dishGain + dishEffectiveArea diff --git a/plugins/feature/antennatools/antennatoolsplugin.cpp b/plugins/feature/antennatools/antennatoolsplugin.cpp index d09c21593..624129290 100644 --- a/plugins/feature/antennatools/antennatoolsplugin.cpp +++ b/plugins/feature/antennatools/antennatoolsplugin.cpp @@ -30,7 +30,7 @@ const PluginDescriptor AntennaToolsPlugin::m_pluginDescriptor = { AntennaTools::m_featureId, QStringLiteral("Antenna Tools"), - QStringLiteral("6.16.2"), + QStringLiteral("6.16.7"), QStringLiteral("(c) Jon Beniston, M7RCE"), QStringLiteral("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/feature/antennatools/readme.md b/plugins/feature/antennatools/readme.md index c08fe96d1..10b852a6d 100644 --- a/plugins/feature/antennatools/readme.md +++ b/plugins/feature/antennatools/readme.md @@ -111,9 +111,11 @@ Displays the calculated focal length to diameter ratio.

16: Beamwidth

-Displays the halfpower (-3dB) beamwidth. +Displays the halfpower (-3dB) beamwidth in degrees. -Beamwidth is calculated as: 70*lambda/D. +Beamwidth is calculated as: pi/180*1.15*lambda/D. + +Note that the constant 1.15 is dependent upon illumination tapering, which is determined by the feed.

17: Gain

@@ -122,3 +124,9 @@ Displays the calculated gain in dB. The nominal gain is calculated as: g0=10\*log10(eff/100.0\*(pi*D/lambda)^2) The gain is then adjusted for surface error with Ruze's equation: g=g0-685.81*(e/lambda)^2 + +

18: Effective area

+ +Displays the effective area in m^2. + +Aeff is calculated as: g*lambda^2/(4*pi)