Internal: Procedure to calculate km/degree for any lat/long
Anonym
This .pro calculates radius, circumference and km/degree for any lat/long location on earth. Assumes Earth is perfect sphere. Results are in kms.
;************************************
function lat_effect, lat, units=miles
;
; this function returns the
; radius, circumference, and
; the km/degree for an input
; latitude on the globe,
; assuming the Earth is a
; perfect sphere. All results
; are in km uless the units
; keyword is set.
;************************************
radius = (6371)*cos(ABS(lat)*!dtor)
circumference = 2*!pi*radius
size = circumference/360.0
result = [radius, circumference, size]
IF KEYWORD_SET(units) THEN $
return, result * (0.62137) ELSE $
return, result
END