[Elecraft] Elecraft CW Net

kevin kevinr at coho.net
Sun Oct 13 21:58:21 EDT 2024


Good Evening,

    Both bands had low to moderate noise with slow, weak QSB.  It is 
nice when the sun provides plenty of ions without causing a fuss :)


   On 14050.5 kHz at 2200z:

NO8V - John - MI

W0CZ - Ken - ND

K6XK - Roy - IA

K4JPN - Steve - GA

WM5F - Dwight - ID

K6PJV - Dale - CA


   On 7047.5 kHz at 0000z:

K0DTJ - Brian - CA

WM5F - Dwight - ID

K6PJV - Dale - CA


Until next week 73,

    Kevin.  KD5ONS







-







A little genetics code.

void initDir( void )
     {
     int x = 1, y = 1;                              // For unit vectors
                                                    // D2Q9 LBM
     dir[0] = vector( 0,0 );                        // Center
     dir[1] = vector( x,0 );                        // East
     dir[2] = vector( -x,0 );                       // West
     dir[3] = vector( 0,y );                        // North
     dir[4] = vector( 0,-y );                       // South
     dir[5] = vector( x,y );                        // Northeast
     dir[6] = vector( x,-y );                       // Southeast
     dir[7] = vector( -x,y );                       // Northwest
     dir[8] = vector( -x,-y );                      // Southwest
     }

struct vt move( chromosome DR )                 // Get direction from 
chromosome
     {
     float dirProb[9];
     dirProb[8] = (float)  (DR & 15); // SW        DR::G8
     dirProb[7] = (float) ((DR & (15 << 4)) >> 4);          // NW
     dirProb[6] = (float) ((DR & (15 << 8)) >> 8);          // SE
     dirProb[5] = (float) ((DR & (15 << 12)) >> 12);        // NE
     dirProb[4] = (float) ((DR & (15 << 16)) >> 16);        // S
     dirProb[3] = (float) ((DR & (15 << 20)) >> 20);        // N
     dirProb[2] = (float) ((DR & (15 << 24)) >> 24);        // W
     dirProb[1] = (float) ((DR & (15 << 28)) >> 28);        // E        
DR::G1
     dirProb[0] = 0.0;                          // 0 is at the center

     float tt = 0;                              // Eight directions, 4 
bit probability range
     for(int i=1; i<9; i++)
         tt += dirProb[i];                      // Sum probabilities

     for(int i=1; i<9; i++)
         dirProb[i] /= tt;                      // Normalize direction 
probabilities

     float rn = fRan();                         // Gives us a number 
from 0.0 to 1.0 inclusive
     float sum = 0;                             // Sum probabilities 
until they exceed rn
     int dr = 0;                                // Direction buffer
     while (sum < rn)
       {
       dr++;                                    // Sum probabilities 
from 1 to 8 if necessary
       if (dr > 8) dr = 0;
       sum += dirProb[ dr ];                    // Probabilities must 
total 1.00
       }                                        // for this to work properly

     return dir[ dr ];                          // Prospective direction
     }

chromosome crossover( chromosome CM, chromosome CP )    // Chromosome 
crossover
     {
     int i = rand() % 32;                       // Determine crossover point

     CM >>= i;                                  // Clear upper bits of 
Mama chromosome
     CM <<= i;
     CP <<= 32 - i;                             // Clear lower bits of 
Papa chromosome
     CP >>= 32 - i;

     return CM | CP;                            // Merge upper and lower 
parts
     }




More information about the Elecraft mailing list