screen.hh
1 #ifndef SCREEN_H_
2 #define SCREEN_H_
3 
4 #include <iostream>
5 #include <iomanip>
6 #include <fstream>
7 #include <string>
8 #include <stdexcept>
9 #include <stdio.h>
10 #include <stddef.h>
11 #include <math.h>
12 #include <vector>
13 
14 #include "vector.hh"
15 #include "position.hh"
16 
17 
18 class Vector;
19 class Position;
20 
21 
22 class Screen {
23 private:
24  double fedgeLength;
25  Position fcentralPoint;
26  double fcosineProjectionFactor;
27 
28  Vector fnormal;
29  Vector funit_x;
30  Vector funit_y;
31 
32  int fNsamples;
33  int fNvalidpoints;
34 
35  std::vector<double> fVmmhz_freq;
36  std::vector<double> fVmmhz0;
37  std::vector<double> fViewangle;
38  std::vector<double> fDelays;
39  std::vector<Vector> fVec2blns;
40  std::vector<Vector> fPols;
41  std::vector<Position> fImpactPt;
42  std::vector<double> fWeight;
43  std::vector<double> fIncAngles;
44  std::vector<double> fTransAngles;
45  double fWeightNorm;
46  std::vector<double> fFacetLength;
47  std::vector<double> fTcoeff_parl_polparl;
48  std::vector<double> fTcoeff_perp_polparl;
49  std::vector<double> fTcoeff_parl_polperp;
50  std::vector<double> fTcoeff_perp_polperp;
51 
52 public:
54 
57  Screen(int a);
58 
60 
63  void SetNsamples(int i);
64 
66 
69  int GetNsamples();
70 
72 
75  void SetEdgeLength(double a);
76 
78 
81  void SetCentralPoint(Position a);
82 
84 
87  void SetCosineProjectionFactor(double a);
88 
90 
94 
96 
99  void SetNormal(Vector a);
100 
102 
105  void SetUnitX(Vector a);
106 
108 
111  void SetUnitY(Vector a);
112 
114 
117  double GetEdgeLength();
118 
120 
124 
126 
129  Vector GetNormal();
130 
132 
135  Vector GetUnitX();
136 
138 
141  Vector GetUnitY();
142 
144 
148  double CalcXindex(int i);
149 
151 
155  double CalcYindex(int i);
156 
158 
162  Position GetPosition(int i, int j);
163 
165 
168  void AddVmmhz_freq(double A);
169 
171 
175  double GetVmmhz_freq(int i);
176 
178 
181  void AddVmmhz0(double A);
182 
184 
188  double GetVmmhz0(int i);
189 
191 
194  void AddViewangle(double A);
195 
197 
201  double GetViewangle(int i);
202 
204 
207  void AddDelay(double A);
208 
210 
214  double GetDelay(int i);
215 
217 
220  void SetNvalidPoints(int i);
221 
223 
226  double GetNvalidPoints();
227 
229 
232  void AddVec2bln(Vector v);
233 
235 
239  Vector GetVec2bln(int i);
240 
242 
245  void AddPol(Vector v);
246 
248 
252  Vector GetPol(int i);
253 
255 
258  void AddImpactPt(Position p);
259 
261 
265  Position GetImpactPt(int i);
266 
268 
271  void AddWeight(double a);
272 
274 
278  double GetWeight(int i);
279 
281 
284  void SetWeightNorm(double a);
285 
287 
290  double GetWeightNorm();
291 
293 
296  void AddIncidenceAngle(double A);
297 
299 
303  double GetIncidenceAngle(int i);
304 
306 
309  void AddTransmissionAngle(double A);
310 
312 
316  double GetTransmissionAngle(int i);
317 
319 
322  void AddFacetLength(double A);
323 
325 
329  double GetFacetLength(int i);
330 
332 
335  void AddTparallel_polParallel(double A);
336 
338 
342  double GetTparallel_polParallel(int i);
343 
345 
348  void AddTperpendicular_polParallel(double A);
349 
351 
355  double GetTperpendicular_polParallel(int i);
356 
358 
361  void AddTparallel_polPerpendicular(double A);
362 
364 
368  double GetTparallel_polPerpendicular(int i);
369 
371 
374  void AddTperpendicular_polPerpendicular(double A);
375 
377 
382 
384  void ResetParameters();
385 
386 };
387 #endif
void AddTparallel_polPerpendicular(double A)
Appends a parallel transmission coefficient value to the fTcoeff_parl array.
Definition: screen.cc:249
void SetUnitX(Vector a)
Sets an orientation vector of the screen.
Definition: screen.cc:55
double GetTperpendicular_polParallel(int i)
Get the perpendicular transmission coefficient value stored at the specified index.
Definition: screen.cc:245
Vector GetUnitY()
Gets another orientation vector.
Definition: screen.cc:83
void AddTperpendicular_polParallel(double A)
Appends a perpendicular transmission coefficient value to the fTcoeff_perp array. ...
Definition: screen.cc:241
void AddTparallel_polParallel(double A)
Appends a parallel transmission coefficient value to the fTcoeff_parl array.
Definition: screen.cc:233
void SetNvalidPoints(int i)
Sets the total number of points on the screen.
Definition: screen.cc:153
void SetNormal(Vector a)
Sets the screen normal.
Definition: screen.cc:51
void AddViewangle(double A)
Appends a viewangle value to the fViewangle array.
Definition: screen.cc:134
void AddPol(Vector v)
Appends a vector to the fPols array.
Definition: screen.cc:173
double GetViewangle(int i)
Get the viewangle value stored at the specified index.
Definition: screen.cc:138
Screen(int a)
Creates an instance of a screen.
Definition: screen.cc:8
void SetCosineProjectionFactor(double a)
Sets the projection factor of the screen relative to the specular RF exit point.
Definition: screen.cc:42
double GetVmmhz0(int i)
Gets the Vmmhz0 value stored at the specified index.
Definition: screen.cc:130
void AddVec2bln(Vector v)
Appends a vector to the fVec2blns array.
Definition: screen.cc:163
double GetTparallel_polParallel(int i)
Get the parallel transmission coefficient value stored at the specified index.
Definition: screen.cc:237
void SetCentralPoint(Position a)
Sets the position of the central point of the screen.
Definition: screen.cc:38
Definition: screen.hh:22
void SetUnitY(Vector a)
Sets another orientation vector of the screen.
Definition: screen.cc:59
void SetWeightNorm(double a)
Sets the normalization factor for the weights (so they sum to 1)
Definition: screen.cc:201
double GetVmmhz_freq(int i)
Get the Vmmhz value stored at the specified index.
Definition: screen.cc:121
double CalcXindex(int i)
Calculates the X index of the screen corresponding to the specified counter value.
Definition: screen.cc:88
double GetTransmissionAngle(int i)
Get the transmission angle value stored at the specified index.
Definition: screen.cc:221
double GetNvalidPoints()
Gets the total number of points.
Definition: screen.cc:158
void AddImpactPt(Position p)
Appends a vector to the fImpactPt array.
Definition: screen.cc:183
void SetNsamples(int i)
Sets number of grid divisions for the base screen.
Definition: screen.cc:23
void AddFacetLength(double A)
Appends a facet edge length value to the fFacetLength array.
Definition: screen.cc:225
double GetTperpendicular_polPerpendicular(int i)
Get the perpendicular transmission coefficient value stored at the specified index.
Definition: screen.cc:261
double GetCosineProjectionFactor()
Gets the projection factor.
Definition: screen.cc:47
This class is a 3-vector that represents a position on the Earth&#39;s surface.
Definition: position.hh:26
double CalcYindex(int i)
Calculates the Y index of the screen corresponding to the specified counter value.
Definition: screen.cc:93
void AddVmmhz0(double A)
Appends a Vmmhz value (for the lowest Anita frequency) to the fVmmhz0 array.
Definition: screen.cc:126
int GetNsamples()
Gets number of grid divisions for the base screen.
Definition: screen.cc:28
Vector GetVec2bln(int i)
Gets the to-balloon vector at the specified index.
Definition: screen.cc:168
double GetFacetLength(int i)
Get the facet edge length value stored at the specified index.
Definition: screen.cc:229
double GetDelay(int i)
Get the delay value stores at the specified index.
Definition: screen.cc:148
Position GetCentralPoint()
Gets the position of the screen&#39;s central point.
Definition: screen.cc:68
void AddWeight(double a)
Appends a weight value to the fWeight array.
Definition: screen.cc:193
double GetEdgeLength()
Gets the screen length.
Definition: screen.cc:63
Vector GetUnitX()
Gets an orientation vector.
Definition: screen.cc:78
void AddVmmhz_freq(double A)
Appends a Vmmhz value to the fVmmhz_freq array.
Definition: screen.cc:115
double GetIncidenceAngle(int i)
Get the incidence angle value stored at the specified index.
Definition: screen.cc:213
double GetWeightNorm()
Gets the weight normalization factor.
Definition: screen.cc:205
Position GetPosition(int i, int j)
Calculates the physical position of the screen corresponding to the specified counter value...
Definition: screen.cc:98
void SetEdgeLength(double a)
Sets the physical length of a side of the screen.
Definition: screen.cc:33
void AddTperpendicular_polPerpendicular(double A)
Appends a perpendicular transmission coefficient value to the fTcoeff_perp array. ...
Definition: screen.cc:257
This class represents a three-vector. Operators are overloaded to provide for the familiar operations...
Definition: vector.hh:27
void ResetParameters()
Resets the following screen parameters (fNvalidpoints,fVmmhz_freq,fVmmhz0,fViewangle,fDelays,fVec2blns,fPols,fImpactPt,fWeight,fWeightNorm)
Definition: screen.cc:265
void AddIncidenceAngle(double A)
Appends an incidence angle value to the fIncAngles array.
Definition: screen.cc:209
Vector GetNormal()
Gets the screen normal.
Definition: screen.cc:73
Position GetImpactPt(int i)
Gets the position at the specified index.
Definition: screen.cc:188
Vector GetPol(int i)
Gets the polarization vector at the specified index.
Definition: screen.cc:178
double GetTparallel_polPerpendicular(int i)
Get the parallel transmission coefficient value stored at the specified index.
Definition: screen.cc:253
void AddDelay(double A)
Appends a delay value to the fDelays array.
Definition: screen.cc:143
double GetWeight(int i)
Gets the weight value at the specified index.
Definition: screen.cc:197
void AddTransmissionAngle(double A)
Appends a transmission angle value to the fTransAngles array.
Definition: screen.cc:217