Class: AIXM::Component::Runway::Direction
- Includes:
- AIXM::Concerns::Association, AIXM::Concerns::Memoize, AIXM::Concerns::Remarks, AIXM::Concerns::XMLBuilder
- Defined in:
- lib/aixm/component/runway.rb
Overview
Constant Summary collapse
- VFR_PATTERNS =
{ L: :left, R: :right, E: :left_or_right }.freeze
Instance Attribute Summary collapse
-
#displaced_threshold ⇒ AIXM::D?
Displaced threshold distance from edge of runway.
-
#displaced_threshold_xy ⇒ AIXM::XY?
Displaced threshold point.
-
#geographic_bearing ⇒ AIXM::A?
(true) geographic bearing in degrees.
-
#name ⇒ Object
Partial name of runway (e.g. “12” or “16L”).
-
#touch_down_zone_z ⇒ AIXM::Z?
Elevation of the touch down zone in
qnh
. -
#vasis ⇒ AIXM::Component::VASIS?
Visual approach slope indicator system.
-
#vfr_pattern ⇒ Symbol?
Direction of the VFR flight pattern (see VFR_PATTERNS).
-
#xy ⇒ AIXM::XY
Center point at the beginning edge of the runway.
-
#z ⇒ AIXM::Z?
Elevation of the center point at the beginning edge of the runway in
qnh
.
Attributes included from AIXM::Concerns::Remarks
Instance Method Summary collapse
- #add_approach_lighting(approach_lighting) ⇒ self
- #add_lighting(lighting) ⇒ self
-
#approach_lightings ⇒ Array<AIXM::Component::ApproachLighting>
Installed approach lighting systems.
-
#initialize(name:) ⇒ Direction
constructor
See the cheat sheet for examples on how to create instances of this class.
- #inspect ⇒ String
-
#lightings ⇒ Array<AIXM::Component::Lighting>
Installed lighting systems.
-
#magnetic_bearing ⇒ AIXM::A
Magnetic bearing in degrees.
-
#runway ⇒ AIXM::Component::Runway
Runway the runway direction is further describing.
-
#threshold_xy ⇒ AIXM::XY
Displaced threshold if any or edge of runway otherwise.
Methods included from AIXM::Concerns::XMLBuilder
#build_fragment, #to_uid, #to_xml
Methods included from AIXM::Concerns::Memoize
Methods included from AIXM::Concerns::Association
Constructor Details
#initialize(name:) ⇒ Direction
See the cheat sheet for examples on how to
create instances of this class.
284 285 286 287 |
# File 'lib/aixm/component/runway.rb', line 284 def initialize(name:) self.name = name self.vasis = AIXM.vasis end |
Instance Attribute Details
#displaced_threshold ⇒ AIXM::D?
Returns displaced threshold distance from edge of runway.
270 271 272 |
# File 'lib/aixm/component/runway.rb', line 270 def displaced_threshold @displaced_threshold end |
#displaced_threshold_xy ⇒ AIXM::XY?
Returns displaced threshold point.
273 274 275 |
# File 'lib/aixm/component/runway.rb', line 273 def displaced_threshold_xy @displaced_threshold_xy end |
#geographic_bearing ⇒ AIXM::A?
Returns (true) geographic bearing in degrees.
257 258 259 |
# File 'lib/aixm/component/runway.rb', line 257 def geographic_bearing @geographic_bearing end |
#name ⇒ AIXM::A #name=(value) ⇒ Object
Partial name of runway (e.g. “12” or “16L”)
254 255 256 |
# File 'lib/aixm/component/runway.rb', line 254 def name @name end |
#touch_down_zone_z ⇒ AIXM::Z?
Returns elevation of the touch down zone in qnh
.
267 268 269 |
# File 'lib/aixm/component/runway.rb', line 267 def touch_down_zone_z @touch_down_zone_z end |
#vasis ⇒ AIXM::Component::VASIS?
Returns visual approach slope indicator system.
277 278 279 |
# File 'lib/aixm/component/runway.rb', line 277 def vasis @vasis end |
#vfr_pattern ⇒ Symbol?
Returns direction of the VFR flight pattern (see VFR_PATTERNS).
280 281 282 |
# File 'lib/aixm/component/runway.rb', line 280 def vfr_pattern @vfr_pattern end |
#xy ⇒ AIXM::XY
Returns center point at the beginning edge of the runway.
260 261 262 |
# File 'lib/aixm/component/runway.rb', line 260 def xy @xy end |
#z ⇒ AIXM::Z?
Returns elevation of the center point at the beginning edge of the runway in qnh
.
264 265 266 |
# File 'lib/aixm/component/runway.rb', line 264 def z @z end |
Instance Method Details
#add_approach_lighting(approach_lighting) ⇒ self
241 |
# File 'lib/aixm/component/runway.rb', line 241 has_many :approach_lightings, as: :approach_lightable |
#add_lighting(lighting) ⇒ self
232 |
# File 'lib/aixm/component/runway.rb', line 232 has_many :lightings, as: :lightable |
#approach_lightings ⇒ Array<AIXM::Component::ApproachLighting>
Returns installed approach lighting systems.
241 |
# File 'lib/aixm/component/runway.rb', line 241 has_many :approach_lightings, as: :approach_lightable |
#inspect ⇒ String
290 291 292 |
# File 'lib/aixm/component/runway.rb', line 290 def inspect %Q(#<#{self.class} airport=#{runway&.airport&.id.inspect} name=#{name.to_s(:runway).inspect}>) end |
#lightings ⇒ Array<AIXM::Component::Lighting>
Returns installed lighting systems.
232 |
# File 'lib/aixm/component/runway.rb', line 232 has_many :lightings, as: :lightable |
#magnetic_bearing ⇒ AIXM::A
Returns magnetic bearing in degrees.
353 354 355 356 357 |
# File 'lib/aixm/component/runway.rb', line 353 def magnetic_bearing if geographic_bearing && runway.airport.declination geographic_bearing - runway.airport.declination end end |
#runway ⇒ AIXM::Component::Runway
Returns runway the runway direction is further describing.
246 |
# File 'lib/aixm/component/runway.rb', line 246 belongs_to :runway, readonly: true |
#threshold_xy ⇒ AIXM::XY
Returns displaced threshold if any or edge of runway otherwise.
360 361 362 |
# File 'lib/aixm/component/runway.rb', line 360 def threshold_xy displaced_threshold_xy || xy end |