Skip to content

Commit 8aff9ad

Browse files
PhRosenbergerjdsika
authored andcommitted
Documentation/units not in brackets (#365)
* Units correctly written in doc/commenting.rst * All units in all necessary files now correctly written without brackets. * Typo corrections in docu.
1 parent d8efb63 commit 8aff9ad

15 files changed

+204
-208
lines changed

doc/commenting.rst

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ During the building process of open simulation interface (using the `proto2cpp <
77

88
For any additional comment styles see `list <http://www.doxygen.nl/manual/commands.html>`_ of doxygen commands.
99

10+
Reference for writing values and units: ISO 80000-1: 2009, Quantities and units – Part 1: General
11+
Nice summary: [Rohde & Schwarz: Der korrekte Umgang mit Größen, Einheiten und Gleichungen ](https://karriere.rohde-schwarz.de/fileadmin/customer/downloads/PDF/Der_korrekte_Umgang_mit_Groessen_Einheiten_und_Gleichungen_bro_de_01.pdf
12+
)
13+
1014

1115
Commenting with block syntax
1216
-----------------------------
@@ -28,7 +32,7 @@ When writing comments specifying messages please use the following template:
2832
Doxygen will interpret a comment consisting just of one single line as a brief description.
2933
However to keep the style of the documentation coherent there should not be any brief description when commenting on fields and enums. That is why adding one more empty line when commenting becomes necessary. There is no need for an extra empty line if you are commenting more than one line anyways.
3034

31-
.. code-block:: proto
35+
.. code-block:: protobuf
3236
3337
// <If you write two or more lines of comments...>
3438
// <... you do not need to add an empty line>
@@ -146,7 +150,7 @@ Then you describe the field by adding an explanation.
146150
//
147151
message EnvironmentalConditions
148152
{
149-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
153+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
150154
//
151155
optional double atmospheric_pressure = 1;
152156
}
@@ -165,9 +169,9 @@ Next you decide the unit of the field.
165169
//
166170
message EnvironmentalConditions
167171
{
168-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
172+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
169173
//
170-
// Unit: [Pa]
174+
// Unit: Pa
171175
//
172176
optional double atmospheric_pressure = 1;
173177
}
@@ -186,9 +190,9 @@ You can optionally add a note to the field to describe the field better.
186190
//
187191
message EnvironmentalConditions
188192
{
189-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
193+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
190194
//
191-
// Unit: [Pa]
195+
// Unit: Pa
192196
//
193197
// \note 100000 Pa = 1 bar
194198
//
@@ -209,9 +213,9 @@ If you want to provide a reference to a DIN or to web page which helps in unders
209213
//
210214
message EnvironmentalConditions
211215
{
212-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
216+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
213217
//
214-
// Unit: [Pa]
218+
// Unit: Pa
215219
//
216220
// \note 100000 Pa = 1 bar
217221
//
@@ -235,9 +239,9 @@ Finally you can provide a set of rules which this field needs to be followed. Th
235239
//
236240
message EnvironmentalConditions
237241
{
238-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
242+
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
239243
//
240-
// Unit: [Pa]
244+
// Unit: Pa
241245
//
242246
// \note 100000 Pa = 1 bar
243247
//
@@ -302,15 +306,15 @@ Commenting with doxygen references
302306
------------------------------------
303307
If you need to reference to another message etc., you can achieve that by just using the exact same name of this message (upper and lower case sensitive) in your comment and put '\c' in front of the message name.
304308

305-
.. code-block:: proto
309+
.. code-block:: protobuf
306310
307311
// A reference to \c GroundTruth message.
308312
309313
If you want to reference a nested message, use '::' instead of '.' as separators in comments.
310314

311315
If you want to reference message fields and enums add '#' to the enum/field name.
312316

313-
.. code-block:: proto
317+
.. code-block:: protobuf
314318
315319
// A reference to a enum e.g. \c #COLOR_GREEN.
316320

osi_common.proto

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@ package osi3;
1010
//
1111
// The coordinate system is defined as right-handed.
1212
//
13-
// Units are [m] for positions, [m/s] for velocities and [m/s^2] for
13+
// Units are m for positions, m/s for velocities, and m/s^2 for
1414
// accelerations.
1515
//
1616
message Vector3d
1717
{
1818
// The x coordinate.
1919
//
20-
// Unit: [m] [m/s] or [m/s^2]
20+
// Unit: m, m/s, or m/s^2
2121
//
2222
optional double x = 1;
2323

2424
// The y coordinate.
2525
//
26-
// Unit: [m] [m/s] or [m/s^2]
26+
// Unit: m, m/s, or m/s^2
2727
//
2828
optional double y = 2;
2929

3030
// The z coordinate.
3131
//
32-
// Unit: [m] [m/s] or [m/s^2]
32+
// Unit: m, m/s, or m/s^2
3333
//
3434
optional double z = 3;
3535
}
@@ -38,20 +38,20 @@ message Vector3d
3838
// \brief A cartesian 2D vector for positions, velocities or accelerations or
3939
// its uncertainties.
4040
//
41-
// Units are [m] for positions, [m/s] for velocities and [m/s^2] for
41+
// Units are m for positions, m/s for velocities, and m/s^2 for
4242
// accelerations.
4343
//
4444
message Vector2d
4545
{
4646
// The x coordinate.
4747
//
48-
// Unit: [m] [m/s] or [m/s^2]
48+
// Unit: m, m/s, or m/s^2
4949
//
5050
optional double x = 1;
5151

5252
// The y coordinate.
5353
//
54-
// Unit: [m] [m/s] or [m/s^2]
54+
// Unit: m, m/s, or m/s^2
5555
//
5656
optional double y = 2;
5757
}
@@ -70,15 +70,15 @@ message Timestamp
7070
// The number of seconds since the start of e.g. the simulation / system /
7171
// vehicle.
7272
//
73-
// Unit: [s]
73+
// Unit: s
7474
//
7575
optional int64 seconds = 1;
7676

7777
// The number of nanoseconds since the start of the last second.
7878
//
7979
// Range: [0, 999.999.999]
8080
//
81-
// Unit: [ns]
81+
// Unit: ns
8282
//
8383
optional uint32 nanos = 2;
8484
}
@@ -98,19 +98,19 @@ message Dimension3d
9898
{
9999
// The length of the box.
100100
//
101-
// Unit: [m]
101+
// Unit: m
102102
//
103103
optional double length = 1;
104104

105105
// The width of the box.
106106
//
107-
// Unit: [m]
107+
// Unit: m
108108
//
109109
optional double width = 2;
110110

111111
// The height of the box.
112112
//
113-
// Unit: [m]
113+
// Unit: m
114114
//
115115
optional double height = 3;
116116
}
@@ -119,10 +119,10 @@ message Dimension3d
119119
// \brief A 3D orientation, orientation rate or orientation acceleration (i.e.
120120
// derivatives) or its uncertainties denoted in euler angles.
121121
//
122-
// Units are [rad] for orientation [rad/s] for rates and [rad/s^2] for
122+
// Units are rad for orientation, rad/s for rates, and rad/s^2 for
123123
// accelerations
124124
//
125-
// The preferred angular range is (-pi, pi]. The coordinate system is defined as
125+
// The preferred angular range is [-pi, pi]. The coordinate system is defined as
126126
// right-handed.
127127
// For the sense of each rotation, the right-hand rule applies.
128128
//
@@ -152,19 +152,19 @@ message Orientation3d
152152
{
153153
// The roll angle/rate/acceleration.
154154
//
155-
// Unit: [rad] [rad/s] or [rad/s^2]
155+
// Unit: rad, rad/s, or rad/s^2
156156
//
157157
optional double roll = 1;
158158

159159
// The pitch angle/rate/acceleration.
160160
//
161-
// Unit: [rad] [rad/s] or [rad/s^2]
161+
// Unit: rad, rad/s, or rad/s^2
162162
//
163163
optional double pitch = 2;
164164

165165
// The yaw angle/rate/acceleration.
166166
//
167-
// Unit: [rad] [rad/s] or [rad/s^2]
167+
// Unit: rad, rad/s, or rad/s^2
168168
//
169169
optional double yaw = 3;
170170
}
@@ -232,19 +232,19 @@ message Spherical3d
232232
{
233233
// The radial distance.
234234
//
235-
// Unit: [m]
235+
// Unit: m
236236
//
237237
optional double distance = 1;
238238

239239
// The azimuth (horizontal) angle.
240240
//
241-
// Unit: [rad]
241+
// Unit: rad
242242
//
243243
optional double azimuth = 2;
244244

245245
// The elevation (vertical) angle.
246246
//
247-
// Unit: [rad]
247+
// Unit: rad
248248
//
249249
optional double elevation = 3;
250250
}

osi_datarecording.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ package osi3;
1212
//
1313
message SensorDataSeries
1414
{
15-
// List of sensor data messages for subsequent timesteps.
15+
// List of sensor data messages for subsequent time steps.
1616
//
1717
// \note OSI uses singular instead of plural for repeated field names.
1818
//
@@ -25,7 +25,7 @@ message SensorDataSeries
2525
//
2626
message SensorDataSeriesList
2727
{
28-
// List of sensor data for multiple sensors at subsequent timesteps.
28+
// List of sensor data for multiple sensors at subsequent time steps.
2929
//
3030
// \note OSI uses singular instead of plural for repeated field names.
3131
//

osi_detectedobject.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ message DetectedItemHeader
4242
// \f$ Timestamp - Age := \f$ 'point in time' when the object has
4343
// been observed for the first time.
4444
//
45-
// Unit: [s]
45+
// Unit: s
4646
//
4747
optional double age = 4;
4848

osi_detectedtrafficsign.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ message DetectedTrafficSign
122122
GEOMETRY_SQUARE = 5;
123123

124124
// Traffic sign that has a pole geometry. (height is bigger than
125-
// width e.g. pole indicating highways exit in xx [m]). (4 corners)
125+
// width e.g. pole indicating highways exit in xx m). (4 corners)
126126
//
127127
GEOMETRY_POLE = 6;
128128

0 commit comments

Comments
 (0)