28 vector<double> theta, phi;
29 vector<double> power_v, power_h, power_t;
30 vector<double> pol_axial_ratio, pol_tilt;
32 vector<double> E_theta_mag, E_phi_mag;
33 vector<double> E_theta_phase, E_phi_phase;
42 string searchString(
"RADIATION PATTERNS");
43 while (m_stream.good())
45 string line = readline();
47 if (line.find(searchString,0) != string::npos)
50 while (line.find(
"VOLTS/M",0) == string::npos)
63 stringstream ss(line);
65 theta.push_back(read_fixed(ss));
66 phi.push_back(read_fixed(ss));
67 power_v.push_back(read_fixed(ss));
68 power_h.push_back(read_fixed(ss));
69 power_t.push_back(read_fixed(ss));
70 pol_axial_ratio.push_back(read_fixed(ss));
71 pol_tilt.push_back(read_fixed(ss));
75 E_theta_mag.push_back(read_sci(ss));
76 E_theta_phase.push_back(read_fixed(ss));
78 E_phi_mag.push_back(read_sci(ss));
79 E_phi_phase.push_back(read_fixed(ss));
84 cout <<
"Radiation pattern: " << n_items <<
" lines" << endl;
91 if (difference(ai) > 1e-4)
101 if (n_items != ai.n_items)
104 for (
long i=0; i < n_items;i++)
106 if (theta[i] != ai.theta[i])
108 if (phi[i] != ai.phi[i])
113 ret += diff(power_v[i], ai.power_v[i]);
114 ret += diff(power_h[i], ai.power_h[i]);
115 ret += diff(power_t[i], ai.power_t[i]);
116 if (power_v[i] > -999.0)
118 ret += diff(pol_axial_ratio[i], ai.pol_axial_ratio[i]);
119 ret += diff(pol_tilt[i], ai.pol_tilt[i]);
121 ret += diff(deg_polar(E_theta_mag[i],E_theta_phase[i]), deg_polar(ai.E_theta_mag[i],ai.E_theta_phase[i]));
122 ret += diff(deg_polar(E_phi_mag[i],E_phi_phase[i]), deg_polar(ai.E_phi_mag[i],ai.E_phi_phase[i]));
125 catch (
string message)
127 cout <<
"Diff at [" << theta[i] <<
"," << phi[i] <<
"] : " << message << endl;