; ;========================================================================== ; ; FILE: uf_nadir_sgate.pro ; ; USAGE: result = UF_nadir_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 ; NADIR 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, which is one ; hlaf of the gatelength for over sampled EDOP data - LT ; ;========================================================================== ; ; ; Return the location of the nadir surface gate in the Nth data field ; Error = -1 ; FUNCTION UF_nadir_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 the nadir surface EDOP gate ; ngzero = UFedop_nadirsgate(ufbuf) print, ufgzero, UFedop_gatezero(ufbuf), UFgatelength(ufbuf, field), UFgatespace(ufbuf, field), ngzero ; ; Determine the UF gate for the surface ; IF (ngzero GE 0) AND (ngzero GE ufgzero) THEN $ RETURN, ngzero - UFedop_gatezero(ufbuf) - FIX(ufgzero) $ ELSE $ RETURN, -1 END