Help for NAV

PURPOSE

NAV is an interactive program which refines the camera pointing (C-matrix)
of an image by locating one or more distinct features in the image.  Features
used include the limb, ring-plane, and star background.  The measured feature
positions are used in combination with navigation data retrieved from the
project SEDR or SPICE file to compute the C-matrix.  The C-matrix is then
used to compute the planet-center and (optionally) the north-angle.  The
computed C-matrix may be subsequently used in two ways:

    1) The C-matrix may be stored in the SEDR or SPICE file and subsequently
       retrieved by map-projection, mosaicking, or data analysis software.

    2) The planet-center (and optionally the north-angle) may be inserted as
       parameters to these latter software.

NAV contains interfaces to the Voyager, Galileo and Cassini SPICE kernels only.
For all other missions (e.g. Space Telescope) the navigation data typically
provided by SPICE must be manually input.

Note that NAV obtains the default radii and rotation rate of the target body from
a SPICE PC kernel that is labelled GLL_CONSTANTS in the SPICE_CONFIG_FILE,
regardless of the project actually in use.  Be sure that the SPICE_CONFIG_FILE
in your system contains an entry for GLL_CONSTANTS if you wish to use those
defaults.

NAV uses an east-longitude system.  For Voyager, latitudes are input and output
to the user as planetographic.  Planetocentric latitudes are used for all other
missions.  This may be modified by using the GEOCEN and GEODET commands.

NAV assumes that the image has been acquired via a camera system with a
shutter and focal plane (e.g. vidicon/CCD sensor).  See also FARENC, MANMATCH,
and NAV2.

EXECUTION

(Note that NAV, like all interactive VICAR programs, cannot be run from
the Unix shell -- it must be run under TAE/VICAR.)

	USE  EPA2		!Allocate a display device
	NAV  PIC

where PIC is the image to be navigated.  PIC must be a Voyager, Galileo or
Cassini image in either byte or halfword (16-bit integer) data format.  The
frame must be in image-space or object-space (no picture size reduction or
map-projection allowed).

Voyager images should be 800x800 for image-space frames and 1000x1000 for
object-space frames.  Galileo images are always in image-space and are
800x800 for full-frame images and 400x400 for summation-mode images.  Cassini
images can be 1024x1024, 512x512 or 256x256 and are always in image-space.

NAV will not operate on halfword images which contain binary labels (e.g.
Galileo EDR).  Use program COPY to strip off the binary labels prior to
input to NAV.

NAV requires a page file quota slightly larger than normal.  The program
is known to fail on a quota of 8000 pages and to work on a quota of
13000 pages.

Upon entry, the user will be prompted to input commands.

GEOMETRIC CAMERA DISTORTIONS

Both images which contain geometric camera distortions (image-space frames)
and images which have been geometrically corrected (object-space frames)
may be input.  If a Voyager image-space frame is used, then the reseau locations
for the image must be input via the RES parameter:

  Example: RESLOC  (PIC,RESFILE)  R
           NAV  PIC  RES=R
    The reseau locations are located via the Voyager program RESLOC
    and input to NAV via the RES parameter.

NAV corrects for the Galileo SSI and Cassini WAC camera distortion using a
built-in radial distortion model.

RADIOMETRIC CAMERA DISTORTIONS

It is not necessary to correct the image for radiometric distortions
prior to input to NAV.  It will be desirable to do so, however, if the
PROFILE option is used to gather ring-profile data.

If the image is radiometrically corrected, care should be taken
to ensure that the dark-current subtraction does not truncate the limb
or ring, as this would lead to incorrect results when scanning for
these features.  This problem may be avoided by inputing the halfword image
(as output by FICOR77 or GALSOS) rather than the rescaled byte image (as
output by FIT).

OPERATION

Upon entry, the program will display the input image on the monitor,
adjusting the resolution, as necessary, to display the complete field
of view.  If the image is in halfword data format, the program auto-
matically determines the dynamic range of the input DN values,
stretching the display to saturate 0.5 percent of the data at the low
and high ends of the DN range (see ASTRETCH parameter).

Geometric data is retrieved from SPICE kernels and the
camera pointing is reconstructed using the best available information.

The camera pointing is broken down into 3 angular components: ANGLN,
the orientation of the projected spin axis, and ANGLA and ANGLB, 
which produce offsets within the image plane.

The user is prompted to specify whether limb, ring, or star navigation
is desired:

    Specify feature to be fitted (enter 'LIMB, 'RING, 'STAR or 'EXIT)>

Typing 'LIMB, 'RING, or 'STAR passes control to the LIMBFIT, RINGFIT, or
STARFIT routines, respectively.  Typing EXIT will return control to TAE,
with a summary of the current camera pointing printed out.

Prior to exiting, the user is prompted as to whether the SEDR should
be updated.  If the user responds 'Y, then an updated C-matrix is
stored in the SEDR.  The OM-matrix, RS-vector and (line,sample) coordinates
of the planet center are also stored in the SEDR.

WHAT TO DO IF SPICE KERNELS ARE NOT AVAILABLE

If the input image is from a mission other than Voyager, Galileo or Cassini,
the navigation data typically retrieved from the SEDR or SPICE files must be
manually input by the user.  First, the target body should be input in the
execution statement:
	NAV  INP=PIC  TARGET=SATURN
When the program issues the message "Unrecognizable project.  Enter project ID",
type NONE.

Enter the LIMBFIT routine by selecting 'LIMB and enter the following navigation
data via the 'EDIT command (see below): RANG,SSP,ANGLN,FL,SC,SOL,PC.  If SOL
is not known, set it equal to SSP.  Use your best guess for PC and enter it
last.  Type 'STATUS to display the current navigation data.

Type OVER=30 to draw a latitude-longitude grid of where NAV thinks the target
is located in the image.  Make any scale adjustments by changing FL, SCALE, or
RANG.

Adjust the planet center as follows: Exit from EDIT to get back to the
LIMBFIT prompt.  Type 'SCAN and manually move the graphics limb so that it
registers to the actual limb.  If everything looks OK, proceed with a limb
scan.  Otherwise re-enter 'EDIT and fiddle with the navigation data.

For images of planetary rings, the RINGFIT routine may be similarly used.

LIMBFIT ROUTINE

The LIMBFIT routine navigates the image by locating the planet limb.
The limb may be (1) located manually by tracing the limb via the cursor
or (2) automatically located by performing a radial scan about an
approximate planet-center.

The LIMBFIT command processor is identified by the prompt:

	LIMBFIT>

To obtain a list of the commands supported by the LIMBFIT routine,
type HELP:

	Enter EXIT,SCAN,TRACE,SCPTS,SAPTS,SBLEMS,SRES,CZOOM,H,HIST,STRETCH,
        ASTRETCH,GERASE,GCOLOR,C,OVERLAY,LATI,LONG,LL,LS,SPIKES,EDIT,PARAMS>

Entering SCAN will cause a limb scan.  See LIMBSCAN ALGORITHM below.

Entering TRACE will enable the user to trace the limb.  See
LIMBTRACE ALGORITHM below.

Entering SCPTS will display the computed limb (overlayed in graphics).

Entering SAPTS will display the acquired points (overlayed in graphics).

Entering SBLEMS will display the locations of the camera blemishes
(overlayed in graphics).  The blemishes are automatically retrieved from
blemish files located in WMS_VGR:[VGR1.NA], WMS_VGR:[VGR1.WA], and
WMS_VGR:[VGR2].  The user may optionally specify the location of the 
blemish file via the BLEMS parameter.  The program checks to ensure that 
the camera serial number associated with the file (as extracted from the 
label) matches the camera serial number associated with the image.

