World Ocean Simulation System (WOSS) library
transducer-definitions.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 WOSS_TRANSDUCER_DEFINITIONS_H
41#define WOSS_TRANSDUCER_DEFINITIONS_H
42
43
44#include <iostream>
45#include <complex>
46#include <map>
47#include <cmath>
48#include <cassert>
50
51
52namespace woss {
53
54
55 class CoordZ;
56
57
58 #define BEAM_PATTERN_CUSTOM_BEAM_PRECISION (1.0)
59 #define CONDUCTANCE_CUSTOM_FREQUENCY_PRECISION (1.0)
60 #define TVR_CUSTOM_FREQUENCY_PRECISION (1.0)
61 #define OCV_CUSTOM_FREQUENCY_PRECISION (1.0)
62 #define TRANSDUCER_NOT_SET (-1000)
63
64
70 class Transducer {
71
72
73 protected:
74
75
79 typedef ::std::map< PDouble, double > BeamPowerMap;
80 typedef BeamPowerMap::iterator BPMIter;
81 typedef BeamPowerMap::reverse_iterator BPMRIter;
82 typedef BeamPowerMap::const_iterator BPMCIter;
83 typedef BeamPowerMap::const_reverse_iterator BPMCRIter;
84
85
89 typedef ::std::map< PDouble, double > ConductanceMap;
90 typedef ConductanceMap::iterator CMIter;
91 typedef ConductanceMap::reverse_iterator CMRIter;
92 typedef ConductanceMap::const_iterator CMCIter;
93 typedef ConductanceMap::const_reverse_iterator CMCRIter;
94
95
99 typedef ::std::map< PDouble, double > TVRMap;
100 typedef TVRMap::iterator TVRMIter;
101 typedef TVRMap::reverse_iterator TVRMRIter;
102 typedef TVRMap::const_iterator TVRMCIter;
103 typedef TVRMap::const_reverse_iterator TVRMCRIter;
104
105
109 typedef ::std::map< PDouble, double > OCVMap;
110 typedef OCVMap::iterator OCVMIter;
111 typedef OCVMap::reverse_iterator OCVMRIter;
112 typedef OCVMap::const_iterator OCVMCIter;
113 typedef OCVMap::const_reverse_iterator OCVMCRIter;
114
115
116 public:
117
118
126 Transducer( long double beam_precision = BEAM_PATTERN_CUSTOM_BEAM_PRECISION, long double conduct_precison = CONDUCTANCE_CUSTOM_FREQUENCY_PRECISION,
127 long double tvr_precision = TVR_CUSTOM_FREQUENCY_PRECISION, long double ocv_precision = OCV_CUSTOM_FREQUENCY_PRECISION );
128
133 Transducer( const Transducer& copy );
134
147
148
149 virtual ~Transducer() { }
150
151
164 virtual Transducer* create( long double beam_precision = BEAM_PATTERN_CUSTOM_BEAM_PRECISION, long double conduct_precison = CONDUCTANCE_CUSTOM_FREQUENCY_PRECISION,
165 long double tvr_precision = TVR_CUSTOM_FREQUENCY_PRECISION, long double ocv_precision = OCV_CUSTOM_FREQUENCY_PRECISION ) const;
166
167
181
187 virtual Transducer* create( const Transducer& copy ) const;
188
193 virtual Transducer* clone() const;
194
195
200 virtual bool isValid() const;
201
202
208 Transducer& beampattern_rotate( double angle );
209
215 Transducer& beampattern_sum( double value );
216
222 Transducer& beampattern_multiply( double value );
223
224
231 virtual double getSPL( double frequency, double power ) const;
232
238 double getMaxSPL( double frequency ) const;
239
246 virtual double getPowerFromSPL( double frequency, double spl ) const;
247
254 bool beampattern_insert( double angle, double power );
255
256
263 Transducer& beampattern_replace( double angle, double power );
264
265
271 BPMCIter beampattern_find( double angle ) const;
272
273
279 Transducer& beampattern_erase( double angle );
280
281
286 int beampattern_size() const;
287
292 bool beampattern_empty() const;
293
294
300
301
306 BPMCIter beampattern_begin() const;
307
312 BPMCIter beampattern_end() const;
313
318 BPMCRIter beampattern_rbegin() const;
319
324 BPMCRIter beampattern_rend() const;
325
331 BPMCIter beampattern_lower_bound( double angle ) const;
332
338 BPMCIter beampattern_upper_bound( double angle ) const;
339
340
347 bool conductance_insert( double frequency, double conductance );
348
355 bool conductance_insert( double frequency, const ::std::complex<double>& impedance );
356
357
364 Transducer& conductance_replace( double frequency, double conductance );
365
372 Transducer& conductance_replace( double frequency, const ::std::complex<double>& impedance );
373
374
380 CMCIter conductance_find( double frequency ) const;
381
382
388 Transducer& conductance_erase( double frequency );
389
390
395 int conductance_size() const;
396
401 bool conductance_empty() const;
402
403
409
410
415 CMCIter conductance_begin() const;
416
421 CMCIter conductance_end() const;
422
427 CMCRIter conductance_rbegin() const;
428
433 CMCRIter conductance_rend() const;
434
440 CMCIter conductance_lower_bound( double frequency ) const;
441
447 CMCIter conductance_upper_bound( double frequency ) const;
448
449
456 bool tvr_insert( double frequency, double tvr );
457
464 Transducer& tvr_replace( double frequency, double tvr );
465
466
472 TVRMCIter tvr_find( double frequency ) const;
473
474
480 Transducer& tvr_erase( double frequency );
481
482
487 int tvr_size() const;
488
493 bool tvr_empty() const;
494
495
501
502
507 TVRMCIter tvr_begin() const;
508
513 TVRMCIter tvr_end() const;
514
519 TVRMCRIter tvr_rbegin() const;
520
525 TVRMCRIter tvr_rend() const;
526
532 TVRMCIter tvr_lower_bound( double frequency ) const;
533
539 TVRMCIter tvr_upper_bound( double frequency ) const;
540
541
548 bool ocv_insert( double frequency, double ocv );
549
556 Transducer& ocv_replace( double frequency, double ocv );
557
558
564 OCVMCIter ocv_find( double frequency ) const;
565
566
572 Transducer& ocv_erase( double frequency );
573
574
579 int ocv_size() const;
580
585 bool ocv_empty() const;
586
587
593
594
599 OCVMCIter ocv_begin() const;
600
605 OCVMCIter ocv_end() const;
606
611 OCVMCRIter ocv_rbegin() const;
612
617 OCVMCRIter ocv_rend() const;
618
624 OCVMCIter ocv_lower_bound( double frequency ) const;
625
631 OCVMCIter ocv_upper_bound( double frequency ) const;
632
633
639
640
646 virtual bool import( ::std::istream& stream_in );
647
653 virtual bool importBinary( ::std::fstream& stream_in );
654
655
664 bool writeVertBeamPattern( ::std::ostream& stream_out, const CoordZ& tx, const CoordZ& rx, double init_bearing, double vert_rot = 0, double horiz_rot = 0, double mult_costant = 1, double add_costant = 0 ) const;
665
666
672 bool writeSPL( ::std::ostream& stream_out, double frequency_step, double power ) const;
673
674
680 virtual bool write( ::std::ostream& stream_out ) const;
681
687 virtual bool writeBinary( ::std::fstream& file_out ) const;
688
689
690 Transducer& setMaxPower( double power );
691
692 Transducer& setDutyCycle( double cycle );
693
694 Transducer& setResonanceFrequency( double frequency );
695
696 Transducer& setBandwith3dB( double frequency );
697
698 Transducer& setTypeName( const ::std::string& name );
699
700
706 virtual Transducer& setBeamPrecision( long double prec );
707
713 virtual Transducer& setTVRPrecision( long double prec );
714
720 virtual Transducer& setOCVPrecision( long double prec );
721
727 virtual Transducer& setConductancePrecision( long double prec );
728
729
730 bool hasToroidalSymmetry() const;
731
732 bool hasConicalSymmetry() const;
733
734
739 double getMaxPower() const;
740
745 double getDutyCycle() const;
746
751 double getResonanceFrequency() const;
752
757 double getBandwith3dB() const;
758
763 ::std::string getTypeName() const;
764
765
770 long double getBeamPrecision() const;
771
776 long double getTVRPrecision() const;
777
782 long double getOCVPrecision() const;
783
788 long double getConductancePrecision() const;
789
790
796 Transducer& operator=( const Transducer& x ) ;
797
798
805 friend bool operator==( const Transducer& left, const Transducer& right );
806
813 friend bool operator!=( const Transducer& left, const Transducer& right );
814
815
822 friend ::std::ostream& operator<<( ::std::ostream& os, const Transducer& instance );
823
830 friend ::std::ostream& operator>>( ::std::istream& is, const Transducer& instance );
831
832
837 static void setDebug( bool flag ) { debug = flag; }
838
839
840 protected:
841
842
843 static const ::std::string conical_string;
844
845 static const ::std::string toroidal_string;
846
847
851 static bool debug;
852
853
858
859
864
869
873 double max_power;
874
878 double duty_cycle;
879
880
884 long double beam_precision;
885
890
894 long double tvr_precision;
895
899 long double ocv_precision;
900
904 ::std::string type_name;
905
906
911
916
921
926
927
933 virtual double normalizeAngle( double angle ) const;
934
935
943 virtual double getValue( double frequency, const ::std::map< PDouble, double >& map, long double precision, bool use_linear = false, double costant = 20.0 ) const;
944
945
950 virtual void beampattern_sum( double value, BeamPowerMap& map );
951
956 virtual void beampattern_multiply( double value, BeamPowerMap& map );
957
962 virtual void beampattern_rotate( double angle, BeamPowerMap& map );
963
964
973 virtual bool import( ::std::istream& stream_in, ::std::map< PDouble, double >& map, long double precision, bool is_angle = false );
974
983 virtual bool importBinary( ::std::fstream& file_in, ::std::map< PDouble, double >& map, long double precision, bool is_angle = false );
984
985
992 virtual bool write( ::std::ostream& stream_out, const ::std::map< PDouble, double >& map ) const;
993
1000 virtual bool writeBinary( ::std::fstream& file_out, const ::std::map< PDouble, double >& map ) const;
1001
1002
1003 virtual const ::std::string& getSymmetryString() const;
1004
1005
1006 };
1007
1008
1010 //inline functions
1011 inline Transducer& Transducer::setMaxPower( double power ) {
1012 max_power = power;
1013 return *this;
1014 }
1015
1016
1017 inline Transducer& Transducer::setDutyCycle( double cycle ) {
1018 duty_cycle = cycle;
1019 return *this;
1020 }
1021
1022
1023 inline Transducer& Transducer::setResonanceFrequency( double frequency ) {
1024 resonance_frequency = frequency;
1025 return *this;
1026 }
1027
1028
1029 inline Transducer& Transducer::setBandwith3dB( double bw ) {
1030 bandwith_3db = bw;
1031 return *this;
1032 }
1033
1034
1035 inline Transducer& Transducer::setTypeName( const ::std::string& name ) {
1036 type_name = name;
1037 return *this;
1038 }
1039
1040
1041 inline bool Transducer::hasToroidalSymmetry() const {
1042 return !has_conical_symmetry;
1043 }
1044
1045
1046 inline bool Transducer::hasConicalSymmetry() const {
1047 return has_conical_symmetry;
1048 }
1049
1050
1051 inline double Transducer::getMaxPower() const {
1052 return max_power;
1053 }
1054
1055
1056 inline double Transducer::getDutyCycle() const {
1057 return duty_cycle;
1058 }
1059
1060
1062 return resonance_frequency;
1063 }
1064
1065
1066 inline double Transducer::getBandwith3dB() const {
1067 return bandwith_3db;
1068 }
1069
1070
1071 inline ::std::string Transducer::getTypeName() const {
1072 return type_name;
1073 }
1074
1075
1076 inline double Transducer::getMaxSPL( double frequency ) const {
1077 return getSPL( frequency, max_power );
1078 }
1079
1080
1083 return *this;
1084 }
1085
1086
1087 inline Transducer& Transducer::beampattern_sum( double value ) {
1089 return *this;
1090 }
1091
1092
1095 return *this;
1096 }
1097
1098
1099 inline bool Transducer::beampattern_insert( double angle, double power ) {
1100 return beam_power_map.insert( ::std::make_pair( PDouble( normalizeAngle(angle), beam_precision), power ) ).second;
1101 }
1102
1103
1104 inline Transducer& Transducer::beampattern_replace( double angle, double power ) {
1105 normalizeAngle(angle);
1106 beam_power_map[PDouble(angle, beam_precision)] = power;
1107 return *this;
1108 }
1109
1110
1111 inline Transducer::BPMCIter Transducer::beampattern_find( double angle ) const {
1112 return beam_power_map.find(angle);
1113 }
1114
1115
1117 beam_power_map.erase(angle);
1118 return *this;
1119 }
1120
1121 inline int Transducer::beampattern_size() const {
1122 return beam_power_map.size();
1123 }
1124
1125
1126 inline bool Transducer::beampattern_empty() const {
1127 return beam_power_map.empty();
1128 }
1129
1130
1132 beam_power_map.clear();
1133 return *this;
1134 }
1135
1136
1137 inline Transducer::BPMCIter Transducer::beampattern_begin() const {
1138 return beam_power_map.begin();
1139 }
1140
1141
1142 inline Transducer::BPMCIter Transducer::beampattern_end() const {
1143 return beam_power_map.end();
1144 }
1145
1146
1147 inline Transducer::BPMCRIter Transducer::beampattern_rbegin() const {
1148 return beam_power_map.rbegin();
1149 }
1150
1151
1152 inline Transducer::BPMCRIter Transducer::beampattern_rend() const {
1153 return beam_power_map.rend();
1154 }
1155
1156
1157 inline Transducer::BPMCIter Transducer::beampattern_lower_bound( double angle ) const {
1158 return beam_power_map.lower_bound(PDouble(angle, beam_precision));
1159 }
1160
1161
1162 inline Transducer::BPMCIter Transducer::beampattern_upper_bound( double angle ) const {
1163 return beam_power_map.upper_bound(PDouble(angle, beam_precision));
1164 }
1165
1166
1167
1168 inline bool Transducer::conductance_insert( double frequency, double conductance ) {
1169 return conductance_map.insert( ::std::make_pair( PDouble( frequency, conductance_precision ), conductance ) ).second;
1170 }
1171
1172
1173 inline bool Transducer::conductance_insert( double frequency, const ::std::complex< double >& impedance ) {
1174 return conductance_map.insert( ::std::make_pair( PDouble( frequency, conductance_precision ), impedance.real()
1175 / ( ::std::pow( ::std::abs(impedance), 2.0 ) ) ) ).second;
1176 }
1177
1178
1179 inline Transducer& Transducer::conductance_replace( double frequency, double conductance ) {
1180 conductance_map[PDouble(frequency, conductance_precision)] = conductance;
1181 return *this;
1182 }
1183
1184
1185 inline Transducer& Transducer::conductance_replace( double frequency, const ::std::complex< double >& impedance ) {
1186 conductance_map[PDouble(frequency, conductance_precision)] = impedance.real()
1187 / ( ::std::pow( ::std::abs(impedance), 2.0 ) ) ;
1188 return *this;
1189 }
1190
1191
1192 inline Transducer::CMCIter Transducer::conductance_find( double frequency ) const {
1193 return conductance_map.find(frequency);
1194 }
1195
1196
1197 inline Transducer& Transducer::conductance_erase( double frequency ) {
1198 conductance_map.erase(frequency);
1199 return *this;
1200 }
1201
1202 inline int Transducer::conductance_size() const {
1203 return conductance_map.size();
1204 }
1205
1206
1207 inline bool Transducer::conductance_empty() const {
1208 return conductance_map.empty();
1209 }
1210
1211
1213 conductance_map.clear();
1214 return *this;
1215 }
1216
1217
1218 inline Transducer::CMCIter Transducer::conductance_begin() const {
1219 return conductance_map.begin();
1220 }
1221
1222
1223 inline Transducer::CMCIter Transducer::conductance_end() const {
1224 return conductance_map.end();
1225 }
1226
1227
1228 inline Transducer::CMCRIter Transducer::conductance_rbegin() const {
1229 return conductance_map.rbegin();
1230 }
1231
1232
1233 inline Transducer::CMCRIter Transducer::conductance_rend() const {
1234 return conductance_map.rend();
1235 }
1236
1237
1238 inline Transducer::CMCIter Transducer::conductance_lower_bound( double frequency ) const {
1239 return conductance_map.lower_bound(PDouble(frequency, conductance_precision));
1240 }
1241
1242
1243 inline Transducer::CMCIter Transducer::conductance_upper_bound( double frequency ) const {
1244 return conductance_map.upper_bound(PDouble(frequency, conductance_precision));
1245 }
1246
1247
1248
1249
1250 inline bool Transducer::tvr_insert( double frequency, double tvr ) {
1251 return tvr_map.insert( ::std::make_pair( PDouble( frequency, tvr_precision ), tvr ) ).second;
1252 }
1253
1254
1255 inline Transducer& Transducer::tvr_replace( double frequency, double tvr ) {
1256 tvr_map[PDouble(frequency, tvr_precision)] = tvr;
1257 return *this;
1258 }
1259
1260
1261 inline Transducer::CMCIter Transducer::tvr_find( double frequency ) const {
1262 return tvr_map.find(frequency);
1263 }
1264
1265
1266 inline Transducer& Transducer::tvr_erase( double frequency ) {
1267 tvr_map.erase(frequency);
1268 return *this;
1269 }
1270
1271 inline int Transducer::tvr_size() const {
1272 return tvr_map.size();
1273 }
1274
1275
1276 inline bool Transducer::tvr_empty() const {
1277 return tvr_map.empty();
1278 }
1279
1280
1282 tvr_map.clear();
1283 return *this;
1284 }
1285
1286
1287 inline Transducer::CMCIter Transducer::tvr_begin() const {
1288 return tvr_map.begin();
1289 }
1290
1291
1292 inline Transducer::CMCIter Transducer::tvr_end() const {
1293 return tvr_map.end();
1294 }
1295
1296
1297 inline Transducer::CMCRIter Transducer::tvr_rbegin() const {
1298 return tvr_map.rbegin();
1299 }
1300
1301
1302 inline Transducer::CMCRIter Transducer::tvr_rend() const {
1303 return tvr_map.rend();
1304 }
1305
1306
1307 inline Transducer::CMCIter Transducer::tvr_lower_bound( double frequency ) const {
1308 return tvr_map.lower_bound(PDouble(frequency, tvr_precision));
1309 }
1310
1311
1312 inline Transducer::CMCIter Transducer::tvr_upper_bound( double frequency ) const {
1313 return tvr_map.upper_bound(PDouble(frequency, tvr_precision));
1314 }
1315
1316
1317
1318 inline bool Transducer::ocv_insert( double frequency, double ocv ) {
1319 return ocv_map.insert( ::std::make_pair( PDouble( frequency, ocv_precision ), ocv ) ).second;
1320 }
1321
1322
1323 inline Transducer& Transducer::ocv_replace( double frequency, double ocv ) {
1324 ocv_map[PDouble(frequency, ocv_precision)] = ocv;
1325 return *this;
1326 }
1327
1328
1329 inline Transducer::CMCIter Transducer::ocv_find( double frequency ) const {
1330 return ocv_map.find(frequency);
1331 }
1332
1333
1334 inline Transducer& Transducer::ocv_erase( double frequency ) {
1335 ocv_map.erase(frequency);
1336 return *this;
1337 }
1338
1339 inline int Transducer::ocv_size() const {
1340 return ocv_map.size();
1341 }
1342
1343
1344 inline bool Transducer::ocv_empty() const {
1345 return ocv_map.empty();
1346 }
1347
1348
1350 ocv_map.clear();
1351 return *this;
1352 }
1353
1354
1355 inline Transducer::CMCIter Transducer::ocv_begin() const {
1356 return ocv_map.begin();
1357 }
1358
1359
1360 inline Transducer::CMCIter Transducer::ocv_end() const {
1361 return ocv_map.end();
1362 }
1363
1364
1365 inline Transducer::CMCRIter Transducer::ocv_rbegin() const {
1366 return ocv_map.rbegin();
1367 }
1368
1369
1370 inline Transducer::CMCRIter Transducer::ocv_rend() const {
1371 return ocv_map.rend();
1372 }
1373
1374
1375 inline Transducer::CMCIter Transducer::ocv_lower_bound( double frequency ) const {
1376 return ocv_map.lower_bound(PDouble(frequency, ocv_precision));
1377 }
1378
1379
1380 inline Transducer::CMCIter Transducer::ocv_upper_bound( double frequency ) const {
1381 return ocv_map.upper_bound(PDouble(frequency, ocv_precision));
1382 }
1383
1384
1386 beam_power_map.clear();
1387 ocv_map.clear();
1388 tvr_map.clear();
1389 conductance_map.clear();
1390 return *this;
1391 }
1392
1393
1394 inline long double Transducer::getBeamPrecision() const {
1395 return beam_precision;
1396 }
1397
1398
1399 inline long double Transducer::getConductancePrecision() const {
1400 return conductance_precision;
1401 }
1402
1403
1404 inline long double Transducer::getTVRPrecision() const {
1405 return tvr_precision;
1406 }
1407
1408
1409 inline long double Transducer::getOCVPrecision() const {
1410 return ocv_precision;
1411 }
1412
1413
1414 inline bool operator==( const Transducer& left, const Transducer& right ) {
1415 if ( &left == &right ) return true;
1416 return( left.beam_power_map == right.beam_power_map && left.conductance_map == right.conductance_map
1417 && left.tvr_map == right.tvr_map && left.ocv_map == right.ocv_map );
1418 }
1419
1420
1421 inline bool operator!=( const Transducer& left, const Transducer& right ) {
1422 if ( &left == &right ) return false;
1423 if ( &left == &right ) return true;
1424 return( left.beam_power_map != right.beam_power_map || left.conductance_map != right.conductance_map
1425 || left.tvr_map != right.tvr_map || left.ocv_map != right.ocv_map );
1426 }
1427
1428
1429 inline ::std::ostream& operator<<( ::std::ostream& os, const Transducer& instance ) {
1430 if ( !instance.write( os ) ) os.setstate( ::std::ios_base::failbit );
1431 return os;
1432 }
1433
1434
1435 inline ::std::istream& operator>>( ::std::istream& is, Transducer& instance ) {
1436 if ( !instance.import( is ) ) is.setstate( ::std::ios_base::failbit );
1437 return is;
1438 }
1439
1440
1441}
1442
1443
1444#endif // WOSS_TRANSDUCER_DEFINITIONS_H
1445
bool operator!=(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:846
std::ostream & operator<<(std::ostream &os, const Altimetry &instance)
Definition altimetry-definitions.h:826
bool operator==(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:840
3D-Coordinates (lat, long, depth) class definitions and functions library
Definition coordinates-definitions.h:403
Custom precision long double class.
Definition custom-precision-double.h:67
Transducer class.
Definition transducer-definitions.h:70
virtual Transducer & setBeamPrecision(long double prec)
Definition transducer-definitions.cpp:262
Transducer & beampattern_sum(double value)
Definition transducer-definitions.h:1087
double getDutyCycle() const
Definition transducer-definitions.h:1056
Transducer & ocv_clear()
Definition transducer-definitions.h:1349
Transducer & beampattern_clear()
Definition transducer-definitions.h:1131
TVRMCRIter tvr_rbegin() const
Definition transducer-definitions.h:1297
double getMaxSPL(double frequency) const
Definition transducer-definitions.h:1076
::std::map< PDouble, double > ConductanceMap
Definition transducer-definitions.h:89
BPMCIter beampattern_begin() const
Definition transducer-definitions.h:1137
virtual double getPowerFromSPL(double frequency, double spl) const
Definition transducer-definitions.cpp:441
double max_power
Definition transducer-definitions.h:873
int conductance_size() const
Definition transducer-definitions.h:1202
Transducer & beampattern_erase(double angle)
Definition transducer-definitions.h:1116
::std::map< PDouble, double > TVRMap
Definition transducer-definitions.h:99
friend bool operator==(const Transducer &left, const Transducer &right)
Definition transducer-definitions.h:1414
virtual double normalizeAngle(double angle) const
Definition transducer-definitions.cpp:998
double duty_cycle
Definition transducer-definitions.h:878
long double getBeamPrecision() const
Definition transducer-definitions.h:1394
TVRMCIter tvr_begin() const
Definition transducer-definitions.h:1287
TVRMCIter tvr_lower_bound(double frequency) const
Definition transducer-definitions.h:1307
Transducer & ocv_erase(double frequency)
Definition transducer-definitions.h:1334
TVRMCIter tvr_upper_bound(double frequency) const
Definition transducer-definitions.h:1312
BPMCRIter beampattern_rbegin() const
Definition transducer-definitions.h:1147
bool ocv_empty() const
Definition transducer-definitions.h:1344
Transducer & conductance_clear()
Definition transducer-definitions.h:1212
virtual Transducer & setTVRPrecision(long double prec)
Definition transducer-definitions.cpp:301
OCVMCRIter ocv_rbegin() const
Definition transducer-definitions.h:1365
BPMCRIter beampattern_rend() const
Definition transducer-definitions.h:1152
Transducer & conductance_replace(double frequency, double conductance)
Definition transducer-definitions.h:1179
Transducer & operator=(const Transducer &x)
Definition transducer-definitions.cpp:239
BPMCIter beampattern_lower_bound(double angle) const
Definition transducer-definitions.h:1157
double getMaxPower() const
Definition transducer-definitions.h:1051
virtual bool write(::std::ostream &stream_out) const
Definition transducer-definitions.cpp:565
CMCIter conductance_upper_bound(double frequency) const
Definition transducer-definitions.h:1243
long double beam_precision
Definition transducer-definitions.h:884
virtual bool isValid() const
Definition transducer-definitions.cpp:232
friend::std::ostream & operator<<(::std::ostream &os, const Transducer &instance)
Transducer & clearAll()
Definition transducer-definitions.h:1385
double resonance_frequency
Definition transducer-definitions.h:863
bool has_conical_symmetry
Definition transducer-definitions.h:857
::std::map< PDouble, double > BeamPowerMap
Definition transducer-definitions.h:79
long double conductance_precision
Definition transducer-definitions.h:889
virtual Transducer & setConductancePrecision(long double prec)
Definition transducer-definitions.cpp:288
OCVMCIter ocv_upper_bound(double frequency) const
Definition transducer-definitions.h:1380
virtual bool importBinary(::std::fstream &stream_in)
ConductanceMap conductance_map
Definition transducer-definitions.h:915
virtual bool writeBinary(::std::fstream &file_out) const
Definition transducer-definitions.cpp:600
Transducer & beampattern_rotate(double angle)
Definition transducer-definitions.h:1081
CMCRIter conductance_rend() const
Definition transducer-definitions.h:1233
TVRMCRIter tvr_rend() const
Definition transducer-definitions.h:1302
bool conductance_insert(double frequency, double conductance)
Definition transducer-definitions.h:1168
virtual double getSPL(double frequency, double power) const
Definition transducer-definitions.cpp:427
virtual Transducer * clone() const
Definition transducer-definitions.cpp:227
CMCIter conductance_lower_bound(double frequency) const
Definition transducer-definitions.h:1238
Transducer & ocv_replace(double frequency, double ocv)
Definition transducer-definitions.h:1323
CMCIter conductance_find(double frequency) const
Definition transducer-definitions.h:1192
BPMCIter beampattern_find(double angle) const
Definition transducer-definitions.h:1111
OCVMCRIter ocv_rend() const
Definition transducer-definitions.h:1370
BPMCIter beampattern_upper_bound(double angle) const
Definition transducer-definitions.h:1162
TVRMCIter tvr_end() const
Definition transducer-definitions.h:1292
int ocv_size() const
Definition transducer-definitions.h:1339
friend::std::ostream & operator>>(::std::istream &is, const Transducer &instance)
double getResonanceFrequency() const
Definition transducer-definitions.h:1061
Transducer & conductance_erase(double frequency)
Definition transducer-definitions.h:1197
OCVMap ocv_map
Definition transducer-definitions.h:925
int beampattern_size() const
Definition transducer-definitions.h:1121
bool ocv_insert(double frequency, double ocv)
Definition transducer-definitions.h:1318
long double getConductancePrecision() const
Definition transducer-definitions.h:1399
bool beampattern_empty() const
Definition transducer-definitions.h:1126
OCVMCIter ocv_end() const
Definition transducer-definitions.h:1360
int tvr_size() const
Definition transducer-definitions.h:1271
OCVMCIter ocv_begin() const
Definition transducer-definitions.h:1355
CMCIter conductance_begin() const
Definition transducer-definitions.h:1218
OCVMCIter ocv_lower_bound(double frequency) const
Definition transducer-definitions.h:1375
Transducer & tvr_replace(double frequency, double tvr)
Definition transducer-definitions.h:1255
virtual Transducer * create(long double beam_precision=BEAM_PATTERN_CUSTOM_BEAM_PRECISION, long double conduct_precison=CONDUCTANCE_CUSTOM_FREQUENCY_PRECISION, long double tvr_precision=TVR_CUSTOM_FREQUENCY_PRECISION, long double ocv_precision=OCV_CUSTOM_FREQUENCY_PRECISION) const
Definition transducer-definitions.cpp:213
Transducer & tvr_clear()
Definition transducer-definitions.h:1281
double bandwith_3db
Definition transducer-definitions.h:868
long double ocv_precision
Definition transducer-definitions.h:899
long double getTVRPrecision() const
Definition transducer-definitions.h:1404
CMCIter conductance_end() const
Definition transducer-definitions.h:1223
virtual double getValue(double frequency, const ::std::map< PDouble, double > &map, long double precision, bool use_linear=false, double costant=20.0) const
Definition transducer-definitions.cpp:377
static void setDebug(bool flag)
Definition transducer-definitions.h:837
friend bool operator!=(const Transducer &left, const Transducer &right)
Definition transducer-definitions.h:1421
long double getOCVPrecision() const
Definition transducer-definitions.h:1409
BPMCIter beampattern_end() const
Definition transducer-definitions.h:1142
bool tvr_empty() const
Definition transducer-definitions.h:1276
TVRMap tvr_map
Definition transducer-definitions.h:920
double getBandwith3dB() const
Definition transducer-definitions.h:1066
bool beampattern_insert(double angle, double power)
Definition transducer-definitions.h:1099
CMCRIter conductance_rbegin() const
Definition transducer-definitions.h:1228
static bool debug
Definition transducer-definitions.h:851
bool writeSPL(::std::ostream &stream_out, double frequency_step, double power) const
Definition transducer-definitions.cpp:746
TVRMCIter tvr_find(double frequency) const
Definition transducer-definitions.h:1261
Transducer & beampattern_replace(double angle, double power)
Definition transducer-definitions.h:1104
virtual Transducer & setOCVPrecision(long double prec)
Definition transducer-definitions.cpp:275
::std::string type_name
Definition transducer-definitions.h:904
::std::string getTypeName() const
Definition transducer-definitions.h:1071
BeamPowerMap beam_power_map
Definition transducer-definitions.h:910
long double tvr_precision
Definition transducer-definitions.h:894
bool tvr_insert(double frequency, double tvr)
Definition transducer-definitions.h:1250
Transducer & beampattern_multiply(double value)
Definition transducer-definitions.h:1093
::std::map< PDouble, double > OCVMap
Definition transducer-definitions.h:109
bool conductance_empty() const
Definition transducer-definitions.h:1207
Transducer & tvr_erase(double frequency)
Definition transducer-definitions.h:1266
OCVMCIter ocv_find(double frequency) const
Definition transducer-definitions.h:1329
bool writeVertBeamPattern(::std::ostream &stream_out, const CoordZ &tx, const CoordZ &rx, double init_bearing, double vert_rot=0, double horiz_rot=0, double mult_costant=1, double add_costant=0) const
Definition transducer-definitions.cpp:766
Provides the interface for the woss::PDouble class.