00001
00005 #pragma once
00006
00007 #include <usml/ocean/ocean.h>
00008
00009 namespace usml {
00010 namespace waveq3d {
00011
00012 using namespace usml::ocean ;
00013
00014 using boost::numeric::ublas::vector;
00015
00018
00067 class USML_DECLSPEC wave_front {
00068
00069 public:
00070
00086 wave_front(
00087 ocean_model& ocean,
00088 const seq_vector* freq,
00089 size_t num_de, size_t num_az,
00090 const wposition* targets = NULL,
00091 const matrix<double>* sin_theta = NULL
00092 ) ;
00093
00097 inline size_t num_de() const {
00098 return position.size1() ;
00099 }
00100
00104 inline size_t num_az() const {
00105 return position.size2() ;
00106 }
00107
00121 void init_wave(
00122 const wposition1& pos, const seq_vector& de, const seq_vector& az ) ;
00123
00130 void update() ;
00131
00147 void find_edges() ;
00148
00153 wposition position ;
00154
00159 wposition pos_gradient ;
00160
00167 wvector ndirection ;
00168
00173 wvector ndir_gradient ;
00174
00178 matrix<double> sound_speed ;
00179
00183 wvector sound_gradient ;
00184
00190 matrix< vector< double > > attenuation ;
00191
00197 matrix< vector< double > > phase ;
00198
00205 matrix<double> distance ;
00206
00211 matrix<double> path_length ;
00212
00216 matrix<int> surface ;
00217
00221 matrix<int> bottom ;
00222
00232 matrix<int> caustic ;
00233
00237 matrix<int> upper ;
00238
00242 matrix<int> lower ;
00243
00247 matrix<bool> on_edge ;
00248
00254 const wposition* targets ;
00255
00260 matrix< matrix<double> > distance2 ;
00261
00262 private:
00263
00268 ocean_model& _ocean ;
00269
00274 const seq_vector* _frequencies ;
00275
00279 wvector _dc_c ;
00280
00284 matrix<double> _c2_r ;
00285
00289 matrix<double> _sin_theta ;
00290
00294 matrix<double> _cot_theta ;
00295
00301 const matrix<double>* _target_sin_theta ;
00302
00321 void compute_target_distance() ;
00322
00330 void compute_profile() ;
00331
00332 };
00333
00335 }
00336 }