Entering SRES will display the reseau locations (overlayed in graphics).
If the reseau has not been removed, this display will give an indication
of how accurately the reseau has been located (and consequently the
accuracy of the geometric correction).

Entering CZOOM=2 will center the display about the current cursor
position and magnify the image to twice normal resolution. 
Pixel interpolation is performed during magnification.

Entering H will redisplay the original image (displayed at 1/2
resolution).

Entering HIST will cause the histogram (DN vs frequency) of the
displayed image area to be overlayed in graphics.  Note that a
logrithmic scale is used to display frequency.

Entering SPIKES=3 will scale the frequencies of the histogram so
that the third largest freqency corresponds to maximum scale.

Entering STRETCH=(20,100) will perform a hardware stretch (linear)
of the displayed image.

Entering ASTRETCH=(0.5,1.5) will perform an "ends-in" stretch:  The
histogram of the displayed image area is first computed.  Low and
high stretch limits are then chosen so as to saturate 0.5 and
1.5 percent of the data at the low and high ends of the histogram
(respectively).  The algorithm is described in detail in the
help information for VICAR program FIT.

Entering GERASE will erase the graphics plane.

Entering C will cause the (line,sample) and (lat,lon) or (radius,lon)
of the current cursor position to be reported.  Subsequent Returns
will repeat this until EXIT is entered.  Control then returns to
LIMBFIT or RINGFIT.

Entering OVERLAY=15 will cause a latitude-longitude grid at 
15 degree spacing to be overlayed on the planet.  Note that the
latitudes used are planetographic, unless the user has specified
planetocentric via the GEOCEN command.

Entering LATI=35.4 will cause a parallel at 35.4 degrees latitude
to be overlayed on the planet.

Entering LONG=115.0 will cause a meridian at 115 degrees
longitude to be overlayed on the planet.

LL and LS convert from latitude-longitude to line-sample and vice-versa.
When latitude-longitude coordinates LL=(23.3,130) are entered, the
program reports the corresponding line-sample coordinates.
When line-sample coordinates LS=(300,451.3) are entered, the program
reports the corresponding latitude-longitude coordinates.

Entering EDIT will enable the user to edit the navigation data.
See EDIT COMMAND below.

Entering PARAMS will enable the user to modify some obscure
processing parameters.  See PARAMS COMMAND below.

The SEF command is for program development only.  Don't try it.


LIMBSCAN ALGORITHM

STEP1: The planet outline is computed (CPTS) and drawn in graphics,
based on the nominal camera pointing (from the SEDR).  The limb
appears as a solid curve, with limb points spaced approximately two
pixels apart.  The unilluminated portion of the planet outline is
displayed as a broken line, with points spaced 8 pixels apart.

STEP2: The user is given an opportunity to manually improve the
camera pointing by moving the computed limb (drawn in graphics)
so that it registers with the actual limb (displayed on the video
plane):

	Move Cursor to a point on computed limb
        Hit Return when ready or type EXIT>

If the user is satisfied with the current pointing, he may skip
this step by typing EXIT.  Otherwise, use the trackball to select
a point on the limb and hit Return.

	Move Cursor to actual limb
	Hit Return when ready or type EXIT if done>

The user specifies the corresponding point on the actual limb and
enters Return.  The cursor displacement is used to move
the graphics limb to the new position.  The camera pointing is
updated in the process.

Any subsequent cursor movement followed by Return will produce
additional displacements of the graphics limb.  Typing EXIT will
transfer control to the next step.

STEP 3: A limb scan is performed, starting at each point on the
computed curve and scanning in a direction normal to the
limb, searching for a high-contrast point. 

	Do you wish to do a limb scan? (Enter Y or N)>

If the user types N, then the limb scan step is skipped and
control is returned to the LIMBFIT prompt with the manually
corrected pointing from STEP 2 in effect.

If the user types Y, a limb scan is performed.  Prior to the
scan, the user may limit the image area involved in the scan.

The limb is located by scanning iteratively for high-contrast
points, with each subsequent iteration using a smaller pixel spacing
between limb points, a smaller search radius, and smaller search steps:

    a) A limb scan is performed using an 11x1 correlation window
       and one-pixel search steps in a direction normal to the
       computed limb.  The length of the correlation window and 
       the search radius may be controlled via the NLW and NSEARCH
       parameters below.  The default search radius is 11 pixels.
       This implies that the user should manually register the
       graphics limb to within 10 pixels (see STEP 2) before
       beginning a limb scan.

       In performing the scan, limb points obscured by the planet's
       ring or ring shadow are avoided.

       If no high-contrast points are found, the LIMBSCAN algorithm
       is terminated and control returns to the LIMBFIT prompt.

    b) The high-contrast points acquired via the limb scan are
       stored in an an array APTS and displayed in graphics (after
       erasing the computed limb CPTS).  The program automatically
       deletes isolated points and points near reseau marks. 

    c) The positional differences between the computed limb points
       and the located high-contrast points are minimized in a
       least-square sense, resulting in line-sample offsets (DL,DS)
       and (if CHI3 is specified) rotation offset DT.

    d) Camera orientation angles ANGLA and ANGLB are corrected
       based on offsets (DL,DS).  ANGLN is corrected by rotation 
       offset DT.  The camera orientation matrix OM is then
       recalculated.

    e) The limb points CPTS are recomputed using the new camera
       orientation matrix.

Steps a) thru e) are repeated until no significant change occurs in
ANGLA and ANGLB.  For the second scan, the pixel spacing between limb
points is reduced to 1 pixel, the search step is reduced to 1/2 pixel,
and the search radius is reduced to 7 pixels.  

After each scan, the (line,sample) position of the planet center
is calculated using the updated pointing.

A final scan is performed using an 11x3 correlation window and a
3 pixel search radius.  Prior to the final fit, the user is
given an opportunity to delete any questionable points:

	Do you wish to clean the curve? (Enter Y or N)>

If the user types Y, control will be passed to a subcommand loop
identified by the prompt:

	Enter CLEAN, H, CZOOM, STRETCH, ASTRETCH or EXIT>

Entering CLEAN=5 will permit the user to delete all acquired high-
contrast points within a 5 pixel radius of the cursor position.

Entering EXIT will transfer control back to the LIMBSCAN routine
and a final fit is performed.

Upon completion of steps 1-3, control is passed back to the LIMBFIT
routine.

LIMBTRACE ALGORITHM

STEP1: The planet outline is computed and stored in array CPTS
(not displayed).  If no limb points are found, the following message
is printed:
		" ***Limb is not in picture"

and control is returned to the LIMBFIT prompt.  If the limb is indeed
in the picture, then something is wrong with the nominal pointing
information.  The user should enter the EDIT command to revue the
navigation data.  If the navigation data is correct, try changing
the planet center.

STEP2: The user traces the limb using the cursor.  This is performed
in a command loop identified by the prompt:

	TRACECRV>

To trace the limb, select limb points via the cursor and enter RETURN
to record the point.  Repeat this until done.  Then type EXIT to
continue to the next step.  The traced limb points are stored in the
array APTS.

Note that limb points may be selected even if they are obscured by the
planet ring or ring shadow.  However, be careful not to select points
on the unilluminated side of the planet.

Enter HELP to obtain a list of the commands available at this prompt:

	Enter D,H,CZOOM,STRETCH,ASTRETCH,HELP,EXIT

To delete a point, move the cursor over the point and enter D.

The commands H,CZOOM,STRETCH, and ASTRETCH enable the user to adjust the
display during the limb trace.

At least 3 limb points must be selected.  If you fail to do so, the
following message is printed:

	" ***Insufficient number of points specified"
	" ***Limb trace terminated"

