FUNCTION Seg_Len,h,zeta,del_h=del_h ; This function returns the length (in km) of the geometric segment ; between the observer, at altitude h, and the altitude h + del_h (km) ; along a ray at an angle of zeta degrees from the local zenith, where ; zeta < 90 degrees. ; Note: observer's altitude h is assumed to be in km ; zenith angle zeta is assumed to be in degrees ; del_h defaults to 1 km r=6371.D0 ; Earth radius, in km IF N_Elements(del_h) EQ 0 THEN del_h=1.D0 hd=Double(h) zd=Double(zeta) h_tan=(r+hd)*Sin(!DtoR*zd)-r Return,Float(SQRT((r+hd+del_h)^2-(r+h_tan)^2)-SQRT((r+hd)^2-(r+h_tan)^2)) END