Class: AIXM::Component::Surface

Inherits:
AIXM::Component show all
Includes:
AIXM::Concerns::Remarks
Defined in:
lib/aixm/component/surface.rb

Overview

Surface of a runway, helipad etc

Cheat Sheet in Pseudo Code:

surface = AIXM.surface
surface.composition: COMPOSITIONS or nil
surface.preparation: PREPARATIONS or nil
surface.condition: CONDITIONS or nil
surface.pcn = String or nil
surface.siwl_weight = AIXM.w
surface.siwl_tire_pressure = AIXM.p
surface.auw_weight = AIXM.w
surface.remarks = String or nil

Constants:

  • AIXM::PCN_RE - regular expression to match PCN notations

Constant Summary collapse

COMPOSITIONS =
{
  ASPH: :asphalt,
  BITUM: :bitumen,        # dug up, bound and rolled ground
  CONC: :concrete,
  'CONC+ASPH': :concrete_and_asphalt,
  'CONC+GRS': :concrete_and_grass,
  GRADE: :graded_earth,   # graded or rolled earth possibly with some grass
  GRASS: :grass,          # lawn
  GRAVE: :gravel,         # small and midsize rounded stones
  MACADAM: :macadam,      # small rounded stones
  METAL: :metal,
  SAND: :sand,
  SNOW: :snow,
  WATER: :water,
  OTHER: :other           # specify in remarks
}.freeze
PREPARATIONS =
{
  AFSC: :aggregate_friction_seal_coat,
  GROOVED: :grooved,      # cut or plastic grooved
  NATURAL: :natural,      # no treatment
  OILED: :oiled,
  PAVED: :paved,
  PFC: :porous_friction_course,
  RFSC: :rubberized_friction_seal_coat,
  ROLLED: :rolled,
  OTHER: :other
}.freeze
CONDITIONS =
{
  GOOD: :good,
  FAIR: :fair,
  POOR: :poor,
  OTHER: :other
}.freeze

Instance Attribute Summary collapse

Attributes included from AIXM::Concerns::Remarks

#remarks

Attributes inherited from AIXM::Component

#meta

Instance Method Summary collapse

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

#initializeSurface

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



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

def initialize
  @pcn = {}
end

Instance Attribute Details

#auw_weightAIXM::W? #auw_weight=(value) ⇒ Object

All-up wheel weight

Overloads:



110
111
112
# File 'lib/aixm/component/surface.rb', line 110

def auw_weight
  @auw_weight
end

#compositionSymbol? #composition=(value) ⇒ Object

Composition of the surface.

Overloads:



70
71
72
# File 'lib/aixm/component/surface.rb', line 70

def composition
  @composition
end

#conditionSymbol? #condition=(value) ⇒ Object

Condition of the surface.

Overloads:

  • #conditionSymbol?

    Returns any of CONDITIONS.

    Returns:

  • #condition=(value) ⇒ Object

    Parameters:



86
87
88
# File 'lib/aixm/component/surface.rb', line 86

def condition
  @condition
end

#pcnString? #pcn=(value) ⇒ Object

Pavement classification number (e.g. “59/F/A/W/T”)

Overloads:

  • #pcnString?

    Returns:

    • (String, nil)
  • #pcn=(value) ⇒ Object

    Parameters:

    • value (String, nil)


142
143
144
# File 'lib/aixm/component/surface.rb', line 142

def pcn
  @pcn.none? ? nil : @pcn.values.join("/".freeze)
end

#preparationSymbol? #preparation=(value) ⇒ Object

Preparation of the surface.

Overloads:



78
79
80
# File 'lib/aixm/component/surface.rb', line 78

def preparation
  @preparation
end

#siwl_tire_pressureAIXM::P? #siwl_tire_pressure=(value) ⇒ Object

Single isolated wheel load tire pressure

Overloads:



102
103
104
# File 'lib/aixm/component/surface.rb', line 102

def siwl_tire_pressure
  @siwl_tire_pressure
end

#siwl_weightAIXM::W? #siwl_weight=(value) ⇒ Object

Single isolated wheel load weight

Overloads:



94
95
96
# File 'lib/aixm/component/surface.rb', line 94

def siwl_weight
  @siwl_weight
end

Instance Method Details

#inspectString

Returns:

  • (String)


119
120
121
# File 'lib/aixm/component/surface.rb', line 119

def inspect
  %Q(#<#{self.class} composition=#{composition.inspect} preparation=#{preparation.inspect} condition=#{condition.inspect} pcn=#{pcn.inspect}>)
end