and control is returned to the LIMBFIT prompt.

STEP3: The positional differences between the computed limb points
CPTS and the traced limb points APTS are minimized:

	Specify type of fit (Enter CHI2 or CHI3)>

Entering CHI2 will minimize differences between the computed
limb (CPTS) and the traced limb (APTS) by correcting for
translation errors in the image.  Angles ANGLA and ANGLB of the
camera orientation matrix (OM) are updated.

Entering CHI3 will correct for rotation and translation errors.
Angles ANGLA, ANGLB, and ANGLN (the north angle) of the OM
matrix are updated.  Selection of CHI2 or CHI3 has been moved to
the PARAMS option for LIMBFIT.

RINGFIT ROUTINE

The RINGFIT routine navigates the image by locating a ring of specified
radius.  The ring may be (1) located manually by tracing the ring via the
cursor or (2) automatically located by performing a radial scan about an
approximate planet-center.

The RINGFIT routine is identified by the prompt:

	RINGFIT>

The operation of the RINGFIT command processor is very similar
to that of LIMBFIT.  See LIMBFIT COMMAND above for a more complete
description of the available commands.

Entering RADIUS=117294 will cause a ring at that radius to be
displayed in graphics.  The ring is assumed to lie in the equatorial
plane of the planet.

For Uranus, the orbital elements of the ten known rings have been
stored within the program.  These orbital elements define the inclined-
plane eccentric-ring geometry of each ring.  The ten rings are identi-
fied within the program by the following nomenclature:

	6 = ring 6		N = eta ring
	5 = ring 5		G = gamma ring
	4 = ring 4		D = delta ring
	A = alpha ring		L = lambda ring (1986U1R)
        B = beta ring		E = epsilon ring

Entering RING=E will cause the epsilon ring to be displayed in
graphics.

Entering SRINGS will cause all nine rings to be displayed in graphics.

Entering ERING will enable the user to edit the orbital elements for
the nine Uranian rings (see ERING COMMAND below).

The MASTER command is used to specify the reference coordinate system
for making ring measurements.  When MASTER=D is entered, for example,
all (radius,longitude) measurements made using the cursor command C
are with respect to the inclined plane of to Delta ring, with zero
longitude at periapse.  When MASTER=P is entered, all measurements are
made in the planet's equatorial plane, with zero longitude defined to
be the intersection between Uranus' and Earth's mean equator 1950 
(ascending node) on 10 March 1977.

The RING, SRINGS, ERING, and MASTER commands work for Saturn and Neptune
as well.  The Saturn rings are identified as follows:

        F = F ring                   K = Keeler gap outer edge
        E = Outer edge Encke gap     A = Inner A ring edge
        N = Cassini inner edge of outer ring
        S = Cassini inner edge of 4th outer ring
        W = Outer B feature          B = Inner B ring edge
        M = Maxwell gap outer edge   R = Mid C ring feature
        T = Titan gap outer edge     C = Inner C ring edge 

For Saturn, the zero longitude is defined to be the intersection between
Saturn's and Earth's equator (ascending node) at EME 1950.

For Neptune, nine test orbits have been defined, the first three with
polar orbits and the remainder with equatorial orbits.  These rings are
identified as follows:
    
          Polar rings      New Satellites        Previous
	A =  50000 Km	   5 = 1989N5  orbit     T = Triton orbit
	B = 100000 Km	   3 = 1989N3            N = Nereid orbit
	C = 150000 Km	   4 = 1989N4
			   2 = 1989N2
			   1 = 1989N1

For Neptune, the zero longitude is defined to be the intersection between
Neptune's and Earth's mean equator 1950 (ascending node) at time of closest
approach.

Note that the reference systems for Jupiter's rings still uses the longitude
system of the rotating planet.

Entering SCAN will cause a ring scan.  See RINGSCAN ALGORITHM below.

Entering TRACE will enable the user to trace the RING.  See RINGTRACE ALGORITHM
below.

Entering PROFILE will enable the user to obtain a radial or longitudinal
plot of a specified sector of the ring plane.  See PROFILE ROUTINE below.

Entering 'PHASPROF will enable the user to obtain a constant-phase 
plot of a specified area of the image.  See PHASPROF ROUTINE below.

RL and LS convert from Radius-longitude to line-sample and vice-versa.
When Radius-longitude coordinates RL=(85000.,130) are entered, the
program reports the corresponding line-sample coordinates.
When line-sample coordinates LS=(300,451.3) are entered, the program
reports the corresponding radius-longitude coordinates for the ring
system that is currently used.

Command PREDICT is to predict the position of an object in one frame
from its position in another.  There are two modes of operation: Predicting
the position of object in another frame from its current position (cursor
is used) or predicting the position of an object in the current frame
(cursor is placed) from its position in another frame.  Predict only
understands the Frame/Time relationship for Voyager and Cassini.

PREDICT=FRAME: The cursor position is read to determine the object's
current MASTER system longitude.  Then its longitude in FRAME is predicted.
Only the longitude is derived from the cursor (the MASTER ring plane orbit
is used) , for MASTER=P then the radius is also taken from the cursor position.

PREDICT=(FRAME,RADIUS):  The cursor position is read to determine the object's
current MASTER system longitude.  Then its longitude in FRAME is predicted
by assuming a circular orbit at RADIUS.

PREDICT=(FRAME,LONGITUDE): The position in the current frame is predicted
from the given LONGITUDE at another FRAME.  If in present field, the cursor
is placed there. Uses orbit defined by MASTER ring.  IF MASTER=P one must
also specify radius.

PREDICT=(FRAME,LONGITUDE,RADIUS): Same as above but for a circular orbit
in the MASTER plane.

RINGSCAN ALGORITHM

The RINGSCAN algorithm is very similar to the LIMBSCAN algorithm.

STEP1: The user is first prompted to enter a ring radius or ring
name:
	Enter ring radius (km) [and plane] or ring name...
        Enter RADIUS, PLANE, RING or 'EXIT>

Entering RADIUS=5433.3 will cause the resulting scan to be performed
on a ring of radius 5433.3.  The ring is assumed to be in the
master plane and to have no eccentricity.  If another plane is wanted,
on the same line one also types PLANE=[ring plane name].  Then the 
scan will be performed on a non-eccentric ring of radius 5433.3 in
the specified ring plane.

Entering RING=E will cause a scan to be perfromed on the epsilon ring
of Uranus.

RINGFIT computes the ring points for the specified ring or radius
and draws the curve in graphics.

Entering 'EXIT goes to the next step.

STEP2: In order to do the ring scan, the program must know which
type of edge function to use:

	Specify edge type (Enter OUTER, INNER or WIDTH)>

If the width of the ring is greater than 19 pixels, the scan should
be performed on the inner or outer edge of the ring.  For thin rings,
specify its width (in pixels): E.g. WIDTH=11 will match the ring
profile to a gaussian with sigma=11/4.

STEP3: The user manually moves the curve over the actual ring
exactly as in the LIMBSCAN algorithm.

The ring scan proceeds in exactly the same way as in the LIMBSCAN
algorithm.  In performing the scan, ring points located in front
or in back of the planet or in the planet's shadow are avoided.

Upon completion of steps 1-3, control is passed to the RINGFIT
prompt.

RINGTRACE ALGORITHM

The RINGTRACE algorithm is similar to the LIMBTRACE algorithm
(above) except that the user is first prompted to enter a ring
radius or ring name:

	Enter ring radius (km) [and plane] or ring name...
        Enter RADIUS, PLANE, RING or 'EXIT>

