Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions doc/commenting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ During the building process of open simulation interface (using the `proto2cpp <

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

Reference for writing values and units: ISO 80000-1: 2009, Quantities and units – Part 1: General
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
)


Commenting with block syntax
-----------------------------
Expand All @@ -28,7 +32,7 @@ When writing comments specifying messages please use the following template:
Doxygen will interpret a comment consisting just of one single line as a brief description.
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.

.. code-block:: proto
.. code-block:: protobuf

// <If you write two or more lines of comments...>
// <... you do not need to add an empty line>
Expand Down Expand Up @@ -146,7 +150,7 @@ Then you describe the field by adding an explanation.
//
message EnvironmentalConditions
{
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
//
optional double atmospheric_pressure = 1;
}
Expand All @@ -165,9 +169,9 @@ Next you decide the unit of the field.
//
message EnvironmentalConditions
{
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
//
// Unit: [Pa]
// Unit: Pa
//
optional double atmospheric_pressure = 1;
}
Expand All @@ -186,9 +190,9 @@ You can optionally add a note to the field to describe the field better.
//
message EnvironmentalConditions
{
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
//
// Unit: [Pa]
// Unit: Pa
//
// \note 100000 Pa = 1 bar
//
Expand All @@ -209,9 +213,9 @@ If you want to provide a reference to a DIN or to web page which helps in unders
//
message EnvironmentalConditions
{
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
//
// Unit: [Pa]
// Unit: Pa
//
// \note 100000 Pa = 1 bar
//
Expand All @@ -235,9 +239,9 @@ Finally you can provide a set of rules which this field needs to be followed. Th
//
message EnvironmentalConditions
{
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 [Pa]).
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
//
// Unit: [Pa]
// Unit: Pa
//
// \note 100000 Pa = 1 bar
//
Expand Down Expand Up @@ -302,15 +306,15 @@ Commenting with doxygen references
------------------------------------
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.

.. code-block:: proto
.. code-block:: protobuf

// A reference to \c GroundTruth message.

If you want to reference a nested message, use '::' instead of '.' as separators in comments.

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

.. code-block:: proto
.. code-block:: protobuf

// A reference to a enum e.g. \c #COLOR_GREEN.

Expand Down
40 changes: 20 additions & 20 deletions osi_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ package osi3;
//
// The coordinate system is defined as right-handed.
//
// Units are [m] for positions, [m/s] for velocities and [m/s^2] for
// Units are m for positions, m/s for velocities, and m/s^2 for
// accelerations.
//
message Vector3d
{
// The x coordinate.
//
// Unit: [m] [m/s] or [m/s^2]
// Unit: m, m/s, or m/s^2
//
optional double x = 1;

// The y coordinate.
//
// Unit: [m] [m/s] or [m/s^2]
// Unit: m, m/s, or m/s^2
//
optional double y = 2;

// The z coordinate.
//
// Unit: [m] [m/s] or [m/s^2]
// Unit: m, m/s, or m/s^2
//
optional double z = 3;
}
Expand All @@ -38,20 +38,20 @@ message Vector3d
// \brief A cartesian 2D vector for positions, velocities or accelerations or
// its uncertainties.
//
// Units are [m] for positions, [m/s] for velocities and [m/s^2] for
// Units are m for positions, m/s for velocities, and m/s^2 for
// accelerations.
//
message Vector2d
{
// The x coordinate.
//
// Unit: [m] [m/s] or [m/s^2]
// Unit: m, m/s, or m/s^2
//
optional double x = 1;

// The y coordinate.
//
// Unit: [m] [m/s] or [m/s^2]
// Unit: m, m/s, or m/s^2
//
optional double y = 2;
}
Expand All @@ -70,15 +70,15 @@ message Timestamp
// The number of seconds since the start of e.g. the simulation / system /
// vehicle.
//
// Unit: [s]
// Unit: s
//
optional int64 seconds = 1;

// The number of nanoseconds since the start of the last second.
//
// Range: [0, 999.999.999]
//
// Unit: [ns]
// Unit: ns
//
optional uint32 nanos = 2;
}
Expand All @@ -98,19 +98,19 @@ message Dimension3d
{
// The length of the box.
//
// Unit: [m]
// Unit: m
//
optional double length = 1;

// The width of the box.
//
// Unit: [m]
// Unit: m
//
optional double width = 2;

// The height of the box.
//
// Unit: [m]
// Unit: m
//
optional double height = 3;
}
Expand All @@ -119,10 +119,10 @@ message Dimension3d
// \brief A 3D orientation, orientation rate or orientation acceleration (i.e.
// derivatives) or its uncertainties denoted in euler angles.
//
// Units are [rad] for orientation [rad/s] for rates and [rad/s^2] for
// Units are rad for orientation, rad/s for rates, and rad/s^2 for
// accelerations
//
// The preferred angular range is (-pi, pi]. The coordinate system is defined as
// The preferred angular range is [-pi, pi]. The coordinate system is defined as
// right-handed.
// For the sense of each rotation, the right-hand rule applies.
//
Expand Down Expand Up @@ -152,19 +152,19 @@ message Orientation3d
{
// The roll angle/rate/acceleration.
//
// Unit: [rad] [rad/s] or [rad/s^2]
// Unit: rad, rad/s, or rad/s^2
//
optional double roll = 1;

// The pitch angle/rate/acceleration.
//
// Unit: [rad] [rad/s] or [rad/s^2]
// Unit: rad, rad/s, or rad/s^2
//
optional double pitch = 2;

// The yaw angle/rate/acceleration.
//
// Unit: [rad] [rad/s] or [rad/s^2]
// Unit: rad, rad/s, or rad/s^2
//
optional double yaw = 3;
}
Expand Down Expand Up @@ -232,19 +232,19 @@ message Spherical3d
{
// The radial distance.
//
// Unit: [m]
// Unit: m
//
optional double distance = 1;

// The azimuth (horizontal) angle.
//
// Unit: [rad]
// Unit: rad
//
optional double azimuth = 2;

// The elevation (vertical) angle.
//
// Unit: [rad]
// Unit: rad
//
optional double elevation = 3;
}
Expand Down
4 changes: 2 additions & 2 deletions osi_datarecording.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package osi3;
//
message SensorDataSeries
{
// List of sensor data messages for subsequent timesteps.
// List of sensor data messages for subsequent time steps.
//
// \note OSI uses singular instead of plural for repeated field names.
//
Expand All @@ -25,7 +25,7 @@ message SensorDataSeries
//
message SensorDataSeriesList
{
// List of sensor data for multiple sensors at subsequent timesteps.
// List of sensor data for multiple sensors at subsequent time steps.
//
// \note OSI uses singular instead of plural for repeated field names.
//
Expand Down
2 changes: 1 addition & 1 deletion osi_detectedobject.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ message DetectedItemHeader
// \f$ Timestamp - Age := \f$ 'point in time' when the object has
// been observed for the first time.
//
// Unit: [s]
// Unit: s
//
optional double age = 4;

Expand Down
2 changes: 1 addition & 1 deletion osi_detectedtrafficsign.proto
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ message DetectedTrafficSign
GEOMETRY_SQUARE = 5;

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

Expand Down
Loading