Module: Maiden

Defined in:
lib/maiden.rb,
lib/maiden/version.rb

Defined Under Namespace

Classes: Error, Maidenhead

Constant Summary collapse

VERSION =
"0.1.1"
@@GRID_SIZE =
4

Class Method Summary collapse

Class Method Details

.precision=(p) ⇒ Object

gridsquare size



12
13
14
# File 'lib/maiden.rb', line 12

def self.precision= p
  @@GRID_SIZE = p.to_i
end

.to_gps(g) ⇒ Object



139
140
141
# File 'lib/maiden.rb', line 139

def self.to_gps g
  Maidenhead.to_latlon(g)
end

.to_grid(lat, lon) ⇒ Object



136
137
138
# File 'lib/maiden.rb', line 136

def self.to_grid lat,lon
  Maidenhead.to_maidenhead(lat,lon,@@GRID_SIZE)
end