Entering RADIUS=5433.3 will cause the resulting scan to be performed
on a ring of radius 5433.3.  The ring is assumed to be in the
master plane and to have no eccentricity.  If another plane is wanted,
on the same line one also types PLANE=[ring plane name].  Then the 
scan will be performed on a non-eccentric ring of radius 5433.3 in
the specified ring plane.

Entering RING=E will enable tracing of the epsilon ring of Uranus.

After tracing the ring, typing 'EXIT will return the user back to
the prompt:

	Enter ring radius (km) [and plane] or ring name...
        Enter RADIUS, PLANE, RING or 'EXIT>

The user may trace additional rings (up to 10 are permitted).  Upon
completion, the routine will simultaneously fit all rings traced,
computing a new C-matrix.  This C-matrix replaces the C-matrices
for all rings traced.

PROFILE ROUTINE

Entering 'PROFILE at the RINGFIT prompt passes control to the PROFILE routine,
which is identified by the prompt:
		PROFILE>
The PROFILE routine is used to obtain radial or longitudinal plots of the
ring-plane (coincident with the Master ring plane).   Each time the
PROFILE prompt is issued, the specified profile type (radial or longitudinal),
radius limits, and longitude limits are reported.  Enter any missing information
to obtain a plot.

Entering 'HELP will display a list of commands available at this prompt:
    Enter TYPE, RLIMITS, LLIMITS, LWIDTH, 'PLOT, OUTPUT, PHASE, 'CP, 'C, 'H,
    RL, LS, CZOOM, STRETCH, 'GERASE, GCOLOR, or 'EXIT.

Entering TYPE=R causes a radial plot of the specified sector to be computed and
displayed.  The radial plot (DN vs radius) is computed by averaging all pixels
at a constant radius and lying between the starting and ending longitudes of the
sector.  Bilinear interpolation is used.

Enter TYPE=L to select a longitudinal plot.  Plot consists of DN averaged
over lines of constant longitude.

The ring-sector to be plotted is specified by the RLIMITS and LLIMITS commands.
Entering RLIMITS=(47600,48450) LLIMITS=(253,254) specifies the minimum and
maximum radius and longitude, respectively, of the desired sector.

Enter TYPE=D to select a diagonal radial plot, which is a radial plot centered
on a specified diagonal line.  Specify the end points of the diagonal line by
entering the end points (R1,L1) and (R2,L2) as RLIMITS=(R1,R2) LLIMITS=(L1,L2).
An additional parameter, LWIDTH (the width of the scan in degrees) is required
for diagonal plots.

This plot is useful in cases where the image does not contain the same range
of ring longitude at the ends of a desired ring radial plot, this method
allows one to still get a radial plot.  Instead of having a ring sector with
the same longitudinal limits at each end, the plot is done along a diagonal
line averaging over a constant longitudinal width (defined by the inputted
LWIDTH parameter in degrees).

Enter TYPE=S to select a Longitudinal smear plot, which is a longitudinal plot
but averaged not over a range of radii, but along a smear direction and smear
length.  You specify the longitude limits with LLIMITS=(L1,L2).  You then
specify the smear direction with the cursor on some smeared object, and then
specify the smear length (and center radius) using the cursor on the ring to
be plotted.

This is useful for cases where one wants to do a plot along longitude but for
which the image is smeared and lines of constant radius are not consistant
with the smear.  This allows one to define a smear direction (using a star for
example) and to define a smear length (to plot over).  Plot is done by
averaging DN along this line rather than along lines of constant radius.

Whenever new values are entered for TYPE, RLIMITS, or LLIMITS, or whenever
'PLOT is specified, a new plot is generated.

The 'C command may be used to read the (radius,longitude) coordinates of any
cursored position on the display.  This is useful in determining the desired
ring-sector limits.  The image display may be adjusted via the 'H, CZOOM,
STRETCH, and 'GERASE commands.

The plot is displayed over the image in graphics.  The (radius,DN) or
(longitude,DN) values of the plotted points may be read with the cursor via
the 'CP command.

Entering OUTPUT=PLOT.DAT will generate an ASCII file of record length 31 bytes,
containing the longitude, radius, and DN value for each longitude (or radius)
of the plot.  If the 'PHASE keyword is appended to the SAME COMMAND LINE as
OUTPUT, the ASCII file will include the phase angle at each plotted point (and
the record length will be 37 bytes).

PHASPROF ROUTINE

Entering 'PHasprof at the RINGFIT prompt passes control to the PHASPROF routine,
which is identified by the prompt:

		Constant-Phase Profiling>

The PHASPROF routine is used to obtain constant-phase plots of the
ring-plane (coincident with the Master ring plane).   

Entering 'HELP will display a list of commands available at this prompt.

