World Ocean Simulation System (WOSS) library
ac-toolbox-arr-bin-reader.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - federico@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * This software has been developed by Federico Guerra and SIGNET lab,
24 * University of Padova, in collaboration with the NATO Centre for
25 * Maritime Research and Experimentation (http://www.cmre.nato.int ;
26 * E-mail: pao@cmre.nato.int), whose support is gratefully acknowledged.
27 */
28
29
40#ifndef AC_TOOLBOX_ARR_BIN_READER_DEFINITIONS_H
41#define AC_TOOLBOX_ARR_BIN_READER_DEFINITIONS_H
42
43
45
46
47namespace woss {
48
49
56 class ArrBinResReader : public ResReader {
57
58
59 public:
60
61
66
71 ArrBinResReader( const Woss* const woss );
72
73
74 virtual ~ArrBinResReader();
75
76
81 virtual bool initialize();
82
83
95 virtual Pressure* readAvgPressure( double frequency, double tx_depth, double start_rx_depth, double start_rx_range, double end_rx_depth, double end_rx_range );
96
106 virtual Pressure* readPressure(double frequency, double tx_depth, double rx_depth, double rx_range ) const;
107
108
117 virtual TimeArr* readTimeArr(double frequency, double tx_depth, double rx_depth, double rx_range ) const;
118
119
120 protected:
121
122
127
132
133
137 ::std::ifstream file_reader;
138
142 ::std::streampos skip_header;
143
144
149
150 double last_tx_depth;
151
152 double last_start_rx_depth;
153
154 double last_start_rx_range;
155
156 double last_end_rx_depth;
157
158 double last_end_rx_range;
159
160 ::std::complex<double> last_ret_value;
161
162
171 TimeArr* accessMap(double frequency, double tx_depth, double rx_depth, double rx_range) const {
172 return( arr_file.arr_values + arr_file.getTimeArrIndex( tx_depth, rx_depth, rx_range ) );
173 }
174
185 ::std::complex<double> readMapAvgPressure( double frequency, double tx_depth, double start_rx_depth, double start_rx_range, double end_rx_depth, double end_rx_range );
186
187
192 bool getArrBinHeader();
193
198 bool getArrBinFile();
199
200
201 };
202
203
204}
205
206
207#endif /* AC_TOOLBOX_ARR_BIN_READER_DEFINITIONS_H */
208
209
210
211
212
Provides the interface for woss::ArrAscResReader and woss::ArrData classes.
Class for reading and manipulating results provided by any acoustic toolbox binary ARR file.
Definition ac-toolbox-arr-bin-reader.h:56
virtual bool initialize()
Definition ac-toolbox-arr-bin-reader.cpp:97
bool arr_bin_header_collected
Definition ac-toolbox-arr-bin-reader.h:126
::std::streampos skip_header
Definition ac-toolbox-arr-bin-reader.h:142
virtual Pressure * readAvgPressure(double frequency, double tx_depth, double start_rx_depth, double start_rx_range, double end_rx_depth, double end_rx_range)
Definition ac-toolbox-arr-bin-reader.cpp:375
bool arr_bin_file_collected
Definition ac-toolbox-arr-bin-reader.h:131
TimeArr * accessMap(double frequency, double tx_depth, double rx_depth, double rx_range) const
Definition ac-toolbox-arr-bin-reader.h:171
ArrData arr_file
Definition ac-toolbox-arr-bin-reader.h:148
::std::complex< double > readMapAvgPressure(double frequency, double tx_depth, double start_rx_depth, double start_rx_range, double end_rx_depth, double end_rx_range)
Definition ac-toolbox-arr-bin-reader.cpp:387
virtual TimeArr * readTimeArr(double frequency, double tx_depth, double rx_depth, double rx_range) const
Definition ac-toolbox-arr-bin-reader.cpp:381
::std::ifstream file_reader
Definition ac-toolbox-arr-bin-reader.h:137
bool getArrBinHeader()
Definition ac-toolbox-arr-bin-reader.cpp:108
bool getArrBinFile()
Definition ac-toolbox-arr-bin-reader.cpp:228
ArrBinResReader()
Definition ac-toolbox-arr-bin-reader.cpp:56
virtual Pressure * readPressure(double frequency, double tx_depth, double rx_depth, double rx_range) const
Definition ac-toolbox-arr-bin-reader.cpp:370
class for storing data of any acoustic toolbox ARR file
Definition ac-toolbox-arr-asc-reader.h:58
TimeArr * arr_values
Definition ac-toolbox-arr-asc-reader.h:114
int getTimeArrIndex(double tx_depth, double rx_depth, double rx_range) const
Definition ac-toolbox-arr-asc-reader.cpp:91
Complex attenuated pressure class.
Definition pressure-definitions.h:59
Abstract class for channel simulator result files processing.
Definition res-reader.h:59
Channel power delay profile class.
Definition time-arrival-definitions.h:82
Abstract class that provides the interface for initializing and running a channel simulator.
Definition woss.h:94