Skip to content

Commit da5f946

Browse files
Markus Waldmannpmai
authored andcommitted
Rework wind, cloud, and sun definitions in environment
- Move cloud state enums into CloudState message The enum has been changed to CloudStateLevel and moved into a more open meaning message of CloudState. This can easily be expanded in the future with more detailed information. - Generalize definition text of the wind The message within the description was too specific, if in the future updates will probably have more than only the wind speed and direction in it. - Definition text changed Sun and Wind The definition within the Sun and Wind messages were indicating that data must originate from an OpenSCENARIO file. - Definition text rules and unit Sun changed The definition within the Sun message was not divided into units, rules and description - Fixes to field numbering, nesting, etc. to align with interface rules Signed-off-by: Markus Waldmann <Markus.Waldmann@stud.hs-kempten.de>
1 parent 1a9f422 commit da5f946

File tree

1 file changed

+132
-100
lines changed

1 file changed

+132
-100
lines changed

osi_environment.proto

Lines changed: 132 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,6 @@ message EnvironmentalConditions
2222
// The time of day at the host vehicles location.
2323
//
2424
optional TimeOfDay time_of_day = 2;
25-
26-
// The Unix epoch (or Unix time or POSIX time or Unix timestamp) is
27-
// the number of seconds that have elapsed since January 1, 1970
28-
// (midnight UTC/GMT [1]), not counting leap seconds [2].
29-
// Historically, the origin of UNIX system time was referred to as
30-
// "00:00:00 GMT, January 1, 1970" [2]. Literally speaking the epoch
31-
// is Unix time 0 (midnight 1/1/1970), but 'epoch' is often used as
32-
// a synonym for 'Unix time'. Many Unix systems store epoch dates as
33-
// a signed 32-bit integer, which might cause problems on January 19,
34-
// 2038 (known as the Year 2038 problem or Y2038).
35-
//
36-
// \note You can convert the timestamp using the following [routines
37-
// sorted by languages](https://www.epochconverter.com/#code).
38-
//
39-
// \par References:
40-
// [1] ITU Radiocommunication Assembly. (2002). <em>Recommondation ITU-R TF.460-6 Standard-frequency and time-signal emissions</em>. (Rec. ITU-R TF.460-6). Retrieved January 25, 2020, from http://www.itu.int/dms_pubrec/itu-r/rec/tf/R-REC-TF.460-6-200202-I!!PDF-E.pdf \n
41-
// [2] The Open Group. (2018). <em>POSIX.1-2017</em> The Open Group Base Specifications Issue 7, 2018 edition. IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008). Retrieved January 25, 2020, from https://pubs.opengroup.org/onlinepubs/9699919799/xrat/contents.html
42-
//
43-
optional int64 unix_timestamp = 8;
4425

4526
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325
4627
// Pa).
@@ -87,6 +68,25 @@ message EnvironmentalConditions
8768
// Description of the fog.
8869
//
8970
optional Fog fog = 7;
71+
72+
// The Unix epoch (or Unix time or POSIX time or Unix timestamp) is
73+
// the number of seconds that have elapsed since January 1, 1970
74+
// (midnight UTC/GMT [1]), not counting leap seconds [2].
75+
// Historically, the origin of UNIX system time was referred to as
76+
// "00:00:00 GMT, January 1, 1970" [2]. Literally speaking the epoch
77+
// is Unix time 0 (midnight 1/1/1970), but 'epoch' is often used as
78+
// a synonym for 'Unix time'. Many Unix systems store epoch dates as
79+
// a signed 32-bit integer, which might cause problems on January 19,
80+
// 2038 (known as the Year 2038 problem or Y2038).
81+
//
82+
// \note You can convert the timestamp using the following [routines
83+
// sorted by languages](https://www.epochconverter.com/#code).
84+
//
85+
// \par References:
86+
// [1] ITU Radiocommunication Assembly. (2002). <em>Recommondation ITU-R TF.460-6 Standard-frequency and time-signal emissions</em>. (Rec. ITU-R TF.460-6). Retrieved January 25, 2020, from http://www.itu.int/dms_pubrec/itu-r/rec/tf/R-REC-TF.460-6-200202-I!!PDF-E.pdf \n
87+
// [2] The Open Group. (2018). <em>POSIX.1-2017</em> The Open Group Base Specifications Issue 7, 2018 edition. IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008). Retrieved January 25, 2020, from https://pubs.opengroup.org/onlinepubs/9699919799/xrat/contents.html
88+
//
89+
optional int64 unix_timestamp = 8;
9090

9191
// Optional external reference to the environmental condition sources.
9292
//
@@ -101,13 +101,13 @@ message EnvironmentalConditions
101101
//
102102
repeated ExternalReference source_reference = 9;
103103