The commands are

  'CEnterpt, 'COrnerpt, 'REFresh, 'EDIT,
  'PLot, 'Dnplot, 'Longplot, 'RAdiplot, 'EMisplot, 'Inciplot, 'PHasplot,
  OUTPUT=<filespec>, 'CP, 'C, 'H, RL=(radius,longitude), LS=(line,sample),
  CZoom=<iz>, STretch=(hidn,lowdn), ASTRETCH=(hi%,low%), 'GERASE, 
  GCOLOR=<color> (or ') 'Help, 'EXit

Positioning the cursor & entering 'CEnterpt causes the cursor position to be
saved as the center point of a constant-phase profile scan.  A dotted line 
will appear; it will be the centerline of the profile scan & represents a line 
of constant phase going through that point.  The incidence, emission, & phase 
angles at the center point will be printed out on the terminal.  Entering
'CEnterpt initiates the geometry for a new scan and any previous corner point
(below) is lost. 

Positioning the cursor & entering 'COrnerpt causes the cursor position to be 
saved as the corner point of a constant-phase profile scan i.e. the corner 
point determined both the width (range of phase to either side of the 
centerline) and length along the centerline of the scan.  Two dotted lines
will appear representing the width of the scan, as well as two solid lines
representing the length of the scan.  For a narrow scan, the solid lines may 
not be easily visible.  'CEnterpt must be entered before 'COrnerpt, and
entering 'CEnterpt (see above) will erase any previous corner point
information. You may adjust these points as needed, the screen is updated 

Entering 'REFresh will redraw the current centerline, width lines, & length 
limit lines, if present; previous scan lines will be erased.

Entering 'EDitnav will enter the EDITNAV routine, described elsewhere, and
will also erase any scan information.

The scan will sample 
the area, averaging across the width and reporting data along the length of 
the scan.  

  'CEnterpt, 'COrnerpt, 'REFresh, 'EDIT,
  'PLot, 'Dnplot, 'Longplot, 'RAdiplot, 'EMisplot, 'Inciplot, 'PHasplot,
  OUTPUT=<filespec>, 'CP, 'C, 'H, RL=(radius,longitude), LS=(line,sample),
  CZoom=<iz>, STretch=(hidn,lowdn), ASTRETCH=(hi%,low%), 'GERASE, 
  GCOLOR=<color> (or ') 'Help, 'EXit

The 'C command may be used to read the (radius,longitude) coordinates of any
cursored position on the display.  This is useful in determining the desired
ring-sector limits.  The RL & LS commands convert between image & ring
coordinates without involving the cursor. The image display may be adjusted via
the 'H, CZoom, STretch, AStretch, GColor, and 'GErase commands.  

The plot is displayed over the image in graphics.  The abscissa represents 
the length (in pixels, approximately) of the scan, and the ordinate is
dependent on which plot command was issued.  Values of the plotted points may
be read with the cursor via the 'CP command. 

Entering OUTPUT=<filespec> will generate an ASCII file of the scan 
containing some header information, followed by a table with 7 columns of 
numbers.  The columns represent the scan profile index (i.e. distance along 
scan in pixels, approximately), longitude, radius, DN value, incidence angle,
emission angle, & phase angle.  The incidence, emission, & phase angle values
in the table are differences from nominal, not the actual angles themselves
i.e. the photometric values in the table are the actual angles with the nominal
values (listed in the header information) subtracted. 

STARFIT ROUTINE

The STARFIT routine navigates the image by matching the stars in the image
with a starmap computed from data retrieved from the Smithsonian Astrophysical
Observatory (SAO) Star Catalog, Version 1984.  NAV uses a condensed version
of the catalog, containing only the right-ascention, declination (EME50),
magnitude, name and spectral type for each star.  The catalog location is
specified at the program execution statement via the SAO parameter. At MIPS,
sao_idl.str is located  in WMS_VGR:[000000] if VMS, or /project/vgr under Unix.
Outside users can get the sao.cat file from FEI using fei -g vgrrad/sao_idl.str
Previous star catalogs that that worked with NAV 

Note: Other star catalogs can also be used: 

Catalog file              Purpose                Magnitude   Name       Type?
agk3_idl.str      AGK3 (north of -2.5 deg)        to 12      AGK3     Spectral
jup_voy_idl.str   Jupiter approach, epoch '78     to 12      AGK3       None
sat_voy_idl.str   Saturn approach, epoch '78      to >13     AGK3       None
nep_voy_idl.str   Uranus/Neptune, epoch '86       to 12.7     SAO     Spectral


An alternate catalog is the Guide Star Catalog put out by the Space Telescope 
Science Institute.  The relevant PDF parameter is GSCPFX, and (if GSCPFX is set
to "GSCVOL" under VMS or "/cdrom/gscvol" under Eunuuchs(tm),) NAV assumes it 
can find the GSC files under 

  GSCVOL1: & GSCVOL2:

for VMS or under

  /cdrom/gscvol1/ & /cdrom/gscvol2/

for Eunuchs(tm).  The CDROM's may be mounted by one of the following methods:

VMS, local mount:

    $ mount /over=id /nowrite dka400: "" GSCVOL1
    $ mount /over=id /nowrite dka410: "" GSCVOL2

VMS, NFS mount using Multinet:

    $ mult nfsmount /nowrite "host.with.cds::/cdrom/gscvol1" GSCVOL1
    $ mult nfsmount /nowrite "host.with.cds::/cdrom/gscvol2" GSCVOL2

Generic Eunuchs(tm), local mount:

    # mount -t hsfs /dev/sr0 /cdrom/gscvol1
    # mount -t hsfs /dev/sr0 /cdrom/gscvol2

Generic Eunuchs(tm), NFS mount:

    # mount -t nfs host.with.cds::/cdrom/gscvol1 /gscvol1
    # mount -t nfs host.with.cds::/cdrom/gscvol2 /gscvol2


Upon entry, all stars within the camera's field-of-view are retrieved
from the catalog and overlayed (in graphics) on the image display.
A histogram displaying the number of stars at each visual magnitude is
output to the terminal.

The STARFIT command processor is identified by the prompt:

	STARFIT>

To obtain a list of the commands supported by the STARFIT routine,
type HELP:

	Enter EXIT,HIMAG,SSTARS,SBLEMS,SRES,MSTARS,CZOOM,H,HIST,
        SPIKES,STRETCH,ASTRETCH,GERASE,GCOLOR,C,RD,LS,EDIT,PARAMS>

Typing HIMAG=8 will redisplay the graphics starmap, such that all
stars higher than magnitude 8 are ignored.
!CBTC Typing HIMAG=8.5 will redisplay the graphics starmap, such that all
!CBTC stars higher than magnitude 8.5 are ignored.

Typing 'SSTARS redisplays the starmap.

Typing 'MSTARS will enable the user to register the graphics starmap
to the star background in the image.  See MOVESTAR ALGORITHM below.

Typing RD=(76.7,15.5) will cause the cursor to be moved to that
right-ascension and declination on the display screen.  The corresponding
line-sample coordinates are reported.

Typing line-sample coordinates LS=(455,581) will cause the corresponding
right-ascension and declination to be reported.

The 'C command may be used to read the (Right-ascension, declination)
coordinates of any cursored position on the display.  Also information
about the nearest star to the cursored position will be listed.  The image
display may be adjusted via the 'H, CZOOM, STRETCH, and 'GERASE commands.

MOVESTAR ALGORITHM

Upon entry, the user is supplied with the following instructions:

	To select a star, move cursor to a graphics star
	and hit RETURN.  You will then be asked to match
	the selected star to its image via the cursor.
	Repeat to acquire more points or type 'EXIT when done.
	You may delete a point by typing D.
	You may adjust the display by using H,CZOOM,STRETCH,or ASTRETCH.

This is followed by the prompt:

	READY>

When the user has selected a graphics star via the cursor and enters
RETURN, MOVESTAR reads the line-sample position of the cursor, identifies
the star selected, and responds with a "beep" and the prompt:

	Cursor star image and hit RETURN>

The user then selects the corresponding star in the image and hits
RETURN.  This is followed by another "beep" and the READY prompt.  This
cycle is repeated until the user types 'EXIT.  Be careful not to move
the cursor until you hear the "beep", which indicates that the cursor
has been read.  Note that the graphics stars need not be selected
accurately since MOVESTAR searches for the star nearest the cursor
position.  However, the corresponding star image should be selected
with care.  The display resolution will limit the accuracy of this
selection.  Note that the default ZOOM=-2 will enable selection to the
nearest two pixels.  Use the CZOOM command to display areas of the image
at higher resolution.

When the user types 'EXIT to exit from the star selection loop, the
program responds with the prompt:

	Enter CHI2 or CHI3>

Entering CHI2 causes the line-sample position of the planet-center to
be updated.  Entering CHI3 causes the north angle to be updated as well.
If 3 or more stars have been selected, use CHI3.

Before returning control to STARFIT, the starmap is redisplayed, using
the updated camera pointing.

EDIT COMMAND

Typing EDIT will transfer control to the EDIT command processor,
identified by the prompt:

	EDIT>

The EDIT command processor enables the user to modify values which
effect the image geometry.  These include planet constants, camera
constants, and geometric data.  Under normal circumstances, the user
will never have to edit the image geometry data since these are
automatically retrieved from the Image Catalog and frame label.

Typing HELP will cause of all the available commands to be listed:

	Enter EXIT,HELP,GEODET,GEOCEN,RA,RB,RC,LORA,CAMERA,FL,OAXIS,
	SC,SSP,PC,ISPC,WAPC,WAISPC,ANGLN,RANGE,TARGET,ECM,EME,
	SCVECTOR,SOL,RLIM,STATUS,SAVE,RESTORE,GETSEDR,CZOOM,H,STRETCH,
        ASTRETCH,GERASE,GCOLOR,C,OVERLAY,LATI,LONG>

Typing EXIT will return control back to the RINGFIT or LIMBFIT
command processor.

Typing GEODET will cause all latitudes input by the user to be
treated as planetographic, and to report all latitudes to the user
as planetographic.  The default for Voyager is GEODET.  For all other
missions, the default is GEOCEN.

Typing GEOCEN will cause all input and output latitudes to be
treated as planetocentric.

Typing RA=241 RB=235 RC=232 will change the values of the planet's
major equatorial, minor equatorial, and polar radii to 241, 235, and
232 km, respectively.

Typing LORA=135.2 will change the orientation of the major equatorial
radius so that it points to longitude 135.2 degrees.  If RA=RB, then
LORA is undefined and should not be used.

Typing CAMERA=7 will change the camera-ID to VGR-1 NA.  This
will automatically cause the nominal constants for that camera
to be retrieved from tables and stored in FL, OAL, OAS, and
SC below.  The valid VGR camera serial numbers are:

	4 = VGR-2 WA		6 = VGR-1 WA
	5 = VGR-2 NA		7 = VGR-1 NA

        Valid Cassini camera serial numbers are:
        1=NAC  21=NAC 2x2 summation mode  41=NAC 4x4 summation mode
        2=WAC  22=WAC 2x2 summation mode  42=WAC 4x4 summation mode

Typing  FL=1200.175 will change the camera focal length to
1200.175 mm.

Typing OAXIS=(500,500) will place the optical axis intercept
at (line,sample)=(500,500).

Typing SC=84.821 will change the picture scale to 84.821 pixels
per mm on the focal plane.

Typing SSP=(-34.113,335.252) will change the spacecraft position
to (SCLAT,SCLON)=(-34.113,335.252).

Typing SOL=(32.3,124.5) will change the position of the sun to
(SUNLAT,SUNLON)=(32.3,124.5).

Typing PC=(445.3,558.4) will move the planet center to
(SCLINE,SCSAMP)=(445.3,558.4).  This will cause the camera pointing
to be updated.  The planet-center must be in object-space.  To
enter an image-space planet-center, use ISPC.  Note that if ISPC is
used, the input image must be in image-space.

If the is image is a narrow-angle frame from a simultaneous exposure
and if the planet-center for the wide-angle frame is known, it may
be entered using WAPC (e.g. WAPC=(455.1,376.2)).  The (line,sample)
coordinates are converted to the narrow-angle field of view and
the result used as the (line,sample) coordinates for the narrow-angle
planet-center.  The planet-center must be in object-space.  To enter
an image-space planet-center for the wide-angle frame, use WAISPC.

Typing ANGLN=190.9 will cause the orientation of the projected
spin axis to be changed to 190.9 degrees, measured clockwise
from right (the positive sample direction).

Typing RANGE=4794909 will cause the distance from spacecraft to
planet center to be changed to 4794909 km.

Typing TARGET=SATURN will change the target-ID to Saturn and
automatically changes the polar and equatorial radii to Saturn's
nominal values.

The parameters ECM, EME, and SCVECTOR may be used to change the
C-matrix, ME-matrix, and spacecraft vector by entering data as
provided by Mert Davies.  When 'ECM is typed, the program prints out
the current values for three angles defining the camera orientation
(ALPHA, DELTA, and KAPPA) and issues the prompt:

	Enter changes of type EXIT>

Typing ALPHA=25.2176 will modify the value of ALPHA, etc.  Similiarly,
typing 'EME will permit editing of the three angles defining the
ME-matrix (ALPHA, DELTA, and OMEGA).

Typing SCVECTOR=(10833.2,36556.4,371.6) will update the spacecraft
vector, as expressed in celestial coordinates (km).

Typing RLIM=(76000,140000) will set the minimum and maximum ring
radii to 76000 and 140000 km respectively.  Note that these values
are used only in avoiding limb points obscured by the ring or
ring shadow during a limb scan.

Typing STATUS will cause a summary of the navigation data to be
printed.

Typing SAVE will store the current navigation data in the array
SNAV.  Typing RESTORE will replace the navigation data by
whatever is in SNAV.  Typing GETSEDR will replace the navigation
data with the nominal pointing.

The remainder of the commands are used to update the image display
and are as described above (see LIMBFIT ROUTINE).

ERING COMMAND

The orbital elements of each planetary ring system are read from the
Ring Orbital Elements File (OEF).  These orbital elements define the
inclined-plane eccentric-ring geometry of each ring.  The file may be
specified when entering NAV, as in the following example:

	NAV  PIC  OEF=RINGDATA.DAT

A new orbital elements file may be created by executing program RINGORBS.
At MIPS, the file is located in ROEF.DAT (in WMS_VGR:[000000] if VMS, 
or /project/vgr under Unix).
Outside users can get the ROEF.DAT file from FEI using fei -g vgrrad/roef.dat

The ERING command is used to edit the orbital elements for the current
planetary ring system:

	ERING>

Entering HELP will display a list of the commands available
at this prompt:

	Enter EXIT,RING,STATUS,SMAA,ECC,INCL,PIZERO,OMEGZ,
        RA,DEC,THETA,ZETAZ,RESTORE,HELP>

Entering RING=A will cause the orbital elements of the alpha
ring to be retrieved for editing.  The ring points are computed
and displayed in graphics, based upon the current C-matrix.

Entering STATUS will display the orbital elements for the
retrieved ring.

Entering SMAA=5000. will change the semi-major axis to 5000 km.

Entering ECC=0.0123 will change the eccentricity to 0.0123.

Entering INCL=0.1093 will change the inclination angle of the
ring plane to 0.1093 degrees.

Entering PIZERO=169.3 will change the longitude of periapse
to 169.3 degrees.

Entering OMEGZ=82.3 will change the longitude of the ascending
node to 82.3 degrees.

Entering RA=76.6, DEC=15.1 will change the orientation of
planet's north pole to (RA,Dec)=(76.2,15.1) degrees.  Note that
the orientation of the pole is assumed to be constant (i.e. does
not precess).  Also, These parameters can only be changed for
RING=P since they are common to all of the rings.  NAV will then
update all of the rings.

Whenever one of the orbital elements is changed, the ring points
are re-computed and re-displayed in graphics.

Entering 'RESTORE wil restore the original orbital elements for
the ring.

Entering 'WRITE will update the Orbital Elements File with the edited values.
Note that the user cannot (i.e. does not have sufficient priviledge to) update
the default OEF.  If you need to tinker with the orbital elements, copy the
file into your own directory and use the OEF parameter described above.
Alternatively, a new OEF can be created by executing program RINGORBS.

One can define a new eccentric ring by entering parameters in several
"place holding" rings.  These extra rings can be accessed by specifing
RING = ...

     SATURN:  Y Z
     URANUS:  W X Y Z
     NEPTUNE: W X Y Z

These rings can then be used as the MASTER ring plane, in RINGTRACE and
RINGSCAN, they can be drawn as RING=-, and the plane can be used in PROFILE.
PARAMS COMMAND

Typing PARAMS will enable user modification of processing
parameters:

	Enter EXIT,NLW,NSW,NSEARCH,CHI2,CHI3,DBUG,NODBUG>

Entering NLW=9 NSW=5 will change the correlation window (used in the
limb scan) to a 9x5 area.  NLW and NSW must be specified as odd
positive integers.

Entering NSEARCH=25 will increase the search radius to 25 pixels.

Entering CHI2 will minimize differences between the computed
points (CPTS) and the actual points (APTS) by correcting for
translation errors in the image.  Angles ANGLA and ANGLB of the
camera orientation matrix (OM) are updated.

Entering CHI3 will correct for rotation and translation errors.
Angles ANGLA, ANGLB, and ANGLN (the north angle) of the OM
matrix are updated.

Entering DBUG or NODBUG enables or disables diagnostic messages.


GENERAL COMMENTS

The general rules regarding TAE parameters apply:

Commands may be abbreviated, as long as enough letters are typed
to insure uniqueness.

When a command is not followed by a value, it must be preceded
by an apostrophe, e.g. 'TRACE.  The exception is that if the first
keyword in a list is entered, the apostrophe may be ommitted,
e.g:
     >	Enter LIMB or RING L

If you need help or want to get out of a routine, try typing
HELP or EXIT.  Sometimes it works, sometimes it doesn't....


PROGRAM HISTORY

NAV was developed as a cooperative effort between JPL, Cal-Tech,
and the University of Arizona.  Software development at Cal-Tech was
under the direction of Andy Ingersoll.  Software development at Arizona
was under the direction of Carolyn Porco.

The algorithms implemented in NAV are based on notes provided by Andy
Ingersoll, 3-19-85 (basic algorithms), and 1-2-86 (eccentric ring geometry),
and by Carolyn Porco, 1-12-87 (stellar navigation and Neptune's rings).
The equations for the planet and planet-limb geometry have been generalized
to accomodate the tri-axial ellipsoid target-body model.

The major part of program development was undertaken at JPL.  The original
planet limb algorithm (LIMBPT) was written by Tom Brinck of Cal-Tech.  A major
portion of the ring and stellar geomtry algorithms were written by Vance
Haemmerle of Arizona.

Original Programmers: Gary Yagi and Vance Haemmerle, 30 September 1985
Current Cognizant Programmer: Gary Yagi
Revisions:
 1985-01-01  GMY  ...Add ringfit routines
 1985-02-17  GMY  ...Add eccentric ring routines
 1987-09-11  GMY  ...Change planet model from oblate spheroid to ellipsoid
 1988-05-28  GMY  ...New VRDI and SEDR interfaces.
 1988-06-26  GMY  ...Add starfit routines
                  ...Modify program to work on image-space images.
 1988-06-30  GMY  ...Modify program to work on 1024x1024 display.
 1988-07-15  GMY  ...Fix LIMBPT and RINGPT routines to skip over points
                     not in picture. 
 1988-07-20  GMY  ...Modify program to work on halfword images.
 1988-07-26  GMY  ...Merge code from Vance Haemmerle's version of NAV.
		  ...New capabilities include computation of phase angle,
		  ...orbital elements of Saturn's rings, longitudinal
		  ...ring profiles, and graphics display of ring profile.
 1989-03-17  GMY  ...Read orbital elements from file
                  ...Numerous bug fixes (FRs 38130,42711,42712)
 1989-05-31  VRH  ...RL, LS functions for rings added
		  ...Chisq, Covarient matrix, PHASE, LATI, LL fixed
                  ...PROFILE for Master ring system 
                  ...(* System directory dependences removed - UA version)
 1989-06-08  VRH  ...RADIUS in Master ring system for drawing & fiting
                  ...PLANE option in fiting (TRACE,SCAN) for RADIUS ring
                  ...Use ring place holders for defining new rings
                  ...available for every use except SRINGS
 1989-07-29  VRH  ...Direct C-Matrix corrections for ANGLA less than 10 degrees
                  ...Epoch's changed from ERT to Planet time
                  ...Cursor routines report DN value
                  ...Bug fixes: /C1/ common block, Scan limits, RA in LATLON,
                  ...GETSEDR,GETLAST... to end with planet navigation
                  ...ERING changed: ALPHAp,DELTAp,THETA,ZETAZ only changed
                  ...using RING=P then all rings updated
                  ...Labels added to profile plots
 1989-08-16 VRH   ...Added PREDICT parameter & subroutine
 1990-06-01 GMY   ...Galileo conversion.
                  ...Minor bug fixes (FRs 48219,48452,48454,50799,48218,52848)
 1990-07-26 GMY   ...Change PLANET_NAME to TAREGET_NAME in call to SPICESUB.
 1991-02-22 GMY   ...Make it work when SEDR or SPICE kernels are not available.
 1995-11-01 LWK   ...ported program (limb-fit only, and no halfword data or
                     graphics under Unix)
 1996-04-04 ARV   ...Added capability to handle non-flight projects.
                  ...VICAR retrieves SCLAT, SCLON, SUNLAT, SUNLON, CENTLINE,
                  ...CENTSAMP, RANGE, FOCAL, SCALE, NORTH, OALINE, OASAMP
                  ...from a MAP2 Perspective Projection label, the command
                  ...line (these parameters added to command line), or
                  ...prompts user.  Changes tagged by 'A. VASAVADA'.
 1996-04-07 LWK   ...enabled graphics on all platforms
 1996-06-24 BAM   ...modified program for new Reseau File Format
 1996-08-27 OAM   ...modified program to call getspice2 instead of getspice.
                     Included provenance parameters. Modified to reference
                     the OEF and SAO files only when they are needed.
 1996-11-06 BTC   ...Changes from 06-Nov-96 version have the marker "CBTC"
 1997-02    BTC   ...Fixed several problems with RINGFIT & STARFIT
                  ...See also RINGORBS.COM to get correct ROEF.DAT(Jupiter/GLL)
                  ...Fixed broken non-VGR logic around call to VGRCLEAR
                  ...Fixed mistakes regarding INTEGER vs REAL vars (XDROTATE
                     argument, HIMAG in SUBCMD STARFIT, SL,SS,EL,ES in 
                     RINGPT2()), and dimensions of HIStogram vector.
                  ...Fixed broken axis labels in PRDISPLAY (ring PROFILE plot)
                  ...Fixed broken display code when ZOOM is not 1
                  ...Improved speed of image display via buffering in AVLINE()
                  ...Added GCOLOR parameter to allow the user to define
                     the graphics overlay color (default is CYAN).
                  ...Added RPARAMS call to STARFIT()
                  ...Fixed STARFIT et al. for J2000 Reference Frame (ISYSTEM=1)
 1998-07-23 RRP   ...Updated to obtain four digit year and use four digit year
                  ...through out the program. The variable name is IDATE and it
                  ...is used in calculating number of days since 1950 in T1950
                  ...subroutine (Y2K-FRD<901>).
 1999-01-07 RRP   ...Updated to display four digit year (Y2K-FRD<901>).
 2000-04-01 GMY  Fixed display of halfword data (AR 9059)
 2000-05-12 GMY  Fixed RADIUS count in .PDF.
 2000-05-13 GMY  Removed compiler errors on SGI and Linux.
 2000-05-26 GMY  Fix display of halfword when going from CZOOM=2 back to 'H.
 2000-06-12 GMY  Replace PARMTST1 with XVIPTST, replace UPRCASE w library vers.
 2002-01-02 VRH   ...Increase max image size to accomodate Cassini images
                  ...Make default FOV not Voyager specific
                  ...Add Cassini as a recognized Project
 2002-10-16 VRH  Fixed some compile warnings in LIMBFIT
                  ...Updated star catalog and GETSTARS to work on all platforms
                  ...New SAO catalog is sao_idl.str, no longer blocked
                  ...Star catalogs now contain star name and spectral type
                  ...For nearest star: name and type printed when cursored
                  ...Fixed time used for proper motion (T1950 call was gone)
                  ...Fixed T1950 routine, was calculating days from 1955
                  ...Upped maximum number of stars to 2000
                  ...Merged in bug fixes done at LPL 1989-1995
                  ...Added Diagonal and Smear plotting to PROFILE (LPL 1992)
                  ...Add more data to PHASE routine (LPL Mar 1, 94)
                  ...Added printout of S/C to central body (LPL May 10, 95)
                  ...Fixed bug in usage of CONVISOS in RINGFIT
                  ...Fixed Orbital Elements file code
                  ...ME for Rings now in ISYSTEM (B1950 or J2000) in MECALC
                  ...Use GETCAMCON instead of VGRCAM in EDITNAV CAMERA select
                  ...Fixed use of VGR BLEM files on unix (call VIC1LABX)
                  ...Update documentation and PDF
 2006-05-29 LWK  Convert SCLON read in from MP to East.  Fixed some minor bugs
                 causing build problems or crashes.
 2010-02-12 LWK  Changed "west" to "east" in Help text for SCLON and SUNLON.
                 Added line to Help file reminding users that NAV can't be
                 run in shell-vicar.
 2011-07-06 LWK  Added INIT_SPICE before call to PBDATA in routine SPICESUB, since
                 the new PBDATA needs SPICE kernels and the call to GETSPICE2 clears
                 the kernel pool on return.
 2016-02-18 WLB  Added enable/disable-log to tst*.pdf.


PARAMETERS:


INP

STRING -- REQUIRED Input image file name

SPICEMODE

Optional keyword Location of SPICE kernels (LOCAL or REMOTE)

CKNAME

Optional 4-char string C-kernel name

CKID

Optional 4-char string C-kernel ID

INSTITUTE

Optional 4-char string Facility which created camera pointing

PURPOSE

Optional 4-char string Purpose for camera pointing

REQNUM

Optional 4-char string IPL request number for created camera pointing

CDATE

Optional 12-char string Date and time camera pointing was created

GROUPID

Optional 3-char string Group which created camera pointing

FRAME

INTEGER - Image frame number.

CAMERA

INTEGER - Camera serial number

TARGET

STRING - Target name (e.g. GANYMEDE).

RES

STRING - Input reseau locations.

BLEMS

STRING - Input blemish location.

SAO

STRING - Input SAO or other star catalog

GSCPFX

STRING - Guide Star Catalog Prefix 1: & 2: are appended (VMS) 1/ & 2/ are appended (Eunuchs(tm)

OEF

STRING - Ring Orbital Elements File

NLW

INTEGER - Length of correlation window in pixels.

NSW

INTEGER - Width of correlation window in pixels.

NSEARCH

INTEGER - Search radius (pixels).

LIMB

Call Limbfit command processor

SCAN

KEYWORD - Scan the limb or ring

TRACE

KEYWORD - Trace the limb or ring

SCPTS

KEYWORD - Display computed points

SAPTS

KEYWORD - Display acquired high-contrast points

SBLEMS

KEYWORD - Display blemish locations

SRES

KEYWORD - Display reseau locations

CZOOM

INTEGER - Center display and zoom

H

KEYWORD - Display entire image

C

KEYWORD - Read cursor position

HIST

KEYWORD - Histogram of displayed image area

SPIKES

INTEGER - Number of spikes in histogram.

STRETCH

INTEGER - Stretch the displayed image

ASTRETCH

2 real values - Percentage saturation at low and high ends of the histogram.

GERASE

Erase graphics plane !CBTC

GCOLOR

Change graphics color (W,R,G,BLUE,C,M,Y,BLACK)

SBLEMS

KEYWORD--OPTIONAL Entering SBLEMS will display the locations of the camera blemishes (overlayed in graphics). The blemishes are automatically retrieved from blemish files located in WMS_VGR:[VGR1.NA], WMS_VGR:[VGR1.WA], and WMS_VGR:[VGR2], or the equivalent directories /project/vgr/vgr1/wa, /project/vgr/vgr1/na, and /project/vgr/vgr2 under Unix. The user may optionally specify the location of the blemish file via the BLEMS parameter. The program checks to ensure that the camera serial number associated with the file (as extracted from the label) matches the camera serial number associated with the image.

SRES

KEYWORD--OPTIONAL Entering SRES will display the reseau locations (overlayed in graphics). If the reseau has not been removed, this display will give an indication of how accurately the reseau has been located (and consequently the accuracy of the geometric correction).

OVERLAY

INTEGER - Draw latitude-longitude grid

LATI

REAL - Draw parallel at given latitude

LONG

REAL - Draw meridian at given longitude

RL

REAL - Convert from radius-lon to line-sample

LL

REAL - Convert from lat-lon to line-sample

LS

REAL - Convert from line-sample to lat-lon

EDIT

Edit navigation data

PARAMS

Edit processing parameters

RADIUS

REAL - Ring radius (km)

RING

STRING - ring name.

SRINGS

KEYWORD - Show ring system

PROFILE

KEYWORD - Plot radial or longitudinal profile of ring sector.

TYPE

STRING - R for radial profile and L for longitudinal.

RLIMITS

REAL - Starting and ending radial limits for sector (km).

LLIMITS

REAL - Starting and ending longitude limits for sector (degrees).

LWIDTH

REAL - Width in longitude of diagonal radial scan (degrees).

CP

KEYWORD - Cursor up a value on the displayed plot.

OUTPUT

STRING - Specify file name for output of profile to disc.

PHASE

KEYWORD - Output phase angles also to profile file

PLOT

KEYWORD - Redisplay plot that was erased by redisplay of image.

MASTER

STRING - Specify master C-matrix

ERING

KEYWORD - Edit orbital parameters

PLANE

STRING - ring plane name

INNER

Inner edge of ring

OUTER

Outer edge of ring

WIDTH

REAL - Width of ring (pixels)

STAR

KEYWORD - Invokes STARFIT routine.

HIMAG

INT - highest magnitude star displayed. !CBTC REAL - highest magnitude star displayed.

SSTARS

KEYWORD - Display starmap.

MSTARS

KEYWORD - Move (register) starmap.

RD

REAL - Right ascension and decilination.

CHI2

Solve for translation errors in camera pointing.

CHI3

Solve for translation and rotation errors in camera pointing.

DBUG

Cause diagnostic messages to be printed.

NODBUG

Suppress diagnostic messages (default).

GEODET

Use planetographic latitudes

GEOCEN

Use planetocentric latitudes

RB

REAL - Minor equatorial radius (km)

RC

REAL - Polar radius (km)

LORA

REAL - Longitude of RA (deg)

FL

REAL - Camera focal length (mm)

OAXIS

REAL - Optical axis intercept (line,sample) coordinates.

SC

REAL - Picture scale (pixels/mm)

SSP

REAL - Spacecraft position (lat,lon)

SOL

REAL - Sun position (lat,lon)

PC

REAL - Object-space planet-center (line,sample)

ISPC

REAL - Image-space planet-center (line,sample)

WAPC

REAL - Wide-angle object-space planet-center (line,sample)

WAISPC

REAL - Wide-angle image-space planet-center (line,sample)

ANGLN

REAL - North angle

RANGE

REAL - Spacecraft range

RLIM

REAL - Min and max ring radii (km)

TARGET

STRING - Target body name

SAVE

KEYWORD - Save navigation data

RESTORE

KEYWORD - Restore navigation data

GETSEDR

KEYWORD - Retrieve SEDR nav data

STATUS

KEYWORD - Print navigation data or processing parameters

SMAA

REAL - Semi-major axis of ring

ECC

REAL - Eccentricity of ring

INCL

REAL - inclination angle of ring plane

PIZERO

REAL - Longitude of periapse

OMEGZ

REAL - Longitude of ascending node

RA

REAL - Right ascension of planet's pole

DEC

REAL - Declination of planet's pole

THETA

REAL - Orientation of Earth's pole, 1977

ZETAZ

REAL - Orientation of Earth's pole, 1977

SCLAT

REAL - Sub spacecraft latitude in degrees.

SCLON

REAL - Sub spacecraft longitude in degrees east.

SUNLAT

REAL - Sub solar latitude in degrees.

SUNLON

REAL - Sub solar longitude in degrees east.

CENTLINE

REAL - Line of planet center.

CENTSAMP

REAL - Sample of planet center

RANGE

REAL - Distance from spacecraft to planet center in km.

FOCAL

REAL - Camera focal length. In mm.

SCALE

REAL - Camera scale. Pixels/mm.

NORTH

REAL - The north angle in degrees clockwise from east.

OALINE

REAL - Line of the camera optical axis.

OASAMP

REAL - Sample of the camera optical axis.

CLEAN

Clean bad points

SEF

for program development only

HELP

List available commands

EXIT

Exit from routine

See Examples:


Cognizant Programmer: