UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ray_tracing.hpp
1 // ray_tracing.hpp
2 // $Id: ray_tracing.hpp,v 1.11 2008/07/30 14:29:22 guser1 Exp $
3 //------------------------------------------------------------------------------
4 #ifndef __RayTracingH
5 #define __RayTracingH
6 
7 #include "vel2dmod_raytr_global.hpp"
8 #include "rt_storage.hpp"
9 
10 
11 //---------------------------------------------------------------------
14 void OverturnD(double *&M, int N);
16 void OverturnI(int *&M, int N);
17 
18 //class RayInfo;
19 
20 //==============================================================================
22 
25 {
26 public:
27 
28  RayTracing(Vel2dModel *mod2d);
29  ~RayTracing();
30 
32  RayInfo* RayShoot(double f, double startX, double startZ, bool waySave, CodeAr rCode , bool calcSD,
33  int_ar *bNums=NULL);
34 
37  void AddObSysPtr(ObservSys*);
38 
39  void SetDL(double dl);
40  double GetDL();
41 
42 
45 
48 
50  void CalcIntParams2(double x, double z, double f, int rtr,
51  double &x0,double &z0, double &x1, double &z1);
52 
54  static bool Snellius(double vin, double teta0, double vout, int rtr,
55  double iAngle, double &teta1);
56 
57 
58 protected:
59 
61  STEP_RESULT RayStep(double &x, double &z, double &f, double &v, double df, double &dt,
62  double &resultAngle, double &resultCurvity, int &iBoundNum,
63  WAVE_TYPE vPS, bool prevInt, bool noIntersect=false);
64 
66  bool CalcRayAmpl(RayInfo *Ray);
67 
69  double CalcRayCoeff(double x, double z, double x0, double z0, double x1, double z1, int bn1,
70  int bn2, int boundN, WAVE_TYPE wt1, WAVE_TYPE wt2, double iAngle);
71 
73  void CalcIntParams(double x, double z, double x0, double z0, int rtr,
74  double &x1, double &z1);
75  void CalcIntParams(double x, double z, double &x0, double &z0, int rtr,
76  double f, double &x1, double &z1);
77 
78  // /** calculation of the ray points before and after bound intersection (rt_calc.cpp) */
79 // void CalcIntParams2(double x, double z, double f, int rtr,
80 // double &x0,double &z0, double &x1, double &z1);
81 
82 // /** calculation of the ray reflection/refraction angle on the bound (ray_tracing.cpp) */
83 // bool Snellius(double vin, double teta0, double vout, int rtr,
84 // double iAngle, double &teta1);
85 
86  private:
87 
88 
90  double Time(double x0, double z0, double x1, double z1, double v0, double v1);
91 
92 
94  int Chorda1(double x0, double z0, double k, double alpha, double F, double teta0,
95  double v0, double &x1, double &z1, double &teta1);
96 
98  bool StepOnRay(double x1, double z1, double &x2, double &z2, double f1, double &f2,
99  double df, WAVE_TYPE vPS, bool prevInt);
100 
102  void ModLimInt(double x1, double z1, double x2, double z2, double &res_x, double &res_z);
103 
105  bool CalcRaySD(RayInfo *Ray);
106  bool CalcRaySD2(RayInfo *Ray);
107  bool CalcRaySD3(RayInfo *Ray);
108 
109  double gridSize;
110  bool isObSys;
112  double DL;
114  double iX[50], iZ[50], iAngles[50], iCurvity[50];
115  int ibNum[50], ibrd[50];
116 };
117 
118 #endif
static bool Snellius(double vin, double teta0, double vout, int rtr, double iAngle, double &teta1)
RayInfo * RayShoot(double f, double startX, double startZ, bool waySave, CodeAr rCode, bool calcSD, int_ar *bNums=NULL)
void CalcIntParams2(double x, double z, double f, int rtr, double &x0, double &z0, double &x1, double &z1)
Definition: vel2dmod.hpp:19
void CalcIntParams(double x, double z, double x0, double z0, int rtr, double &x1, double &z1)
Ray tracing class.
Definition: ray_tracing.hpp:24
double CalcRayCoeff(double x, double z, double x0, double z0, double x1, double z1, int bn1, int bn2, int boundN, WAVE_TYPE wt1, WAVE_TYPE wt2, double iAngle)
Vel2dModel * Mod2d
Definition: ray_tracing.hpp:44
Ray data storage sturcture.
Definition: rt_storage.hpp:74
bool CalcRayAmpl(RayInfo *Ray)
STEP_RESULT RayStep(double &x, double &z, double &f, double &v, double df, double &dt, double &resultAngle, double &resultCurvity, int &iBoundNum, WAVE_TYPE vPS, bool prevInt, bool noIntersect=false)
Definition: objectar.hpp:57
ObservSys * ObsSys
Definition: ray_tracing.hpp:47
Observation system class.
Definition: os.hpp:13
void AddObSysPtr(ObservSys *)