USML
proploss.h
1 
5 #ifndef USML_WAVEQ3D_PROPLOSS_H
6 #define USML_WAVEQ3D_PROPLOSS_H
7 
8 #include <usml/ocean/ocean.h>
9 #include <usml/waveq3d/proplossListener.h>
10 #include <usml/waveq3d/wave_queue.h>
11 
12 namespace usml {
13 namespace waveq3d {
14 
15 using namespace usml::ocean;
16 
19 
27 class USML_DECLSPEC proploss : public proplossListener {
28 
29 private:
30 
35 
42 
48 
55 
63 
68  double _time_step;
69 
73  matrix< eigenray_list > _eigenrays;
74 
77 
87  matrix< eigenray > _loss;
88 
89 public:
90 
97  proploss(const wposition* targets);
98 
109  proploss( const seq_vector& frequencies, const wposition1& source_pos,
110  const seq_vector& source_de, const seq_vector& source_az,
111  double time_step, const wposition* targets);
112 
113 private:
114 
119  void initialize();
120 
121 public:
122 
127  inline unsigned size1() const {
128  return _targets->size1();
129  }
130 
135  inline unsigned size2() const {
136  return _targets->size2();
137  }
138 
146  inline wposition1 position(unsigned t1, unsigned t2) {
147  return wposition1(*_targets, t1, t2);
148  }
149 
154  inline const seq_vector* frequencies() const {
155  return _frequencies;
156  }
157 
165  inline eigenray_list* eigenrays(unsigned t1, unsigned t2) {
166  return &(_eigenrays(t1, t2));
167  }
168 
177  inline const eigenray* total(unsigned t1, unsigned t2) {
178  return &(_loss(t1, t2));
179  }
180 
189  bool addEigenray(unsigned targetRow, unsigned targetCol, eigenray pRay );
190 
191 
198  void sum_eigenrays(bool coherent = true);
199 
322  void write_netcdf(
323  const char* filename, const char* long_name = NULL);
324 
325 };
326 
328 } // end of namespace waveq3d
329 } // end of namespace usml
330 
331 #endif
matrix< eigenray_list > _eigenrays
List of eigenrays associated with each target.
Definition: proploss.h:73
const seq_vector * _source_de
Initial depression/elevation angle at the source location (degrees, positive is up).
Definition: proploss.h:54
World location in geodetic earth coordinates (latitude, longitude, and altitude). ...
Definition: wposition.h:39
int _num_eigenrays
Total number of eigenrays.
Definition: proploss.h:76
A single acoustic path between a source and target.
Definition: eigenray.h:24
const wposition * _targets
Matrix of target positions in world coordinates.
Definition: proploss.h:34
const seq_vector * _source_az
Initial azimuthal angle at the source location (degrees, clockwise from true north).
Definition: proploss.h:62
eigenray_list * eigenrays(unsigned t1, unsigned t2)
Return eigenray list for a single target.
Definition: proploss.h:165
unsigned size1() const
Number of rows in target grid.
Definition: proploss.h:127
static const double time_step
Definition: eigenray_test.cc:20
const seq_vector * _frequencies
Frequencies over which loss was computed (Hz).
Definition: proploss.h:41
Container for a list of targets and their associated propagation data.
Definition: proploss.h:27
std::list< eigenray > eigenray_list
List of acoustic paths between a source and target.
Definition: eigenray.h:89
const wposition1 _source_pos
Location of the wavefront source in spherical earth coordinates.
Definition: proploss.h:47
wposition1 position(unsigned t1, unsigned t2)
Position of a single target in the grid.
Definition: proploss.h:146
World location in geodetic earth coordinates (latitude, longitude, and altitude). ...
Definition: wposition1.h:23
matrix< eigenray > _loss
Propagation loss summed over all eigenrays.
Definition: proploss.h:87
double _time_step
Propagation step size (seconds).
Definition: proploss.h:68
This class is part of a Observer/Subject pattern for the wave_queue class and allows for multiple pro...
Definition: proplossListener.h:22
unsigned size2() const
Number of columns in target grid.
Definition: proploss.h:135
const eigenray * total(unsigned t1, unsigned t2)
Propagation loss for a single target summed over eigenrays.
Definition: proploss.h:177
A read-only, monotonic sequence of values.
Definition: seq_vector.h:36
const seq_vector * frequencies() const
Frequencies over which propagation is computed (Hz).
Definition: proploss.h:154