Good Evening,

   After a rainy week today's sun felt good.  Buds are starting to expand.  Daffodils are about four inches tall, just in time for the next snow storm due late in the week.  There was one day of fog and snow.  It was like a Turner painting in shades of gray.

   The sun is active.  We are in the middle of an ion stream. Signals are OK but noise is high.  The stream should still be present tomorrow.  The ionosphere is charged up.  I expect signals to bounce well with moderate to heavier QSB.  Forty meters could get noisy as the sun sets.


Please join us on (or near):

14050 kHz at 2300z Sunday  (3 PM PST Sunday)
 7047 kHz at 0030z Monday  (4:30 PM PST Sunday)

   73,
      Kevin. KD5ONS




-


I wanted to see what happens when you feed a sine wave into a doublet.  This code snippet inserts the signal at the center feed point and walks it outward at each time step.  When the signal hits the end of the wire it bounces back, adding its level to the incoming level.

I used degrees to measure the length of the antenna.  One half of a wave is 180 degrees long (pi).  A half wave dipole has two legs each 1/4 wavelength long or 90 degrees.  When each leg is 90 or 180 degrees long the antenna behaves as expected at resonance. Shorter or longer legs display their odd behaviors.  Some day I will add a user interface which does not require me to recompile the code.


static int step = 1;
int s = 0;        // sine[] index
bool flag = false;   // speed flag

DWORD WINAPI wave( LPVOID pV )            // working function
    {
    int k;
    RECT rct;
    int xS, yS;                                    // screen coordinates
    int dx = 1;
    int centerLine = HEIGHT/2;

    while(TRUE)                              // City on the edge of forever
        {
        if (flag)
            {
            SleepEx( 3, FALSE );                // Passing the time, drinking good wine
            }
        else
            {
            SleepEx( 40, FALSE );           // Scalosians slow to human speeds
            }

        hdc = GetDC(hwnd);
        SelectObject(bkhdc, bkBitmap);    // create cool background gray
        GetClientRect(hwnd, &rct);
        FillRect(bkhdc, &rct, cBrush);    // paint background

        // shift each element[] value up/out the antenna
        shift();

        //    at each time step fill the feed point from the sine[] buffer
        element[0] = sine[s];

        // step through sine[]
        s += step;
        if (s > 359)
            {
            s = 0;
            flag = true;    // sleep less
            }

        // sum outgoing element with incoming element
        sum();

        // fill display on both legs
        for (int e=0; e<LENGTH; e++)
            {
            // mirror right leg into left leg
            display[LENGTH - e - 1] = elem[e];
            display[e + LENGTH ] = elem[e];
            }

        for (int i=0; i<LENGTH; i++)
            {
            k = 255 + (int) (0.6 * display[i].level);  // determine color index
            SelectObject(bkhdc, pn[k].pen );  // choose appropriate pen

            xS = Xtransform(0, WINDOWX, 10, WIDTH/2, i * dx + 50 );
            yS = Ytransform(WINDOWY, 0, 10, HEIGHT, display[i].level + centerLine);
            MoveToEx(bkhdc, xS, yS, NULL);
            MoveToEx(hdc, xS, yS, NULL);

            xS = Xtransform(0, WINDOWX, 10, WIDTH/2, i * dx + 50 );
            yS = Ytransform(WINDOWY, 0, 10, HEIGHT, centerLine );
            LineTo(bkhdc, xS, yS);
            LineTo(hdc, xS, yS);
            }

        for (int i=LENGTH; i<2*LENGTH; i++)        // right leg
            {
            k = 255 + (int) (0.6 * display[i].level);
            SelectObject(bkhdc, pn[k].pen );

            xS = Xtransform(0, WINDOWX, 10, WIDTH/2, i * dx + 55 );
            yS = Ytransform(WINDOWY, 0, 10, HEIGHT, display[i].level + centerLine  );
            MoveToEx(bkhdc, xS, yS, NULL);
            MoveToEx(hdc, xS, yS, NULL);

            xS = Xtransform(0, WINDOWX, 10, WIDTH/2, i * dx + 55);
            yS = Ytransform(WINDOWY, 0, 10, HEIGHT, centerLine );
            LineTo(bkhdc, xS, yS);
            LineTo(hdc, xS, yS);
            }

//        SelectObject(bkhdc, GetStockObject(BLACK_PEN));
        ReleaseDC(hwnd, hdc);
        InvalidateRect(hwnd, NULL, TRUE);        // force WM_PAINT
        }
    ExitProcess( 0 );
   return 0;
   }


I will post the files, make file, and an exe on my web site.  It is fun to see what happens with non-resonant lengths.

______________________________________________________________
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