
void nec_context::rp_card 
( 
int 
calc_mode, 


int 
n_theta, 


int 
n_phi, 


int 
output_format, 


int 
normalization, 


int 
D, 


int 
A, 


nec_float 
theta0, 


nec_float 
phi0, 


nec_float 
delta_theta, 


nec_float 
delta_phi, 


nec_float 
radial_distance, 


nec_float 
gain_norm  

) 
  
Standard radiation pattern parameters.
 Parameters:

 calc_mode  This integer selects the mode of calculation for the radiated field. Some values of (calc_mode) will affect the meaning of the remaining parameters on the card. Options available for calc_mode are:
O  normal mode. Spacewave fields are computed. An infinite ground plane is included if it has been specified previously on a GN card; otherwise, the antenna is in free space.
1  surface wave propagating along ground is added to the normal space wave. This option changes the meaning of some of the other parameters on the RP card as explained below, and the results appear in a special output format. Ground parameters must have been input on a GN card. The following options cause calculation of only the space wave but with special ground conditions. Ground conditions include a twomedium ground (cliff where the media join in a circle or a line), and a radial wire ground screen. Ground parameters and dimensions must be input on a GN or GD card before the RP card is read. The RP card only selects the option for inclusion in the field calculation. (Refer to the GN and GD cards for further explanation.)
2  linear cliff with antenna above upper level. Lower medium parameters are as specified for the second medium on the GN card or on the GD card.
3  circular cliff centered at origin of coordinate system: with antenna above upper level. Lower medium parameters are as specified for the second medium on the GN card or on the GD card.
4  radial wire ground screen centered at origin.
5  both radial wire ground screen and linear cliff.
6  both radial wire ground screen ant circular cliff.

 n_theta  The number of theta angles. 
 n_phi  The number of phi angles. 
 output_format  The output format:
0 major axis, minor axis and total gain printed.
1 vertical, horizontal ant total gain printed.

 normalization  Controls the type of normalization of the radiation pattern
0 no normalized gain.
1 major axis gain normalized.
2 minor axis gain normalized.
3 vertical axis gain normalized.
4 horizontal axis gain normalized.
5 total gain normalized.

 D  Selects either power gain or directive gain for both standard printing and normalization. If the structure excitation is an incident plane wave, the quantities printed under the heading "gain" will actually be the scattering cross section (a/lambda 2 ) and will not be affected by the value of d. The column heading for the output will still read "power" or "directive gain," however.
0 power gain.
1 directive gain.

 A   Requests calculation of average power gain over the region covered by field points.
0 no averaging.
1 average gain computed.
2 average gain computed, printing of gain at the field points used for averaging is suppressed. If n_theta or NPH is equal to one, average gain will not be computed for any value of A since the area of the region covered by field points vanishes.

 theta0   Initial theta angle in degrees (initial z coordinate in meters if calc_mode = 1). 
 phi0   Initial phi angle in degrees. 
 delta_theta   Increment for theta in degrees (increment for z in meters if calc_mode = 1). 
 delta_phi   Increment for phi in degrees. 
 radial_distance   Radial distance (R) of field point from the origin in meters. radial_distance is optional. If it is zero, the radiated electric field will have the factor exp(jkR)/R omitted. If a value of R is specified, it should represent a point in the farfield region since near components of the field cannot be obtained with an RP card. (If calc_mode = 1, then radial_distance represents the cylindrical coordinate phi in meters and is not optional. It must be greater than about one wavelength.) 
 gain_norm   Determines the gain normalization factor if normalization has been requested in the normalization parameter. If gain_norm is zero, the gain will be normalized to its maximum value. If gain_norm is not zero, the gain wi11 be normalized to the value of gain_norm. 
 The rp_card() function will call simulate(), causing the interaction matrix to be computed and factored and the structure currents to be computed if these operations have not already been performed. Hence, all required input parameters must be set before the rp_card() function is called.
 At a single frequency, any number of rp_card() calls may occur in sequence so that different fieldpoint spacings may be used over different regions of space. If automatic frequency stepping is being used (i.e., in_nfrq on the fr_card() function is greater than one), only one rp_card() function will act as data inside the loop. Subsequent calls to rp_card() will calculate patterns at the final frequency.
 When both n_theta and n_phi are greater than one, the angle theta (or Z) will be stepped faster than phi.
 When a ground plane has been specified, field points should not be requested below the ground (theta greater than 90 degrees or Z less than zero.)
 Parameters:

 calc_mode  
 n_theta  
 n_phi  
 output_format  The output format (0 major axis, minor axis and total gain printed. 1 vertical, horizontal ant total gain printed.) 
 normalization  Controls the type of normalization of the radiation pattern N = 0 no normalized gain. = 1 major axis gain normalized. = 2 minor axis gain normalized. = 3 vertical axis gain normalized. = 4 horizontal axis gain normalized. = 5 total gain normalized. 
 D  Selects either power gain or directive gain for both standard printing and normalization. If the structure excitation is an incident plane wave, the quantities printed under the heading "gain" will actually be the scattering cross section (a/lambda 2 ) and will not be affected by the value of d. The column heading for the output will still read "power" or "directive gain," however.

D = 0 power gain.

D = 1 directive gain.

 A   Requests calculation of average power gain over the region covered by field points.

A = 0 no averaging.

A = 1 average gain computed.

A = 2 average gain computed, printing of gain at the field points used for averaging is suppressed. If NTH or NPH is equal to one, average gain will not be computed for any value of A since the area of the region covered by field points vanishes.

 theta0   Initial theta angle in degrees (initial z coordinate in meters if I1 = 1). 
 phi0   Initial phi angle in degrees. 
 delta_theta   Increment for theta in degrees (increment for z in meters if I1 = 1). 
 delta_phi   Increment for phi in degrees. 
 radial_distance   Radial distance (R) of field point from the origin in meters. radial_distance is optional. If it is zero, the radiated electric field will have the factor exp(jkR)/R omitted. If a value of R is specified, it should represent a point in the farfield region since near components of the field cannot be obtained with an RP card. (If I1 = 1, then radial_distance represents the cylindrical coordinate phi in meters and is not optional. It must be greater than about one wavelength.) 
 gain_norm   Determines the gain normalization factor if normalization has been requested in the normalization parameter. If gain_norm is zero, the gain will be normalized to its maximum value. If gain_norm is not zero, the gain w111 be normalized to the value of gain_norm. 
Definition at line 791 of file nec_context.cpp.
References ifar, and simulate().
{
DEBUG_TRACE("rp_card(" << calc_mode << ")");
ifar= calc_mode;
nth = n_theta;
nph = n_phi;
if ( nth == 0)
nth=1;
if ( nph == 0)
nph=1;
m_rp_output_format = output_format;
m_rp_normalization = normalization;
ipd = D;
iavp = A;
DEBUG_TRACE(" xnda = (" << m_rp_output_format << m_rp_normalization << ipd << iavp << ")");
if ( m_rp_output_format != 0)
m_rp_output_format=1;
if ( ipd != 0)
ipd=1;
if ( (nth < 2)  (nph < 2)  (ifar == 1) )
iavp=0;
thets = theta0;
phis = phi0;
dth = delta_theta;
dph = delta_phi;
rfld = radial_distance;
gnor = gain_norm;
iflow=10;
simulate(true);
}
