NAME:
  objappul
 PURPOSE:
  Generate a list of nightly appulses for a solar system object.
 DESCRIPTION:

 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  objappul,starttime,ndays,objcode,outfile
 INPUTS:
  starttime - Starting time for object ephemeris.  This can be provided as
                a julian date (scalar), or a 3,4,5, or 6 element time vector
                [y,m,d,h,m,s].  h, m, s, are optional in order of decreasing
                significance.
  ndays     - Number of days to run ephemeris over.
  objcode   - Object code for solar system object (see EPHEM.PRO)
 OPTIONAL INPUT PARAMETERS:
  outfile   - Output file name, default is to the screen
  MINSEP    - Minimum separation of appulse to flag star (arcsec), default=6.
 KEYWORD INPUT PARAMETERS:
  OBS   - Standard M.P.C. observatory code, default is geocentric or structure
 OUTPUTS:

  A file is created that is in the format specified.

 KEYWORD OUTPUT PARAMETERS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:
  It is not practical to extract too large of a list.  Also, this program
    does not have appropriate logic to handle the case where the object's
    path crosses 0h RA.  There is an arbitrary limit of 2 degrees placed
    on the extraction widths to prevent extracting the entire star catalog.

 PROCEDURE:

 MODIFICATION HISTORY:
  Written by Marc W. Buie, Lowell Observatory, 2001/05/01
  2001/05/31, MWB, added MINSEP keyword
  2002/09/09, MWB, added support for string obscode values
  2003/10/01, MWB, converted my Delfile call to system file_delete routine
  2024/07/06, MWB, rework for new obs tools