Good Evening,

   It was a cool week with some fog, then a thunderstorm with an inch of rain.  The forest enjoyed the moisture.  Some of the ferns are turning yellow from a few 30 degree nights.  Smoke has returned but not as thick as it was last week.

   The sun continues to be moderately active with no X class flares predicted.  Solar flux is still high, it is simply less unsteady.  Nonetheless, there should be QSB and some hissing.  The sun is rapidly moving southward.  Sunset is at 8:02 PM, forty minutes earlier than at the beginning of August.

   I posted the code necessary to calculate the electric field around a 1/2 wavelength dipole antenna.  It will be used to create 3D mesh models of antenna radiation patterns; then animate them as the user changes any one of seven variables.  I have similar code for 1/4 wave verticals and 1/2 wave loop antennas.  Animating antenna radiation patterns should be fun, the UI building less so :)

Please join us on (or near):

14050 kHz at 2200z Sunday (3 PM PDT Sunday)
 7047 kHz at 0000z Monday (5 PM PDT Sunday)

   73,
      Kevin. KD5ONS






-




// dipole.c
// K. J. Rock
// August 25, 2023

// g++ -o dip dipole.c

#include <stdio.h>
#include <math.h>

#define ETA  376.991118308                // characteristic impedance of free space
#define RAD 0.017453293                    // radian to degree
#define PI  3.1415926535                     // cherry, of course
#define TWOPI  6.28318530718           // Katzenjammer feast
#define PIOVR2 1.57079632679           // slipped from sill

int main( void )
    {
    float f = 100;                                     // frequency in MHz
    float lambda = 300 / f;                      // wavelength in meters
    float l = lambda / 2;                          // length of antenna in meters
    float k = TWOPI / lambda;                 // save some space
    float h = 1.0;                                     // height of antenna in wavelengths     float I0 = 2;                                       // maximum current in amperes     float r = 1000;                                   // distance from antenna to observer in meters
    float dTheta = 20.0;                          // azimuth step size
    float dPhi = 5.0;                                // elevation step size
    float scale = 1.0;                               // fudge factor for display purposes

    for (float theta=0; theta<180; theta += dTheta)        // azimuth
      {
      for (float phi=0; phi<360; phi += dPhi) // elevation
          {
          float radius = scale * (ETA * k * I0 * l * sin(k * r)
             * sqrt(1 - sin(theta*RAD-PIOVR2) * sin(theta*RAD-PIOVR2) * sin(phi*RAD) * sin(phi*RAD))
             * sin(k * h * cos(theta * RAD-PIOVR2))) / (TWOPI * r);

          printf("%7.4f ", radius );               // E(θ,φ)   in Volt/meter  or Newton/Coulomb
          }
      printf("\n");
      }

    return 0;
    }




______________________________________________________________
Elecraft mailing list
Home: http://mailman.qth.net/mailman/listinfo/elecraft
Help: http://mailman.qth.net/mmfaq.htm
Post: mailto:Elecraft@mailman.qth.net

This list hosted by: http://www.qsl.net
Please help support this email list: http://www.qsl.net/donate.html
Message delivered to arch...@mail-archive.com 

Reply via email to