%N iscoords %F $MIR/src/subs/iscoords.for
%D Test if input string can represent coordinates and convert it
%: coordinates
%P bpw
%B
      logical function iscoords ( mode, coords, c1, c2 )

      character*(*)    mode
      character*(*)    coords
      real             c1, c2

 This checks if the input string can represent coordinates. For mode='ra', the
 input must look like right ascension and declination, for mode='lb', it must
 be longitude and latitude. If this is not so, the return value for iscoords
 is set to false.
 Every possible check is made to ensure that the input could be right ascension
 and declination or longitude/latitude, e.g. whether hours are between 0 and
 24, minutes and seconds between 0 and 59, etc.

 Input:
   mode:      determines whether input must represent right ascension and
              declination (mode='ra') or longitude and latitude (mode='lb').
   coords:    a string that could represent coordinates.

 Output:
   c1, c2:    specified coordinates in radians
