sedr2asc User's Guide
===========================================================================
General Info:
===========================================================================

The sedr2asc program is used to extract data from the PDS Archive CD-ROM's
containing the Pioneer Venus Orbiter (PVO) Supplemental Experimenter Data 
Record (SEDR) dataset. The program is written in the C programming language 
and will compile using either the Gnu C Compiler (2.3) with the 
"-traditional" option or the sun C compiler version 3.1.

The original PVO SEDR tapes contained 6 files per orbit (logical header,
pulse time, spin period, selected roll reference, attitude, and ephemeris).
This program can extract any of these files and either display the data to 
the screen or output data to an ASCII file on the local system. In addtion 
to the basic 6 files, this program can extract data identical to the 
ephemeris dataset submitted by the Magnetometer instrument team or it can
output the matrix which rotates from Inertial Spacecraft 
Coordinates to Venus Solar Orbital coordinates. Please see the coordinate 
system description text on the CD-ROM for definitions of these coordinate 
systems. 

===========================================================================
Usage 
===========================================================================

The program is command-line driven. All options to the program are given
at run-time in the same command that executes the program. All options, except
colfile are required!!!

Usage:

sedr2asc [infile=AAA] [outfile=BBB] [host=CCC] [filetype=DDD] (colfile=EEEEE)
 
  Options:

      infile:     The complete name including path to the input data file.
      outfile:    The name of the output file or "-" for output-to-screen.
      host:       The type of host system you are working on. 
                   VALID:  sun, SUN, IBM, HP, MSB (MicroSoft DOS), PC (IBM DOS)
      filetype:   The type of input file.
                   VALID:  PULSE, SPIN, EPHEM, LOGISTIC, SEL_ROLL, ATTITUDE,
                           MAG_EPHEM, SC2VSO_MAT
      colfile:    An ASCII file containing a list of column (numbers) to be
                  extracted from the "ephemeris" dataset. This file contains
                  1 column number per line.

===============================================================================
Examples
===============================================================================

For all usage examples, we will assume a Sun computer with a 
CDROM mounted at "/cdrom".

--------------------------------------------------------------
                         Example 1:
--------------------------------------------------------------
Extract an ephemeris data file for orbit 291 to the file "mydata.asc"

sedr2asc infile=/cdrom/DATA/EPHEM/ORB0201/EP0291.DAT outfile=mydata.asc 
host=sun filetype=ephem

--------------------------------------------------------------
                         Example 2:
--------------------------------------------------------------
Extract the list of columns specified in the file "ephem_cols.asc" from
the ephemeris data file for orbit 291 to the file "mydata.asc"

sedr2asc infile=/cdrom/DATA/EPHEM/ORB0201/EP0291.DAT outfile=mydata.asc 
host=sun filetype=ephem colfile=ephem_cols.asc

--------------------------------------------------------------
                         Example 3: 
--------------------------------------------------------------
Extract a spin period data file for orbit 363 to the screen

sedr2asc outfile=- host=sun filetype=spin
infile=/cdrom/DATA/SPIN/ORB0301/SP0363.DAT 

--------------------------------------------------------------
                         Example 4: 
--------------------------------------------------------------
Extract a spacecraft attitude data file for orbit 341 to the screen

sedr2asc filetype=attitude infile=/cdrom/DATA/ATTITUDE/ORB0301/AT0341.DAT
outfile=- host=sun 


--------------------------------------------------------------
                         Example 5: 
--------------------------------------------------------------
Extract a pulse time data file for orbit 241 to an ASCII file

sedr2asc filetype=pulse infile=/cdrom/DATA/PULSE/ORB0201/PT0241.DAT 
host=sun outfile=mydata.asc 



As you can see the order in which options are given is not important. The
software only requires that all options be fully specified. It is also
clear that the path to the input file is tiresome to type each time. 
The user can get around this problem by defining a logical name to the 
path: Here is the systax:

set CDDATA=/cdrom/DATA

which allows user to simply access any directory beneath /DATA or

set SP300=/cdrom/DATA/SPIN/ORB0300

which provides a shorter path that can only access spin period files from
orbit 300-399.
--------------------------------------------------------------
                         Example 6: 
--------------------------------------------------------------
Repeat example 2 using the first new logical name we have created

sedr2asc infile=$CDDATA/SPIN/ORB0300/SP0363.DAT outfile=- host=sun filetype=spin

--------------------------------------------------------------
                         Example 7: 
--------------------------------------------------------------
Repeat example 2 using the second new logical name we have created

sedr2asc infile=$SP300/SP0363.DAT outfile=- host=sun filetype=spin

==============================================================================
                     SEDR2ASC: Installation Guide
                     =============================
 
The source code of SEDR2ASC comes in the following three files:
 
        Makefile
        sedr2asc.c
        sedr.h
 
To install SEDR2ASC you must have the following libraries on your system:
 
        binary  -  Binary Conversion library
        parserc -  Command parser library
	pipec   -  DFS pipeline library
        miscc   -  Miscellaneous library
 
If you get this software in a tarfile, then you must extract the above 
files using the "tar" command.  See the manual pages for the tar command 
for further information.  Otherwise, you can obtain them by anonymous ftp 
from:  "ftp.igpp.ucla.edu" in pds/SOFTWARE.

                     *** INSTALLATION ****

If you are using a Sparc Station running SOLARIS then you can use
the executable SOFTWARE/SOLARIS/SEDR2ASC already supplied.

If you are using a Sparc Station running SunOS 4.x then you can use
the executable SOFTWARE/SUNOS/SEDR2ASC already supplied.

If you are using a HP machine running UNIX then you can use
the executable SOFTWARE/HPUX/SEDR2ASC already supplied.

If you are using a PC running DOS then you can use
the executable SOFTWARE/DOS/SEDR2ASC.EXE already supplied.

Other users:
1)  Copy the approriate MAKE_CONF.??? and MAKE_LIBS.??? files to Make.conf
and Make.libs, respectivly.

    Your System           Use                                  Copy to
   ==========================================================================
     PC                   MAKE_CONF.PC  & MAKE_LIBS.PC     \
     HPUX                 MAKE_CONF.HPUX & MAKE_LIBS.HPUX   \  Make.conf &
     SUN4.X               MAKE_CONF.SUN4X & MAKE_LIBS.SUN4X  / Make.libs
     SUN/SOLARIS 2        MAKE_CONF.SOL2 & MAKE_LIBS.SOL2   /

2) Make any changes to the Make.conf and Make.libs files if necessary
   (i.e. the type of C compiler you are using (cc, gcc, etc), where you want
   the executable to go, etc.)

3) Set the DFSHOME environment variable to the path leading to and including
   the directory SEDR2ASC (created as the base of the tar extraction)
   ex. prompt>> setenv DFSHOME /usr/software/tools/SEDR2ASC

4) In the SEDR2ASC directory just created issue command "make".
   ex. prompt>> make


NOTE:  Depending on your compiler, warnings make appear when compiling the
       program. These can be ignored.

-----------------------------------------------------------------------
      Copyright(c) 1993 Regents of the University of California
      All rights reserved.
 
   Redistribution and use in source and binary forms are permitted
   provided that the above copyright notice and this paragraph are
   duplicated in all such forms and that any documentation,
   advertising materials, and other materials related to such
   distribution and use acknowledge that the software was developed
   by the University of California, Los Angeles.  The name of the
   University may not be used to endorse or promote products derived
   from this software without specific prior written permission.
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------