USML
profile_model.h
1 
5 #ifndef USML_OCEAN_PROFILE_MODEL_H
6 #define USML_OCEAN_PROFILE_MODEL_H
7 
8 #include <usml/ocean/attenuation_thorp.h>
9 
10 namespace usml {
11 namespace ocean {
12 
13 using boost::numeric::ublas::vector;
14 
17 
28 class USML_DECLSPEC profile_model : public attenuation_model {
29 
30 public:
31 
38  profile_model( attenuation_model* attmodel = NULL ) : _flat_earth(false) {
39  if ( attmodel ) {
40  _attenuation = attmodel ;
41  } else {
42  _attenuation = new attenuation_thorp() ;
43  }
44  }
45 
49  virtual ~profile_model() {
50  delete _attenuation ;
51  }
52 
60  inline void flat_earth( bool flat ) {
61  _flat_earth = flat ;
62  }
63 
72  virtual void sound_speed( const wposition& location,
73  matrix<double>* speed, wvector* gradient=NULL ) = 0 ;
74 
80  void attenuation( attenuation_model* attmodel ) {
81  if ( _attenuation ) delete _attenuation ;
82  _attenuation = attmodel ;
83  }
84 
93  virtual void attenuation(
94  const wposition& location,
95  const seq_vector& frequencies,
96  const matrix<double>& distance,
97  matrix< vector<double> >* attenuation)
98  {
99  _attenuation->attenuation(
100  location, frequencies, distance, attenuation ) ;
101  }
102 
103 
104  protected:
105 
139  virtual void adjust_speed( const wposition& location,
140  matrix<double>* speed, wvector* gradient=NULL ) ;
141 
143  bool _flat_earth ;
144 
147 
148 };
149 
151 } // end of namespace ocean
152 } // end of namespace usml
153 
154 #endif
World location in geodetic earth coordinates (latitude, longitude, and altitude). ...
Definition: wposition.h:39
Models attenuation loss using the Thorp's model.
Definition: attenuation_thorp.h:52
void flat_earth(bool flat)
Anti-correction term to make the earth seem flat.
Definition: profile_model.h:60
bool _flat_earth
Anti-correction term to make the earth seem flat.
Definition: profile_model.h:143
attenuation_model * _attenuation
Reference to the in-water attenuation model.
Definition: profile_model.h:146
virtual void attenuation(const wposition &location, const seq_vector &frequencies, const matrix< double > &distance, matrix< vector< double > > *attenuation)
Computes the broadband absorption loss of sea water.
Definition: profile_model.h:93
A "profile model" computes the environmental parameters of ocean water.
Definition: profile_model.h:28
virtual ~profile_model()
Destructor - Delete attenuation model.
Definition: profile_model.h:49
World vector in spherical earth coordinates.
Definition: wvector.h:42
void attenuation(attenuation_model *attmodel)
Define a new in-water attenuation model.
Definition: profile_model.h:80
A read-only, monotonic sequence of values.
Definition: seq_vector.h:36
An attenuation loss model computes the absorption of sound by the minerals in sea water...
Definition: attenuation_model.h:30
profile_model(attenuation_model *attmodel=NULL)
Constructor - Initialize component models within ocean profile.
Definition: profile_model.h:38