Class: Ellipsoid
- Inherits:
-
Object
- Object
- Ellipsoid
- Defined in:
- lib/grid_ref.rb
Overview
adapted from Geography::NationalGrid by and © P Kent with reference to the Ordnance Survey guide to coordinate systems in the UK www.ordnancesurvey.co.uk/oswebsite/gps/information/coordinatesystemsinfo/guidecontents/
Instance Attribute Summary collapse
-
#a ⇒ Object
Returns the value of attribute a.
-
#b ⇒ Object
Returns the value of attribute b.
-
#e2 ⇒ Object
Returns the value of attribute e2.
Instance Method Summary collapse
- #ecc ⇒ Object
-
#initialize(a, b) ⇒ Ellipsoid
constructor
A new instance of Ellipsoid.
Constructor Details
#initialize(a, b) ⇒ Ellipsoid
Returns a new instance of Ellipsoid.
8 9 10 11 |
# File 'lib/grid_ref.rb', line 8 def initialize(a,b) @a = a @b = b end |
Instance Attribute Details
#a ⇒ Object
Returns the value of attribute a.
6 7 8 |
# File 'lib/grid_ref.rb', line 6 def a @a end |
#b ⇒ Object
Returns the value of attribute b.
6 7 8 |
# File 'lib/grid_ref.rb', line 6 def b @b end |
#e2 ⇒ Object
Returns the value of attribute e2.
6 7 8 |
# File 'lib/grid_ref.rb', line 6 def e2 @e2 end |
Instance Method Details
#ecc ⇒ Object
13 14 15 |
# File 'lib/grid_ref.rb', line 13 def ecc (a**2 - b**2)/(a**2) end |