Class: AIXM::Component::Runway

Inherits:
AIXM::Component show all
Includes:
AIXM::Concerns::Association, AIXM::Concerns::Marking, AIXM::Concerns::Remarks
Defined in:
lib/aixm/component/runway.rb

Overview

Runways are landing and takeoff strips for forward propelled aircraft.

By convention, the runway name is usually the composition of the runway forth name (smaller number) and the runway back name (bigger number) joined with a forward slash e.g. “12/30” or “16R/34L”.

A runway has one or to directions accessible as runway.forth (mandatory) and runway.back (optional). Both have identical properties.

Cheat Sheet in Pseudo Code:

runway = AIXM.runway(
  name: String
)
runway.dimensions = AIXM.r or nil
runway.surface = AIXM.surface
runway.marking = String or nil
runway.status = STATUSES or nil
runway.remarks = String or nil
runway.forth.name = AIXM.a   # preset based on the runway name
runway.forth.geographic_bearing = AIXM.a or nil
runway.forth.xy = AIXM.xy
runway.forth.z = AIXM.z or nil   # highest point of the TDZ
runway.forth.displaced_threshold = AIXM.xy or AIXM.d or nil
runway.forth.vasis = AIXM.vasis or nil (default: unspecified VASIS)
runway.forth.add_lighting = AIXM.lighting
runway.forth.add_approach_lighting = AIXM.approach_lighting
runway.forth.vfr_pattern = VFR_PATTERNS or nil
runway.forth.remarks = String or nil

Examples:

Bidirectional runway

runway = AIXM.runway(name: '16L/34R')
runway.name   # => '16L/34R'
runway.forth.name.to_s = '16L'
runway.forth.geographic_bearing = 165
runway.back.name.to_s = '34R'
runway.back.geographic_bearing = 345

Unidirectional runway:

runway = AIXM.runway(name: '16L')
runway.name   # => '16L'
runway.forth.name.to_s = '16L'
runway.forth.geographic_bearing = 165
runway.back = nil

See Also:

Defined Under Namespace

Classes: Direction

Constant Summary collapse

STATUSES =
{
  CLSD: :closed,
  WIP: :work_in_progress,          # e.g. construction work
  PARKED: :parked_aircraft,        # parked or disabled aircraft on helipad
  FAILAID: :visual_aids_failure,   # failure or irregular operation of visual aids
  SPOWER: :secondary_power,        # secondary power supply in operation
  OTHER: :other                    # specify in remarks
}.freeze

Instance Attribute Summary collapse

Attributes included from AIXM::Concerns::Remarks

#remarks

Attributes included from AIXM::Concerns::Marking

#marking

Attributes inherited from AIXM::Component

#meta

Instance Method Summary collapse

Methods included from AIXM::Concerns::Association

included

Methods included from AIXM::Concerns::HashEquality

#eql?, #hash

Methods included from AIXM::Concerns::XMLBuilder

#build_fragment, #to_uid, #to_xml

Methods included from AIXM::Concerns::Memoize

included, method

Constructor Details

#initialize(name:) ⇒ Runway

See the cheat sheet for examples on how to create instances of this class.


117
118
119
120
121
122
123
124
125
# File 'lib/aixm/component/runway.rb', line 117

def initialize(name:)
  self.name = name
  @name.split("/").tap do |forth_name, back_name|
    self.forth = Direction.new(name: AIXM.a(forth_name))
    self.back = Direction.new(name: AIXM.a(back_name)) if back_name
    fail(ArgumentError, "invalid name") unless !back || back.name.inverse_of?(@forth.name)
  end
  self.surface = AIXM.surface
end

Instance Attribute Details

#dimensionsAIXM::R? #dimensions=(value) ⇒ Object

Dimensions

Overloads:


104
105
106
# File 'lib/aixm/component/runway.rb', line 104

def dimensions
  @dimensions
end

#nameString #name=(value) ⇒ Object

Full name of runway (e.g. “12/30” or “16L/34R”)

Overloads:

  • #nameString

    Returns:

    • (String)
  • #name=(value) ⇒ Object

    Parameters:

    • value (String)

96
97
98
# File 'lib/aixm/component/runway.rb', line 96

def name
  @name
end

#statusSymbol? #status=(value) ⇒ Object

Status of the runway

Overloads:

  • #statusSymbol?

    Returns any of STATUSES or nil for normal operation.

    Returns:

    • (Symbol, nil)

      any of STATUSES or nil for normal operation

  • #status=(value) ⇒ Object

    Parameters:

    • value (Symbol, nil)

      any of STATUSES or nil for normal operation


113
114
115
# File 'lib/aixm/component/runway.rb', line 113

def status
  @status
end

Instance Method Details

#airportAIXM::Feature::Airport

Returns airport the runway belongs to.

Returns:


88
# File 'lib/aixm/component/runway.rb', line 88

belongs_to :airport

#backAIXM::Component::Runway::Direction?

Returns reverse direction.

Returns:


77
# File 'lib/aixm/component/runway.rb', line 77

has_one :back, accept: 'AIXM::Component::Runway::Direction', allow_nil: true

#back=(back) ⇒ Object

Parameters:


77
# File 'lib/aixm/component/runway.rb', line 77

has_one :back, accept: 'AIXM::Component::Runway::Direction', allow_nil: true

#forthAIXM::Component::Runway::Direction

Returns main direction.

Returns:


70
# File 'lib/aixm/component/runway.rb', line 70

has_one :forth, accept: 'AIXM::Component::Runway::Direction'

#forth=(forth) ⇒ Object


70
# File 'lib/aixm/component/runway.rb', line 70

has_one :forth, accept: 'AIXM::Component::Runway::Direction'

#inspectString

Returns:

  • (String)

128
129
130
# File 'lib/aixm/component/runway.rb', line 128

def inspect
  %Q(#<#{self.class} airport=#{airport&.id.inspect} name=#{name.inspect}>)
end

#surfaceAIXM::Component::Surface

Returns surface of the runway.

Returns:


84
# File 'lib/aixm/component/runway.rb', line 84

has_one :surface, accept: 'AIXM::Component::Surface'

#surface=(surface) ⇒ Object

Parameters:


84
# File 'lib/aixm/component/runway.rb', line 84

has_one :surface, accept: 'AIXM::Component::Surface'