/* *************************************************
 * *                                               *
 * *               USER LIBRARY                    *
 * *  FAMBRANGE_F - COMPUTE THE AMBIGUOUS RANGE    *
 * *                                               *
 * *************************************************
 * File: libs/user/fambiguous_range.c
 *
 *           COPYRIGHT (c) 1988, 1993, 1999, 2000, 2002  BY
 *         SIGMET INCORPORATED, WESTFORD MASSACHUSETTS, U.S.A. 
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED. 
 * 
 * This real function computes the ambiguous range in kilometers.
 * It is simply the speed of light devided by twice the PRF
 *
 * Entry parameters:
 *     iprf_a        - The PRF used (higher one in dual mode)
 */

#include <stdio.h>
#include "sigtypes.h"
#include "user_lib.h"

FLT4 fambiguous_range
  (SINT4 iprf_a )
{

  FLT4 fresult;
    /* ------------------------------------------------------------------- */

    /* Convert the ambiguous velocity in meters per second */
    if (iprf_a <= 0)
      {
	fresult = 0.0;
      }
    else
      {
	fresult = FSPEED_OF_LIGHT / (2.* (FLT4)iprf_a);
      }
  return fresult;
}
