telescoped: telescope control daemon.

Uses the following fifo pairs (.in and .out suffix are wrt us):

	Tel.{in,out}
	Filter.{in,out}
	Focus.{in,out}
	Dome.{in,out}
	Lights.{in,out}

Uses the PC39 driver to control the stepper motors:
	
	$(TELHOME)/dev/pc39

Reads parameters from:

	telescoped.cfg
	focus.cfg
	telsched.cfg
	dome.cfg

Reads parameters from and makes updates to:

	home.cfg
	filter.cfg

"Canonical" directions are used throughout to eliminate the need to know
the signs of the actual motors. If the latter are referred to, they
are called "raw" directions. The canonical conventions are as follows:

    HA(Az):	+ccw looking down at scope from North (above) (like RA, not HA)
    Dec(Alt):	+moving towards scope's pole (like Dec)
    Field:	+cw rotation, looking "through" the camera
    Focus:	+moving to shorten the optical path from primary to camera
    Filter:	+cw rotation, looking "through" the camera
    Dome:	+cw looking down from above

Tracking algorithm, on each POLL_PERIOD update (all in tel.c):

    if jog_isactive:

	current_jog += jog_velocity*(mjd-jmjd); jmjd = mjd;
	
    find actual current position:

	read encoder.
	set cpos to current axis angle from home.
	use (tax + mesh) to set C* to current astronomical position.

    find expected current position:

	compute ephemeris of target.
	add current_jog and schedule offsets, as applicable.
	set D* to expected astro position.
	use (inverse)(tax + mesh) to set dpos to expected axis angle from home.

    find desired position @ t+POLL_PERIOD:

	compute ephemeris at t+POLL_PERIOD.
	add predicted jog and schedule offsets, as applicable, where
	    predicted jog = current_jog + jog_velocity*POLL_PERIOD
	use (inverse)(tax + mesh) to set fpos to future axis angle from home.

    issue velocity command to motor:

	v = ((fpos-dpos)*(1-trencwt) + (fpos-cpos)*trencwt)/POLL_PERIOD.

jog:

    when turned on: jmjd = mjd; jog_isactive = 1
    each update: current_jog += jog_velocity*(mjd-jmjd); jmjd = mjd;
    when turned off: current_jog += C* - D*; jog_velocity = 0

! For RCS Only -- Do Not Edit
! @(#) $RCSfile: README,v $ $Date: 2003/04/15 20:47:59 $ $Revision: 1.1.1.1 $ $Name:  $
