NETSIM  1.0.0
Hardware-in-the-loopacousticnetworksimulator
environment.h
Go to the documentation of this file.
1 // Copyright 2020:
2 // GobySoft, LLC (2017-)
3 // Massachusetts Institute of Technology (2017-)
4 // File authors:
5 // Toby Schneider <toby@gobysoft.org>
6 //
7 //
8 // This file is part of the NETSIM Libraries.
9 //
10 // The NETSIM Libraries are free software: you can redistribute them and/or modify
11 // them under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 2.1 of the License, or
13 // (at your option) any later version.
14 //
15 // The NETSIM Libraries are distributed in the hope that they will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with NETSIM. If not, see <http://www.gnu.org/licenses/>.
22 
23 #ifndef ENVIRONMENTHELPERS20110310H
24 #define ENVIRONMENTHELPERS20110310H
25 
27 
28 #include <boost/serialization/vector.hpp>
29 
30 namespace netsim
31 {
32 namespace bellhop
33 {
35 {
36  public:
37  static void output_env(std::ostream* os, std::ostream* ssp, std::ostream* bty,
38  std::ostream* trc, std::ostream* brc, const protobuf::Environment& env);
39 };
40 
41 struct TLMatrix
42 {
43  std::vector<float> depths;
44  std::vector<float> ranges;
45  // tl[depth][range]
46  std::vector<std::vector<float>> tl;
47 
48  template <class Archive> void serialize(Archive& ar, const unsigned int version)
49  {
50  ar& depths;
51  ar& ranges;
52  ar& tl;
53  }
54 };
55 
56 } // namespace bellhop
57 } // namespace netsim
58 
59 #endif
environment.pb.h
netsim
Definition: environment.h:30
netsim::bellhop::TLMatrix::ranges
std::vector< float > ranges
Definition: environment.h:44
netsim::bellhop::TLMatrix::tl
std::vector< std::vector< float > > tl
Definition: environment.h:46
netsim::bellhop::TLMatrix::serialize
void serialize(Archive &ar, const unsigned int version)
Definition: environment.h:48
netsim::bellhop::Environment
Definition: environment.h:34
netsim::bellhop::Environment::output_env
static void output_env(std::ostream *os, std::ostream *ssp, std::ostream *bty, std::ostream *trc, std::ostream *brc, const protobuf::Environment &env)
netsim::bellhop::TLMatrix::depths
std::vector< float > depths
Definition: environment.h:43
netsim::bellhop::protobuf::Environment
Definition: environment.pb.h:2382
netsim::bellhop::TLMatrix
Definition: environment.h:41