18 #ifndef __Antenna_Input__
19 #define __Antenna_Input__
22 #include "BaseInput.h"
39 vector<double> tag, seg, vRe, vIm, iRe, iIm, zRe, zIm, power;
46 string searchString(
"ANTENNA INPUT PARAMETERS");
47 while (m_stream.good())
49 string line = readline();
51 if (line.find(searchString,0) != string::npos)
53 while (line.find(
"(WATTS)",0) == string::npos)
59 if (line.find(
"*",0) != string::npos)
61 line.erase(line.find(
"*",0),1);
64 stringstream ss(line);
65 tag.push_back(read_fixed(ss));
66 seg.push_back(read_fixed(ss));
67 vRe.push_back(read_fixed(ss));
68 vIm.push_back(read_fixed(ss));
69 iRe.push_back(read_fixed(ss));
70 iIm.push_back(read_fixed(ss));
71 zRe.push_back(read_fixed(ss));
72 zIm.push_back(read_fixed(ss));
73 power.push_back(read_fixed(ss));
75 cout <<
"Impedance : " << zRe[n_items] <<
" " << zIm[n_items] << endl;
83 if (difference(ai) > 1e-4)
93 if (n_items != ai.n_items)
98 for (
long i=0; i<n_items; i++)
100 ret += diff(ai.vRe[i],vRe[i]);
101 ret += diff(ai.vIm[i],vIm[i]);
102 ret += diff(ai.iRe[i],iRe[i]);
103 ret += diff(ai.iIm[i],iIm[i]);
104 ret += diff(ai.zRe[i],zRe[i]);
105 ret += diff(ai.zIm[i],zIm[i]);
106 ret += diff(ai.power[i],power[i]);
109 catch(
string message)
111 cout <<
"diff : " << message << endl;