Class: AIXM::Component::VerticalLimit

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

Overview

Vertical limit defines a 3D airspace vertically. It is often noted in AIP as follows:

upper_z
(max_z)   whichever is higher
-------
lower_z
(min_z)   whichever is lower

Cheat Sheet in Pseudo Code:

vertical_limit = AIXM.vertical_limit(
  upper_z: AIXM.z
  max_z: AIXM.z or nil
  lower_z: AIXM.z
  min_z: AIXM.z or nil
)

Shortcuts:

  • AIXM::GROUND - surface expressed as “0 ft QFE”

  • AIXM::UNLIMITED - no upper limit expressed as “FL 999”

Constant Summary collapse

TAGS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{ upper_z: :Upper, lower_z: :Lower, max_z: :Max, min_z: :Mnm }.freeze
CODES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{ qfe: :HEI, qnh: :ALT, qne: :STD }.freeze

Instance Attribute Summary collapse

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(upper_z:, max_z: nil, lower_z:, min_z: nil) ⇒ VerticalLimit

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



75
76
77
# File 'lib/aixm/component/vertical_limit.rb', line 75

def initialize(upper_z:, max_z: nil, lower_z:, min_z: nil)
  self.upper_z, self.max_z, self.lower_z, self.min_z = upper_z, max_z, lower_z, min_z
end

Instance Attribute Details

#lower_zAIXM::Z #lower_z=(value) ⇒ Object

Lower limit

Overloads:



55
56
57
# File 'lib/aixm/component/vertical_limit.rb', line 55

def lower_z
  @lower_z
end

#max_zAIXM::Z? #max_z=(value) ⇒ Object

Alternative upper limit (“whichever is higher”)

Overloads:



63
64
65
# File 'lib/aixm/component/vertical_limit.rb', line 63

def max_z
  @max_z
end

#min_zAIXM::Z? #min_z=(value) ⇒ Object

Alternative lower limit (“whichever is lower”)

Overloads:



71
72
73
# File 'lib/aixm/component/vertical_limit.rb', line 71

def min_z
  @min_z
end

#upper_zAIXM::Z #upper_z=(value) ⇒ Object

Upper limit

Overloads:



47
48
49
# File 'lib/aixm/component/vertical_limit.rb', line 47

def upper_z
  @upper_z
end

Instance Method Details

#inspectString

Returns:

  • (String)


80
81
82
83
# File 'lib/aixm/component/vertical_limit.rb', line 80

def inspect
  payload = %i(upper_z max_z lower_z min_z).map { %Q(#{_1}="#{send(_1)}") if send(_1) }.compact
  %Q(#<#{self.class} #{payload.join(' '.freeze)}>)
end

#layerAIXM::Component::Layer

Returns layer to which this vertical limit applies.

Returns:



39
# File 'lib/aixm/component/vertical_limit.rb', line 39

belongs_to :layer