# File lib/jpmobile/datum_conv.rb, line 15 def self.blh2xyz(b_deg,l_deg,he,datum) a = datum[0].to_f f = 1.0/datum[1] b = b_deg * Deg2Rad l = l_deg * Deg2Rad e2 = f * (2 - f) n = a / Math.sqrt(1 - e2 * Math.sin(b)**2 ) x = (n+he)*Math.cos(b)*Math.cos(l) y = (n+he)*Math.cos(b)*Math.sin(l) z = (n*(1-e2)+he)*Math.sin(b) return x,y,z end