3_PowerRadiated/measuredPowerLienardWiechert/hertzianDipole.h
//Calculate effective area factor from the separation vector, the wavelength and the antenna's orietation vector:
Calculate effective area factor from the separation vector, the wavelength and the antenna's orietation vector.
Calculate effective area factor from the separation vector the wavelength and the antenna ' s orietation vector .
double calcEffArea(double *separation, double wavelength) {
  double *orientation;
  orientation = (double*)malloc(3*sizeof(double));
  orientation[0] = 0.0;
  orientation[1] = 0.0;
  orientation[2] = 1.0;
  double cosineVal = dotProduct3vectors(separation, orientation)/(calculate3VecMag(orientation)*calculate3VecMag(separation));  
  double sinSquared = 1.0 - pow(cosineVal,2.0); 
  free(orientation);
  double effArea = (3/(8*M_PI))*pow(wavelength,2.0)*sinSquared;
  return effArea;
}
double calcEffArea ( double * separation , double wavelength ) { double * orientation ; orientation = ( double * ) malloc ( 3 * sizeof ( double ) ) ; orientation [ 0 ] = 0.0 ; orientation [ 1 ] = 0.0 ; orientation [ 2 ] = 1.0 ; double cosineVal = dotProduct3vectors ( separation , orientation ) / ( calculate3VecMag ( orientation ) * calculate3VecMag ( separation ) ) ; double sinSquared = 1.0 - pow ( cosineVal , 2.0 ) ; free ( orientation ) ; double effArea = ( 3 / ( 8 * M_PI ) ) * pow ( wavelength , 2.0 ) * sinSquared ; return effArea ; }
Calculate effective area factor from the separation vector, the wavelength and the antenna's orietation vector:
Calculate effective area factor from the separation vector the wavelength and the antenna ' s orietation vector :
//Vectorial definition of the cosine //Trigonometric identity