Class: AIXM::Component::VerticalLimit
- Inherits:
-
AIXM::Component
- Object
- AIXM::Component
- AIXM::Component::VerticalLimit
- 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
-
#lower_z ⇒ Object
Lower limit.
-
#max_z ⇒ Object
Alternative upper limit (“whichever is higher”).
-
#min_z ⇒ Object
Alternative lower limit (“whichever is lower”).
-
#upper_z ⇒ Object
Upper limit.
Attributes inherited from AIXM::Component
Instance Method Summary collapse
-
#initialize(upper_z:, max_z: nil, lower_z:, min_z: nil) ⇒ VerticalLimit
constructor
See the cheat sheet for examples on how to create instances of this class.
- #inspect ⇒ String
-
#layer ⇒ AIXM::Component::Layer
Layer to which this vertical limit applies.
Methods included from AIXM::Concerns::Association
Methods included from AIXM::Concerns::HashEquality
Methods included from AIXM::Concerns::XMLBuilder
#build_fragment, #to_uid, #to_xml
Methods included from AIXM::Concerns::Memoize
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_z ⇒ AIXM::Z #lower_z=(value) ⇒ Object
Lower limit
55 56 57 |
# File 'lib/aixm/component/vertical_limit.rb', line 55 def lower_z @lower_z end |
#max_z ⇒ AIXM::Z? #max_z=(value) ⇒ Object
Alternative upper limit (“whichever is higher”)
63 64 65 |
# File 'lib/aixm/component/vertical_limit.rb', line 63 def max_z @max_z end |
Instance Method Details
#inspect ⇒ 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 |
#layer ⇒ AIXM::Component::Layer
Returns layer to which this vertical limit applies.
39 |
# File 'lib/aixm/component/vertical_limit.rb', line 39 belongs_to :layer |