104-
// Definition of the wind speed and direction.
104+
// Definition of clouds.
105105
//
106-
optional Wind wind = 11;
106+
optional Clouds clouds = 10;
107107

108-
// Definition of cloud states and the skybox.
108+
// Definition of the wind properties
109109
//
110-
optional CloudState cloud_state = 10;
110+
optional Wind wind = 11;
111111

112112
// Definition of the Sun.
113113
//
@@ -337,10 +337,96 @@ message EnvironmentalConditions
337337
optional uint32 seconds_since_midnight = 1;
338338
}
339339

340+
//
341+
// \brief Specification of the cloud states
342+
//
343+
// \note within this message there is the cloud state level
344+
//
345+
message Clouds
346+
{
347+
// Definition of the cloud state level, i.e. cloud state and sky visualization settings.
348+
//
349+
optional CloudStateLevel cloud_state_level = 1;
350+
351+
// Defines the cloud state levels given by observation of total cloud amount in oktas.
352+
//
353+
// The total degree of coverage indicates how large the part of the sky vault is which is covered
354+
// with clouds altogether. It is given in eighths, because this division is easier to estimate
355+
// for the observer. 0 eighths means that there are no traces of clouds in the sky,
356+
// 4 eighths means that the sky is covered with clouds up to half, 8 eighths means that the sky is
357+
// completely covered with clouds and no sky blue can be recognized.
358+
//
359+
// For cloud determination, the observer will choose a location from which he can overlook the entire sky.
360+
// When determining the total cloud cover, all clouds or parts of clouds, regardless of height and genus,
361+
// that are above his location will be added. Aircraft contrails are also counted as cloud cover if they remain
362+
// in the sky for more than 15 minutes. On the other hand, fog is not counted as cloud cover.
363+
//
364+
// With a little practice, the observer can easily determine the total amount of cloud cover.
365+
// Problems occur only with scattered clouds or many single clouds (cumulus).
366+
// Their cloud cover is often overestimated. On the other hand,
367+
// the coverage of thin ice clouds (cirrus) is often underestimated.[3]
368+
//
369+
// \par References:
370+
// [1] ISO 15469:2004(E) / CIE S 011/E:2003 : Spatial distribution of skylight
371+
// [2] https://en.wikipedia.org/wiki/Cloud_cover
372+
// [3] https://www.dwd.de/DE/service/lexikon/Functions/glossar.html?lv2=100932&lv3=101016
373+
//
374+
enum CloudStateLevel
375+
{
376+
// Cloud State is unknown (must not be used in ground truth).
377+
//
378+
CLOUD_STATE_LEVEL_UNKNOWN = 0;
379+
380+
// Other (unspecified but known) CloudState.
381+
//
382+
CLOUD_STATE_LEVEL_OTHER = 1;
383+
384+
// Cloudless (0/8)
385+
//
386+
CLOUD_STATE_LEVEL_CLOUDLESS = 2;
387+
388+
// Sunny (1/8)
389+
//
390+
CLOUD_STATE_LEVEL_SUNNY = 3;
391+
392+
// Serene (2/8))
393+
//
394+
CLOUD_STATE_LEVEL_SERENE = 4;
395+
396+
// Slightly Cloudy (3/8)
397+
//
398+
CLOUD_STATE_LEVEL_SLIGHTLY_CLOUDY = 5;
399+
400+
// Light Cloudy (4/8)
401+
//
402+
CLOUD_STATE_LEVEL_LIGHT_CLOUDY = 6;
403+
404+
// Cloudy (5/8)
405+
//
406+
CLOUD_STATE_LEVEL_CLOUDY = 7;
407+
408+
// Heavy Cloudy (6/8)
409+
//
410+
CLOUD_STATE_LEVEL_HEAVY_CLOUDY = 8;
411+
412+
// Almost Covered (7/8)
413+
//
414+
CLOUD_STATE_LEVEL_ALMOST_COVERED = 9;
415+
416+
// Covered (8/8)
417+
//
418+
CLOUD_STATE_LEVEL_COVERED = 10;
419+
420+
// No Sky
421+
//
422+
CLOUD_STATE_LEVEL_NO_SKY = 11;
423+
}
424+
}
425+
340426
//
341427
// \brief Defines wind properties.
342428
//
343-
// \note Describes the wind speed and direction from ASAM OpenSCENARIO
429+
// \note Aligns with the wind speed and direction as defined in ASAM OpenSCENARIO
344430
//
345431
message Wind
346432
{
@@ -355,96 +441,42 @@ message EnvironmentalConditions
355441
optional double speed = 2;
356442
}
357443

