scenario_simulator_v2 C++ API
sun.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef OPENSCENARIO_INTERPRETER__SYNTAX__SUN_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__SUN_HPP_
17 
20 #include <pugixml.hpp>
21 
23 {
24 inline namespace syntax
25 {
26 /*
27  Sun (OpenSCENARIO XML 1.3.1)
28 
29  Specification of sun properties.
30 
31  <xsd:complexType name="Sun">
32  <xsd:attribute name="azimuth" type="Double" use="required"/>
33  <xsd:attribute name="elevation" type="Double" use="required"/>
34  <xsd:attribute name="intensity" type="Double">
35  <xsd:annotation>
36  <xsd:appinfo>
37  deprecated
38  </xsd:appinfo>
39  </xsd:annotation>
40  </xsd:attribute>
41  <xsd:attribute name="illuminance" type="Double"/>
42  </xsd:complexType>
43 */
44 struct Sun
45 {
46  const Double azimuth; // Azimuth of the sun, counted clockwise, 0=north, PI/2 = east, PI=south,
47  // 3/2 PI=west. Unit: [rad]. Range: [0..2*PI].
48 
49  const Double
50  elevation; // Solar elevation angle, 0=x/y plane, PI/2=zenith. Unit: [rad]. Range: [-PI..PI].
51 
52  const Double illuminance; // Illuminance of the sun, direct sunlight is around 100,000 lx. Unit:
53  // [lx]. Range: [0..inf[. Default if missing: 0.
54 
55  const Double intensity; // DEPRECATED: Illuminance of the sun, direct sunlight is around 100,000
56  // lx. Unit: [lx]. Range: [0..inf[.
57 
58  Sun() = default;
59 
60  explicit Sun(const pugi::xml_node &, Scope &);
61 };
62 
63 } // namespace syntax
64 } // namespace openscenario_interpreter
65 
66 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__SUN_HPP_
Definition: scope.hpp:158
Definition: hypot.hpp:22
Definition: sun.hpp:45
const Double azimuth
Definition: sun.hpp:46
const Double intensity
Definition: sun.hpp:55
const Double elevation
Definition: sun.hpp:50
const Double illuminance
Definition: sun.hpp:52