Class: AIXM::Component::Helipad

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

Overview

Helipads are TLOF (touch-down and lift-off areas) for vertical take-off aircraft such as helicopters.

Cheat Sheet in Pseudo Code:

helipad = AIXM.helipad(
  name: String
  xy: AIXM.xy
)
helipad.geographic_bearing = AIXM.a or nil (OFMX only)
helipad.z = AIXM.z or nil
helipad.dimensions = AIXM.r or nil
helipad.surface = AIXM.surface
helipad.marking = String or nil
helipad.add_lighting = AIXM.lighting
helipad.fato = AIXM.fato or nil
helipad.performance_class = PERFORMANCE_CLASSES or nil
helipad.status = STATUSES or nil
helipad.remarks = String or nil

Constant Summary collapse

PERFORMANCE_CLASSES =
{
  '1': :'1',
  '2': :'2',
  '3': :'3',
  OTHER: :other   # specify in remarks
}.freeze
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:, xy:) ⇒ Helipad

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



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

def initialize(name:, xy:)
  self.name, self.xy = name, xy
  self.surface = AIXM.surface
end

Instance Attribute Details

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

Dimensions

Overloads:



106
107
108
# File 'lib/aixm/component/helipad.rb', line 106

def dimensions
  @dimensions
end

#geographic_bearingAIXM::A?

Returns (true) geographic bearing of H-marking in degrees.

Returns:

  • (AIXM::A, nil)

    (true) geographic bearing of H-marking in degrees



82
83
84
# File 'lib/aixm/component/helipad.rb', line 82

def geographic_bearing
  @geographic_bearing
end

#nameString #name=(value) ⇒ Object

Full name (e.g. “H1”)

Overloads:

  • #nameString

    Returns:

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

    Parameters:

    • value (String)


79
80
81
# File 'lib/aixm/component/helipad.rb', line 79

def name
  @name
end

#performance_classInteger, ... #performance_class=(value) ⇒ Object

Suitable performance class

Overloads:

  • #performance_classInteger, ...

    Returns:

    • (Integer, Symbol, nil)
  • #performance_class=(value) ⇒ Object

    Parameters:

    • value (Integer, Symbol, nil)


114
115
116
# File 'lib/aixm/component/helipad.rb', line 114

def performance_class
  @performance_class
end

#statusSymbol? #status=(value) ⇒ Object

Status of the helipad

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



123
124
125
# File 'lib/aixm/component/helipad.rb', line 123

def status
  @status
end

#center_xyAIXM::XY #center_xy=(value) ⇒ Object

Center point

Overloads:



90
91
92
# File 'lib/aixm/component/helipad.rb', line 90

def xy
  @xy
end

#zAIXM::Z? #z=(value) ⇒ Object

Elevation in :qnh

Overloads:



98
99
100
# File 'lib/aixm/component/helipad.rb', line 98

def z
  @z
end

Instance Method Details

#add_lighting(lighting) ⇒ self

Parameters:

Returns:

  • (self)


67
# File 'lib/aixm/component/helipad.rb', line 67

has_many :lightings, as: :lightable

#airportAIXM::Feature::Airport

Returns airport this helipad belongs to.

Returns:



71
# File 'lib/aixm/component/helipad.rb', line 71

belongs_to :airport

#fatoAIXM::Component::FATO?

Returns FATO the helipad is situated on.

Returns:



52
# File 'lib/aixm/component/helipad.rb', line 52

has_one :fato, allow_nil: true

#fato=(fato) ⇒ Object

Parameters:



52
# File 'lib/aixm/component/helipad.rb', line 52

has_one :fato, allow_nil: true

#inspectString

Returns:

  • (String)


133
134
135
# File 'lib/aixm/component/helipad.rb', line 133

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

#lightingsArray<AIXM::Component::Lighting>

Returns installed lighting systems.

Returns:



67
# File 'lib/aixm/component/helipad.rb', line 67

has_many :lightings, as: :lightable

#surfaceAIXM::Component::Surface

Returns surface of the helipad.

Returns:



59
# File 'lib/aixm/component/helipad.rb', line 59

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

#surface=(surface) ⇒ Object

Parameters:



59
# File 'lib/aixm/component/helipad.rb', line 59

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