Goby v2
ctd_sample.proto
1 
2 import "dccl/option_extensions.proto";
3 
4 package goby.moos.protobuf;
5 message CTDSample
6 {
7  option (dccl.msg).id = 200;
8  option (dccl.msg).max_bytes = 32;
9 
10  optional int32 source_id = 1 [
11  (dccl.field).max = 31,
12  (dccl.field).min = 0,
13  (dccl.field).in_head = true
14  ];
15  required double time = 2
16  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
17 
18  // required "primary" measurements
19  optional double conductivity = 10 [(dccl.field).omit = true];
20  required double temperature = 11 [
21  (dccl.field).min = 0,
22  (dccl.field).max = 30,
23  (dccl.field).precision = 1
24  ];
25 
26  required double pressure = 12 [
27  (dccl.field).min = 0,
28  (dccl.field).max = 100000000,
29  (dccl.field).precision = -4
30  ];
31 
32  // required "secondary" or calculated quantities (can be calculated
33  // from "primary" measurements alone using empirical formulas).
34  required double salinity = 20 [
35  (dccl.field).min = 0,
36  (dccl.field).max = 42,
37  (dccl.field).precision = 1
38  ];
39  required double sound_speed = 21 [
40  (dccl.field).min = 1400,
41  (dccl.field).max = 1600,
42  (dccl.field).precision = 0
43  ];
44  required double density = 22 [
45  (dccl.field).min = 900,
46  (dccl.field).max = 1200,
47  (dccl.field).precision = 0
48  ];
49 
50  required double depth = 23 [
51  (dccl.field).min = 0,
52  (dccl.field).max = 10000,
53  (dccl.field).precision = 0
54  ];
55 
56  required double lat = 24 [
57  (dccl.field).min = -90,
58  (dccl.field).max = 90,
59  (dccl.field).precision = 6
60  ];
61 
62  required double lon = 25 [
63  (dccl.field).min = -180,
64  (dccl.field).max = 180,
65  (dccl.field).precision = 6
66  ];
67 
68  // algorithm used for secondary quantities
69  enum SalinityAlgorithm
70  {
71  SAL_ALGORITHM_UNKNOWN = 0;
72  UNESCO_44_PREKIN_AND_LEWIS_1980 = 1;
73  }
74  optional SalinityAlgorithm salinity_algorithm = 30
75  [default = SAL_ALGORITHM_UNKNOWN, (dccl.field).omit = true];
76 
77  enum SoundSpeedAlgorithm
78  {
79  SS_ALGORITHM_UNKNOWN = 0;
80  UNESCO_44_CHEN_AND_MILLERO_1977 = 1;
81  MACKENZIE_1981 = 2;
82  DEL_GROSSO_1974 = 3;
83  }
84  optional SoundSpeedAlgorithm sound_speed_algorithm = 31
85  [default = SS_ALGORITHM_UNKNOWN, (dccl.field).omit = true];
86 
87  enum DensityAlgorithm
88  {
89  DENSITY_ALGORITHM_UNKNOWN = 0;
90  UNESCO_38_MILLERO_AND_POISSON_1981 = 1;
91  }
92  optional DensityAlgorithm density_algorithm = 32
93  [default = DENSITY_ALGORITHM_UNKNOWN, (dccl.field).omit = true];
94 }