00001
00005 #pragma once
00006
00007 #include <usml/waveq3d/spreading_model.h>
00008
00009 namespace usml {
00010 namespace waveq3d {
00011
00012 using namespace usml::ocean ;
00013 class reverberation_model ;
00014
00044 class USML_DECLSPEC spreading_hybrid_gaussian : public spreading_model {
00045
00046 friend class wave_queue ;
00047 friend class wave_queue_reverb ;
00048 friend class reverberation_model ;
00049
00050 private:
00051
00053 vector<double> _norm_de ;
00054
00056 matrix<double> _norm_az ;
00057
00059 vector<double> _beam_width ;
00060
00062 vector<double> _intensity_de ;
00063
00065 vector<double> _intensity_az ;
00066
00068 matrix<bool> _duplicate ;
00069
00075 static const double SPREADING_WIDTH ;
00076
00083 static const double OVERLAP ;
00084
00090 static const double THRESHOLD ;
00091
00092 protected:
00093
00110 spreading_hybrid_gaussian( wave_queue& wave ) ;
00111
00115 virtual ~spreading_hybrid_gaussian() {}
00116
00141 inline vector<double> gaussian(double d,double w,double A) {
00142 _beam_width = _spread + OVERLAP * OVERLAP * w * w ;
00143 return element_div(
00144 exp( (-0.5*d*d) / _beam_width ),
00145 sqrt(_beam_width) ) * A ;
00146 }
00147
00161 virtual const vector<double>& intensity(
00162 const wposition1& location, size_t de, size_t az,
00163 const vector<double>& offset, const vector<double>& distance ) ;
00164
00178 virtual double width_de(
00179 size_t de, size_t az, const vector<double>& offset ) ;
00180
00194 virtual double width_az(
00195 size_t de, size_t az, const vector<double>& offset ) ;
00196
00197 private:
00198
00210 void intensity_de( size_t de, size_t az,
00211 const vector<double>& offset, const vector<double>& distance ) ;
00212
00224 void intensity_az( size_t de, size_t az,
00225 const vector<double>& offset, const vector<double>& distance ) ;
00226
00227 } ;
00228
00229 }
00230 }