358-
// Definition of the cloud state, i.e. cloud state and sky visualization settings.
359-
//
360-
// The total degree of coverage indicates how large the part of the sky vault is which is covered
361-
// with clouds altogether. It is given in eighths, because this division is easier to estimate
362-
// for the observer. 0 eighths means that there are no traces of clouds in the sky,
363-
// 4 eighths means that the sky is covered with clouds up to half, 8 eighths means that the sky is
364-
// completely covered with clouds and no sky blue can be recognized.
365-
//
366-
// For cloud determination, the observer will choose a location from which he can overlook the entire sky.
367-
// When determining the total cloud cover, all clouds or parts of clouds, regardless of height and genus,
368-
// that are above his location will be added. Aircraft contrails are also counted as cloud cover if they remain
369-
// in the sky for more than 15 minutes. On the other hand, fog is not counted as cloud cover.
370444
//
371-
// With a little practice, the observer can easily determine the total amount of cloud cover.
372-
// Problems occur only with scattered clouds or many single clouds (cumulus).
373-
// Their cloud cover is often overestimated. On the other hand,
374-
// the coverage of thin ice clouds (cirrus) is often underestimated.[3]
445+
// \brief Specification of sun properties.
375446
//
376-
// \par References:
377-
// [1] ISO 15469:2004(E) / CIE S 011/E:2003 : Spatial distribution of skylight
378-
// [2] https://de.wikipedia.org/wiki/Bewölkung
379-
// [3] https://www.dwd.de/DE/service/lexikon/Functions/glossar.html?lv2=100932&lv3=101016
447+
// \note Aligns with the specification of sun properties according to ASAM OpenSCENARIO
380448
//
381-
enum CloudState
449+
message Sun
382450
{
383-
// Cloud State is unknown (must not be used in ground truth).
451+
// Azimuth of the sun, counted counterclockwise
384452
//
385-
CLOUD_STATE_UNKNOWN = 0;
386-
387-
// Other (unspecified but known) CloudState.
388-
//
389-
CLOUD_STATE_OTHER = 1;
390-
391-
// Cloudless (0/8)
392-
//
393-
CLOUD_STATE_CLOUDLESS = 2;
394-
395-
// Sunny (1/8)
453+
// Unit: rad
396454
//
397-
CLOUD_STATE_SUNNY = 3;
398-
399-
// Serene (2/8))
400-
//
401-
CLOUD_STATE_SERENE = 4;
402-
403-
// Slightly Cloudy (3/8)
404-
//
405-
CLOUD_STATE_SLIGHTLY_CLOUDY = 5;
406-
407-
// Light Cloudy (4/8)
408-
//
409-
CLOUD_STATE_LIGHT_CLOUDY = 6;
410-
411-
// Cloudy (5/8)
412-
//
413-
CLOUD_STATE_CLOUDY = 7;
414-
415-
// Heavy Cloudy (6/8)
455+
// \rules
456+
// is_greater_than_or_equal_to: -PI
457+
// is_less_than_or_equal_to: 2PI
458+
// \endrules
416459
//
417-
CLOUD_STATE_HEAVY_CLOUDY = 8;
460+
optional double azimuth = 1;
418461

419-
// Almost Covered (7/8)
462+
// Solar elevation angle
420463
//
421-
CLOUD_STATE_ALMOST_COVERED = 9;
422-
423-
// Covered (8/8)
464+
// Unit: rad
424465
//
425-
CLOUD_STATE_COVERED = 10;
426-
427-
// No Sky
466+
// \rules
467+
// is_greater_than_or_equal_to: -PI
468+
// is_less_than_or_equal_to: PI
469+
// \endrules
428470
//
429-
CLOUD_STATE_NO_SKY = 11;
430-
}
471+
optional double elevation = 2;
431472

432-
//
433-
// \brief Specification of sun properties.
434-
//
435-
// \note Defines the specification of sun properties according to ASAM OpenSCENARIO
436-
//
437-
message Sun
438-
{
439-
// Azimuth of the sun, counted counterclockwise, 0=north, PI/2 = east, PI=south, 3/2 PI=west. Unit: radian; Range: [0..2PI].
473+
// Illuminance of the sun, direct sunlight is around 100,00 lx.
440474
//
441-
optional double azimuth = 1;
442-
443-
// Solar elevation angle, 0=x/y plane, PI/2=zenith. Unit: rad; Range: [-PI..PI].
475+
// Unit: lx
444476
//
445-
optional double elevation = 2;
446-
447-
// Illuminance of the sun, direct sunlight is around 100,00 lx. Unit: lux; Range: [0..inf[.
477+
// \rules
478+
// is_greater_than_or_equal_to: 0
479+
// \endrules
448480
//
449481
optional double intensity = 3;
450482
}

0 commit comments

Comments
 (0)