Fix range-ring KML for new Google Earth breakage.

This commit is contained in:
Al Brown 2012-08-15 08:52:16 -07:00 committed by Nick Foster
parent 17b788efc7
commit a6dac30fbf

View File

@ -73,7 +73,7 @@ class modes_kml(threading.Thread, modes_output_sql):
bearing = i*(2*math.pi/steps) #in radians bearing = i*(2*math.pi/steps) #in radians
lat_out = math.degrees(math.asin(math.sin(lat_rad)*math.cos(tmp0) + math.cos(lat_rad)*math.sin(tmp0)*math.cos(bearing))) lat_out = math.degrees(math.asin(math.sin(lat_rad)*math.cos(tmp0) + math.cos(lat_rad)*math.sin(tmp0)*math.cos(bearing)))
lon_out = center_lon + math.degrees(math.atan2(math.sin(bearing)*math.sin(tmp0)*math.cos(lat_rad), math.cos(tmp0)-math.sin(lat_rad)*math.sin(math.radians(lat_out)))) lon_out = center_lon + math.degrees(math.atan2(math.sin(bearing)*math.sin(tmp0)*math.cos(lat_rad), math.cos(tmp0)-math.sin(lat_rad)*math.sin(math.radians(lat_out))))
retstr += " %.8f, %.8f, 0" % (lon_out, lat_out,) retstr += " %.8f,%.8f, 0" % (lon_out, lat_out,)
retstr = string.lstrip(retstr) retstr = string.lstrip(retstr)
return retstr return retstr