integer*4 function isangl (degsam, ramang, isampl) c c----------------------------------------------------------------------- c c Routine calculates the phase angle (isangl = deg) for a given c instrument sample for a maf1 data record, given a spin rate c (degsam = degs/sample) and an initial phase angle (ramang = deg), c normally returned from refang. Ramang is expected in range +/- 180 c degrees. Returned isangl value is also in +/- 180 degree range. c c----------------------------------------------------------------------- c integer*4 isampl c c----------------------------------------------------------------------- c----------------------------------------------------------------------- c ang = ramang + ((isampl-1) * degsam) + 720.0 ang = amod(ang, 360.0) isangl = ang if (isangl .gt. 180) isangl = isangl - 360 c c----------------------------------------------------------------------- c----------------------------------------------------------------------- c return end