sonar_tritech
SeaNetTypes.hpp
Go to the documentation of this file.
1 #ifndef _SEANET_TYPES_H_
2 #define _SEANET_TYPES_H_
3 
4 #include <base/Angle.hpp>
5 #include <stdint.h>
6 
7 namespace sea_net
8 {
9  struct VersionData
10  {
11  uint8_t softwareVersion;
12  uint8_t infoBits;
13  uint8_t serialNr;
14  uint8_t nodeID;
15  uint32_t programmLength;
16  uint16_t programmChecksum;
17  };
18 
20  {
22  SIDESCAN = 10,
23  SUBBOTTOM = 15,
25  BATHYMETER = 40,
26  };
27 
28  enum PacketType{
29  mtNull = 0,
36  };
37 
43  {
54  };
55 
62  {
64 
65  base::Angle left_limit;
66  base::Angle right_limit;
67  base::Angle angular_resolution;
68 
70  unsigned int select_channel;
71  unsigned int frequency_chan1;
72  unsigned int frequency_chan2;
73 
77  double max_distance;
79  double min_distance;
85 
90  bool continous;
91 
94  left_limit(base::Angle::fromRad(M_PI)),
95  right_limit(base::Angle::fromRad(-M_PI)),
96  angular_resolution(base::Angle::fromRad(5.0/180.0*M_PI)),
97  select_channel(2),
98  frequency_chan1(600000),
99  frequency_chan2(1200000),
100  max_distance(15.0),
101  min_distance(1.0),
102  speed_of_sound(1500.0),
103  continous(false)
104  {};
105 
106  bool operator==(const ProfilingConfig &other) const
107  {
108  return (other.mode == mode &&
109  other.left_limit == left_limit &&
110  other.right_limit == right_limit &&
112  other.select_channel == select_channel &&
113  other.frequency_chan1 == frequency_chan1 &&
114  other.frequency_chan2 == frequency_chan2 &&
115  other.max_distance == max_distance &&
116  other.min_distance == min_distance &&
117  other.speed_of_sound== speed_of_sound &&
118  other.continous == continous);
119  };
120 
121  bool operator!=(const ProfilingConfig &other) const
122  {
123  return !(other == *this);
124  };
125  };
126 
134  {
138  double gain;
144  double ad_threshold;
145 
147  : gain(0.4)
148  , ad_threshold(0.2) {}
149  };
150 
151  //some values are not working for the micron dst like lock_out time
152  //invert, etc
154  {
155  base::Angle left_limit;
156  base::Angle right_limit;
157  base::Angle angular_resolution;
158 
159  double max_distance;
160  double min_distance;
161  double resolution;
163  double gain;
164 
166  bool continous;
167  bool invert;
168 
170  left_limit(base::Angle::fromRad(M_PI)),
171  right_limit(base::Angle::fromRad(-M_PI)),
172  angular_resolution(base::Angle::fromRad(5.0/180.0*M_PI)),
173  max_distance(15.0),
174  min_distance(1.0),
175  resolution(0.1),
176  speed_of_sound(1500.0),
177  gain(0.4),
178  low_resolution(false),
179  continous(true),
180  invert(false)
181  {};
182 
183  bool operator==(const MicronConfig &other) const
184  {
185  return (other.left_limit == left_limit &&
186  other.right_limit == right_limit &&
188  other.max_distance == max_distance &&
189  other.min_distance == min_distance &&
190  other.resolution == resolution &&
191  other.speed_of_sound== speed_of_sound &&
192  other.gain == gain &&
193  other.low_resolution == low_resolution &&
194  other.continous == continous &&
195  other.invert == invert);
196  };
197  bool operator!=(const MicronConfig &other) const
198  {
199  return !(other == *this);
200  };
201  };
202 }
203 #endif
Definition: SeaNetTypes.hpp:33
double gain
Definition: SeaNetTypes.hpp:163
Definition: SeaNetTypes.hpp:32
PacketType
Definition: SeaNetTypes.hpp:28
Definition: SeaNetTypes.hpp:22
base::Angle right_limit
Definition: SeaNetTypes.hpp:156
Definition: SeaNetTypes.hpp:34
Definition: SeaNetTypes.hpp:32
Definition: SeaNetTypes.hpp:32
Definition: SeaNetTypes.hpp:32
Definition: SeaNetTypes.hpp:51
unsigned int frequency_chan2
Definition: SeaNetTypes.hpp:72
Definition: SeaNetTypes.hpp:30
Definition: SeaNetTypes.hpp:31
double min_distance
Definition: SeaNetTypes.hpp:79
double resolution
Definition: SeaNetTypes.hpp:161
unsigned int select_channel
Definition: SeaNetTypes.hpp:70
Definition: SeaNetTypes.hpp:33
bool invert
Definition: SeaNetTypes.hpp:167
uint32_t programmLength
Definition: SeaNetTypes.hpp:15
Definition: SeaNetTypes.hpp:34
Definition: SeaNetTypes.hpp:53
Definition: SeaNetTypes.hpp:23
base::Angle left_limit
Definition: SeaNetTypes.hpp:155
Definition: SeaNetTypes.hpp:31
Definition: SeaNetTypes.hpp:24
Definition: SeaNetTypes.hpp:34
Definition: SeaNetTypes.hpp:33
Definition: SeaNetTypes.hpp:21
base::Angle left_limit
Definition: SeaNetTypes.hpp:65
bool operator!=(const MicronConfig &other) const
Definition: SeaNetTypes.hpp:197
double min_distance
Definition: SeaNetTypes.hpp:160
ProfilingConfig()
Definition: SeaNetTypes.hpp:92
Definition: SeaNetTypes.hpp:34
double speed_of_sound
Definition: SeaNetTypes.hpp:84
double gain
Definition: SeaNetTypes.hpp:138
Definition: SeaNetTypes.hpp:33
Definition: SeaNetTypes.hpp:25
Definition: SeaNetTypes.hpp:32
Definition: SeaNetTypes.hpp:31
Definition: SeaNetTypes.hpp:30
DeviceType
Definition: SeaNetTypes.hpp:19
Definition: SeaNetTypes.hpp:31
double max_distance
Definition: SeaNetTypes.hpp:77
bool operator==(const MicronConfig &other) const
Definition: SeaNetTypes.hpp:183
base::Angle angular_resolution
Definition: SeaNetTypes.hpp:67
PROFILING_MODE
Definition: SeaNetTypes.hpp:42
Definition: SeaNetTypes.hpp:30
uint8_t nodeID
Definition: SeaNetTypes.hpp:14
uint16_t programmChecksum
Definition: SeaNetTypes.hpp:16
double ad_threshold
Definition: SeaNetTypes.hpp:144
base::Angle angular_resolution
Definition: SeaNetTypes.hpp:157
unsigned int frequency_chan1
Definition: SeaNetTypes.hpp:71
Definition: SeaNetTypes.hpp:33
double speed_of_sound
Definition: SeaNetTypes.hpp:162
bool continous
Definition: SeaNetTypes.hpp:166
bool operator==(const ProfilingConfig &other) const
Definition: SeaNetTypes.hpp:106
Definition: SeaNetTypes.hpp:30
ProfilingAcquisitionConfig()
Definition: SeaNetTypes.hpp:146
Definition: SeaNetTypes.hpp:34
bool low_resolution
Definition: SeaNetTypes.hpp:165
Definition: SeaNetTypes.hpp:61
uint8_t softwareVersion
Definition: SeaNetTypes.hpp:11
uint8_t serialNr
Definition: SeaNetTypes.hpp:13
Definition: SeaNetTypes.hpp:133
uint8_t infoBits
Definition: SeaNetTypes.hpp:12
bool continous
Definition: SeaNetTypes.hpp:90
Definition: SeaNetTypes.hpp:50
double max_distance
Definition: SeaNetTypes.hpp:159
Definition: SeaNetTypes.hpp:9
base::Angle right_limit
Definition: SeaNetTypes.hpp:66
MicronConfig()
Definition: SeaNetTypes.hpp:169
Definition: SeaNetTypes.hpp:29
bool operator!=(const ProfilingConfig &other) const
Definition: SeaNetTypes.hpp:121
Definition: SeaNetTypes.hpp:31
Definition: SeaNetTypes.hpp:35
PROFILING_MODE mode
Definition: SeaNetTypes.hpp:63
Definition: SeaNetTypes.hpp:32
Definition: SeaNetTypes.hpp:153