; ;========================================================================== ; ; FILE: uf_forward_sgate.pro ; ; USAGE: result = UF_forward_sgate(ufbuf, field) ; ARGUMENTS ufbuf Buffer of UF words for a dwell of radar data ; field Logical number of the data field ; ; ABSTRACT: Return the UF gate number in the Nth data field where the ; FORWARD surface gate is located ; ; AUTHOR: I. Jeff Caylor ; Science Systems and Applications, Inc. ; 5900 Princess Garden Parkway, Suite 300 ; Lanham, MD 20706 ; ; at: NASA Goddard Space Flight Center ; Code 912 ; Greenbelt, MD 20771 ; Voice: (301) 286-3767 ; Fax: (301) 286-1762 ; Email: jeff.caylor@gsfc.nasa.gov ; ; CREATED: 11 April 1995 ; ; MODIFIED: 12 April 1999: change UFgatelength to UFgatespace - LT ; ;========================================================================== ; ; ; Return the location of the forward surface gate in the Nth data field ; Error = -1 ; FUNCTION UF_forward_sgate, ufbuf, field ; ; Compute the original EDOP gate for the first UF gate ; ; ufgzero = 1000.0 * UFrangezero(ufbuf, field) / UFgatelength(ufbuf, field) ufgzero = 1000.0 * UFrangezero(ufbuf, field) / UFgatespace(ufbuf, field) ; ; Get forward surface EDOP gate ; fgzero = UFedop_forwardsgate(ufbuf) ; ; Determine the UF gate for the surface ; IF (fgzero GE 0) AND (fgzero GE ufgzero) THEN $ RETURN, fgzero - UFedop_gatezero(ufbuf) - FIX(ufgzero) $ ELSE $ RETURN, -1 END