module Gpx2Atlas::Util::WGS84
Constants
- A
Semi-axes of WGS-84 geoidal reference
- B
Public Class Methods
earth_radius(lat)
click to toggle source
# File lib/gpx2atlas/util.rb, line 23 def self.earth_radius(lat) a_n = A**2 * Math.cos(lat) b_n = B**2 * Math.sin(lat) a_d = A * Math.cos(lat) b_d = B * Math.sin(lat) Math.sqrt((a_n**2 + b_n**2) / (a_d**2 + b_d**2)) end