Module: Silva::System::CoOrdinate
Overview
Provides simple validations and accessors for a lat, long, alt co-ordinate system.
Constant Summary collapse
- LAT_RANGE =
Allowed range of latitude
(-90..90)
- LONG_RANGE =
Allowed range of longitude
(-180..180)
- ALT_RANGE =
Allowed range of altitude
(-500..4000)
- DEFAULT_PARAMS =
Default altitude = 0
{ :alt => 0 }
- REQUIRED_PARAMS =
[:lat, :long]
Instance Attribute Summary collapse
-
#alt ⇒ Object
readonly
Returns the value of attribute alt.
-
#lat ⇒ Object
readonly
Returns the value of attribute lat.
-
#long ⇒ Object
readonly
Returns the value of attribute long.
Instance Method Summary collapse
Instance Attribute Details
#alt ⇒ Object (readonly)
Returns the value of attribute alt.
18 19 20 |
# File 'lib/silva/system/co_ordinate.rb', line 18 def alt @alt end |
#lat ⇒ Object (readonly)
Returns the value of attribute lat.
18 19 20 |
# File 'lib/silva/system/co_ordinate.rb', line 18 def lat @lat end |
#long ⇒ Object (readonly)
Returns the value of attribute long.
18 19 20 |
# File 'lib/silva/system/co_ordinate.rb', line 18 def long @long end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/silva/system/co_ordinate.rb', line 20 def to_s [lat, long, alt].to_s end |