Goby v2
node_status.proto
1 
2 import "dccl/option_extensions.proto";
3 
4 package goby.moos.protobuf;
5 
6 message NodeStatus
7 {
8  option (dccl.msg).id = 20;
9  option (dccl.msg).max_bytes = 32;
10  option (dccl.msg).unit_system = "si";
11  option (dccl.msg).codec_version = 3;
12 
13  required double time = 1 [
14  (dccl.field).codec = "_time",
15  (dccl.field).units.derived_dimensions = "time"
16  ];
17  optional string name = 2 [(dccl.field).omit = true];
18  optional uint32 modem_id = 12 [(dccl.field).min = 1, (dccl.field).max = 31];
19 
20  // defined in goby/core/proto/config.proto
21  optional VehicleType type = 3;
22 
23  // lat, lon, depth
24  required GeodeticCoordinate global_fix = 4;
25  // x, y, z on local cartesian grid
26  required CartesianCoordinate local_fix = 5;
27 
28  // roll, pitch, yaw
29  required EulerAngles pose = 7;
30 
31  // speed over ground (not relative to water or surface)
32  required double speed = 8 [
33  (dccl.field).max = 20.0,
34  (dccl.field).min = -2.0,
35  (dccl.field).precision = 1,
36  (dccl.field).units.derived_dimensions = "length/time"
37  ];
38 
39  optional SourceSensor speed_source = 9
40  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
41  optional double speed_time_lag = 11 [
42  (dccl.field).omit = true,
43  (dccl.field).units.derived_dimensions = "time"
44  ];
45 }
46 
47 // Type of vehicle for a given node
48 enum VehicleType
49 {
50  UNKNOWN = 0;
51  AUV = 1;
52  USV = 2;
53  SHIP = 3;
54  GLIDER = 4;
55  TARGET = 5;
56  BUOY = 6;
57  OTHER = -1;
58 }
59 
60 enum SourceSensor
61 {
62  SOURCE_UNKNOWN = 0;
63  GPS = 1;
64  DEAD_RECKONING = 2;
65  INERTIAL_MEASUREMENT_UNIT = 3;
66  PRESSURE_SENSOR = 4;
67  COMPASS = 5;
68  SIMULATION = 6;
69 }
70 
71 message GeodeticCoordinate
72 {
73  option (dccl.msg).unit_system = "si";
74 
75  optional double lat = 1 [
76  (dccl.field).omit = true,
77  (dccl.field).units.derived_dimensions = "plane_angle",
78  (dccl.field).units.system = "angle::degree"
79  ]; // dccl sends Cartesian Y
80  optional double lon = 2 [
81  (dccl.field).omit = true,
82  (dccl.field).units.derived_dimensions = "plane_angle",
83  (dccl.field).units.system = "angle::degree"
84  ]; // dccl sends Cartesian X
85  optional double depth = 3 [
86  default = 0,
87  (dccl.field).max = 6400.0,
88  (dccl.field).min = 0.0,
89  (dccl.field).precision = 1,
90  (dccl.field).units.derived_dimensions = "length"
91  ]; // negative of "height"
92  optional double altitude = 4 [
93  (dccl.field).max = 5000.0,
94  (dccl.field).min = -10.0,
95  (dccl.field).precision = 1,
96  (dccl.field).units.derived_dimensions = "length"
97  ];
98 
99  optional SourceSensor lat_source = 5
100  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
101  optional SourceSensor lon_source = 6
102  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
103  optional SourceSensor depth_source = 7
104  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
105  optional SourceSensor altitude_source = 8
106  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
107 
108  // time lags (in seconds) from the message Header time
109  optional double lat_time_lag = 9 [
110  (dccl.field).omit = true,
111  (dccl.field).units.derived_dimensions = "time"
112  ];
113  optional double lon_time_lag = 10 [
114  (dccl.field).omit = true,
115  (dccl.field).units.derived_dimensions = "time"
116  ];
117  optional double depth_time_lag = 11 [
118  (dccl.field).omit = true,
119  (dccl.field).units.derived_dimensions = "time"
120  ];
121  optional double altitude_time_lag = 12 [
122  (dccl.field).omit = true,
123  (dccl.field).units.derived_dimensions = "time"
124  ];
125 }
126 
127 // computed from GeodeticCoordinate
128 message CartesianCoordinate
129 {
130  option (dccl.msg).unit_system = "si";
131 
132  required double x = 1 [
133  (dccl.field).max = 100000,
134  (dccl.field).min = -100000,
135  (dccl.field).precision = 0,
136  (dccl.field).units.derived_dimensions = "length"
137  ];
138  required double y = 2 [
139  (dccl.field).max = 100000,
140  (dccl.field).min = -100000,
141  (dccl.field).precision = 0,
142  (dccl.field).units.derived_dimensions = "length"
143  ];
144  optional double z = 3 [
145  default = 0,
146  (dccl.field).omit = true,
147  (dccl.field).units.derived_dimensions = "length"
148  ]; // negative of "depth"
149 }
150 
151 // all in degrees
152 message EulerAngles
153 {
154  option (dccl.msg).unit_system = "si";
155 
156  optional double roll = 1 [
157  (dccl.field).max = 180,
158  (dccl.field).min = -180,
159  (dccl.field).precision = 1,
160  (dccl.field).units.derived_dimensions = "plane_angle",
161  (dccl.field).units.system = "angle::degree"
162  ];
163  optional double pitch = 2 [
164  (dccl.field).max = 180,
165  (dccl.field).min = -180,
166  (dccl.field).precision = 1,
167  (dccl.field).units.derived_dimensions = "plane_angle",
168  (dccl.field).units.system = "angle::degree"
169  ];
170  optional double heading = 3 [
171  (dccl.field).max = 360,
172  (dccl.field).min = 0,
173  (dccl.field).precision = 1,
174  (dccl.field).units.derived_dimensions = "plane_angle",
175  (dccl.field).units.system = "angle::degree"
176  ];
177 
178  optional double roll_rate = 4 [
179  (dccl.field).omit = true,
180  (dccl.field).units.derived_dimensions = "plane_angle/time",
181  (dccl.field).units.system = "angle::degree"
182  ];
183  optional double pitch_rate = 5 [
184  (dccl.field).omit = true,
185  (dccl.field).units.derived_dimensions = "plane_angle/time",
186  (dccl.field).units.system = "angle::degree"
187  ];
188  optional double heading_rate = 6 [
189  (dccl.field).omit = true,
190  (dccl.field).units.derived_dimensions = "plane_angle/time",
191  (dccl.field).units.system = "angle::degree"
192  ];
193 
194  optional SourceSensor roll_source = 10
195  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
196  optional SourceSensor pitch_source = 11
197  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
198  optional SourceSensor heading_source = 12
199  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
200  optional SourceSensor roll_rate_source = 13
201  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
202  optional SourceSensor pitch_rate_source = 14
203  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
204  optional SourceSensor heading_rate_source = 15
205  [(dccl.field).omit = true, default = SOURCE_UNKNOWN];
206 
207  // time lags (in seconds) from the message Header time
208  optional double roll_time_lag = 20 [
209  (dccl.field).omit = true,
210  (dccl.field).units.derived_dimensions = "time"
211  ];
212  optional double pitch_time_lag = 21 [
213  (dccl.field).omit = true,
214  (dccl.field).units.derived_dimensions = "time"
215  ];
216  optional double heading_time_lag = 22 [
217  (dccl.field).omit = true,
218  (dccl.field).units.derived_dimensions = "time"
219  ];
220  optional double roll_rate_time_lag = 23 [
221  (dccl.field).omit = true,
222  (dccl.field).units.derived_dimensions = "time"
223  ];
224  optional double pitch_rate_time_lag = 24 [
225  (dccl.field).omit = true,
226  (dccl.field).units.derived_dimensions = "time"
227  ];
228  optional double heading_rate_time_lag = 25 [
229  (dccl.field).omit = true,
230  (dccl.field).units.derived_dimensions = "time"
231  ];
232 }