Function: DMS Purpose: Convert degrees to a string containing the degrees, minutes and seconds. Category: COORDINATES File: dms.c Author: Fred Lahuis Use: CALL DMS( DEGREES, Input double STRING, Output char*(*) COOR, Output double array (n = 3) PRECISION Input integer OUTPUT) Input integer DEGREES Input value in degrees STRING Output string, format xxd~xxm~xx.xxs or xxdxx'xx" (see OUTPUT). COOR Array of size 3 to receive the degrees, minutes and seconds. Omitted if coor is equal to NULL. PRECISION Indicates the precision in which the seconds are printed. OUTPUT Type of output 0 --> with d m s 1 --> with d ' ", for use with pgplot Updates: Jul 15, 1991: FL, Creation date. Feb 12, 1992: MV, New calculation of minuts to avoid rounding errors. Oct 19, 1992: FL, Output string changed for 0s. Nov 9, 1992: FL, Error for negative zero degree removed. Nov 13, 1992: FL, Proper handling of 60s, 60m and 360d. Sep 17, 1993: FL, Error in length convstr.