N7RAW.TXT - Format of Nimbus 7 R tape series data


                   OVERALL STRUCTURE
                   -----------------

*       Files are copies of our original R series tapes.

*       Data was originally stored in 12 bit 'words' and now occupies the
        12 least significant bits of a 16 bit word.
 
*       The byte ordering within 16 bit integers follows the DEC convention
        of least significant byte first.



                   DATA STRUCTURE
                   --------------

*       Data is blocked together, each block (i.e. external block/record)
        looking as follows:

     (     3654 sync code   (2 bytes indicating start of record)
     (     3654  "    "     ("   "       "        "   "    "   )
     (     Record length in words                      (2 bytes)
BLOCK(     Record serial number in "file"              (2 bytes)     
     (     Data records
     (     2321 end of block marker (eob)              (2 bytes)
     (     Checksum                                    (2 bytes)

*       Each internal data block/record itself contains

     (     3654 sync code   (2 bytes indicating start of record)
     (     3654  "    "     ("   "       "        "   "    "   )
     (     Length of record in words                   (2 bytes)
BLOCK(     Record serial number in "file"              (2 bytes)
     (     Data
     (     2321 end of block marker (eob)              (2 bytes)
     (     Checksum                                    (2 bytes)



               DATA RECORD (332 16 BIT INTEGERS)
               -----------

WORD       FUNCTION

1          3654 (7106 Octal) SYNC CODE repeated twice in every block
2          3654   "     "     "    "      "       "   "    "     "
3          Block length (Total number of words in block, all inclusive)
4          Block #
5          Playback orbit #               (15   bits)   See note (1)
6             "       "   "               
           Day                            (9    bits)   See note (1)
7          Start time of major frame      (17   bits)   See note (2)
8            "    "   "    "     "
           Segment # of p/b orbit         (5    bits)   See note (3)
           Sync summary bits              (2    bits)   See note (3)
9          Major frame number
10         Sync flags                     (160  bits)   See note (4)
24,25      s/c latitude                   (24   bits)   See note (5)
26,27      s/c longitude                  (24   bits)    "   "    "          
28         Altitude (km)                  (12   bits)    "   "    "
29         SAMS digital a experiment data (2400 bits)   See note (6)
229        SAMS analog hskg               (392  bits)   See note (7)
262        SAMS digital B                 (89   bits)    "   "    "
270        Spacecraft status and events   (192  bits)   See note (8)
286        ACS pitch fine error
           ACS foll fine error
           ACS rmp A indicated rate ni
           ACS rmp B indicated rate hi
329-330    [spare]
331        2321 (4421 Octal) EOB LAST FRAME FLAG   (2730 (5252 Octal) for last
                                                   record; ;last record of last
                                                   "file" will contain 3371
                                                   (6453 Octal)) 
332        Checksum   (least significant 12 bits of sum of words 1 to N-1 where
                      word N is the last word of the block; 1's complement
                      computation)



NOTES
-----

    Each "tape" will contain 'm' days data with 'n' orbits per day and 'o' major
frames per orbit.  The orbital data will be in ascending time order and will
have noise smoothed time.

    Time and/or the Playback Orbit Segment Numbers must be used for sorting the
data.


(1) Playback orbit number
    ---------------------

    This may be the same on several "files" of data.

    WORD: 5   BITS: 0-11 most significant bit (MSB)
          6         9-11 least significant bit (LSB)


    Day
    ---

    Computed from spacescraft time, runs from 1 through to 365.

              BITS: 0-8


(2) Major frame time
    ----------------

    The time will be integer seconds of day and will be ascending.

    Data will be set to all binary "ones" until good time is available.

    WORD: 7   BITS: 0-11 MSB
          8         7-11 LSB


(3) Segment number of playback orbit
    --------------------------------

    Ranges from 1 to 3 with 1 being the most recent data.

              BITS: 2-6    


    SYNC summary bits
    -----------------

              BIT:    0 - Sync Bit Slip Flag; set to 1 if one or more of the 80
                          minor frame bit slip flags is 1, otherwise set to 0.
              BIT:    1 - Sync Loss Flag; set to 1 if one or more of the 80
                          minor frame sync loss flags is set to 1, otherwise 0.

    Minor frames flagged "sync loss" will contain data from previous minor
frames.  See Note (4) below.


(4) SYNC flags
    ----------

    There are 80 bits allocated to the sync bit slip flags and 80 bits to the
sync loss flags, in pairs from minor frame 1 to 80.  Sync loss flag is followed
by sync bit slip flag.

    Two summary bits will indicate that at least one minor frame sync bit slip
flag is set or one sync loss flag is set within this major frame.  - See
Note (3) above.

    Major frames with the summary sync loss flag set should be handled as
follows:

Take the time difference between the last major frame before the major frame
with the sync loss flag set and the first major frame after without sync loss
flag set.  Determine the number of major frames which should have been
received.  Then,  

a) if this equals the number of major frames received, data not flagged sync
   loss can be assumed to be usable,

b) if it does not equal the number of received major frames, data is missing.

   Major frame times are not necessarily correct except for the following case:

       (i) The first major frame with sync loss flagged data after a
           major frame without the flag set - the data from minor
           frame 79 back to the first minor frame in which the sync
           loss flag is set is valid.

           (Remaining data to be processed at the discretion of the
           User.)

           If all 80 individual minor frame sync loss flags are set
           the frame contains data from two or more major frames.
           (-  This data should only processed at the discretion of
           the User.)

        
(5) Predicted orbital ephemeris data
    --------------------------------

    Data will contain an implied decimal point:

Latitude and Longitude -

              BIT: 23         18       15      12       9      6      3      0
                   S X X   X X X   X X X   X. X X   X X X  X X X  X X X  X X X

Altitude -
              BIT: 11          6       3       0
                   S X X   X X X   X X X   X X X

    The S (Sign) Bit will be set to "+" for Northern and "-" for Southern
Latitudes. "1" is negative, "0" is positive.  The longitude and altitude will
always be positive.  Longitude will be 0 to 360 degrees East.

    Data will to set to all binary "ones" if initial time is not available,
until good time is available.


(6) Digital A experiment data
    -------------------------

    Data will be output as 10 bit 'words'.


(7) SAMS analog and digital B housekeeping
    --------------------------------------

    The Analog and Digital B Housekeeping data will be in separate blocks.
Within each block the data will be ordered; first by function number order and
then all samples of each function in time order.

    All Analog functions will be output as 8 bit 'words'.

EXAMPLES:     ANALOG FUNCTIONS      NO. OF SAMPLES
              ----------------      --------------
                   12101               1  ( = 1 8-bit 'word')
                   12102               1  ( = 1 8-bit 'word')
                     .                 .
                     .                 .
                     .                 .
                   12110               16 in time order ( = 16 8-bit 'words')

              DIGITAL FUNCTIONS     NO. OF SAMPLES
              -----------------     --------------
                   12001               3  in time order ( = 3  bits)
                   12002               3  in time order ( = 3  bits)
                     .                 .
                     .                 .
                     .                 .
                   12018               16 in time order ( = 16 bits)
                   12019               16 in time order ( = 16 bits)
                   12020               3  in time order ( = 3  bits)
                   12021               3  in time order ( = 3  bits)

--------------------------------------------------------------------------------
Function Number Listing.

FUNCTION #   FUNCTION NAME                         FORM*    RATE
--------------------------------------------------------------------------------
12001        Power on/off                          DB       3/16
12002        Limb scan drive on/off                DB       3/16
12003        Azimuth scan drive on/off             DB       3/16
12004        Launch mode on/off                    DB       3/16
12005        PCL auto/man                          DB       3/16
12006        PCL memory verify/normal              DB       3/16
12007        PCL memory B/memory A                 DB       3/16
12008        Cooler door shut/open                 DB       3/16
12009        Upper limb scan limit yes/no          DB       3/16
12010        Lower limb scan limit yes/no          DB       3/16
12011        Forward azimuth scan limit yes/no     DB       3/16
12012        Backward azimuth scan limit yes/no    DB       3/16
12013        BB out of fov yes/no                  DB       3/16
12014        BB in fov yes/no                      DB       3/16
12015        Serial data cmd ena/dis               DB       3/16
12016        Standby mode yes/no                   DB       3/16
12017        PCL busy yes/no                       DB       3/16
12018        Azimuth forward sector yes/no         DB       1/1
12019        Azimuth backward sector yes/no        DB       1/1
12020        A 2/3/4 heater on/off                 DB       3/16
12021        B1 gain low/high                      DB       3/16

12101        M1 mirror temp                        A        1/16
12102        M2 mirror temp                        A        1/16
12103        Limb LVDT temp                        A        1/16
12104        Azimuth LVDT temp                     A        1/16
12105        A 2/3/4 detector temp (warm)          A        1/16
12106        BB motor temp                         A        1/16
12107        Limb motor temp                       A        1/16
12108        Azimuth motor current                 A        1/16
12109        Sensor foot temp                      A        1/16
12110        Mirror position register              A        1/1
12111        Sensor elect temp A                   A        1/16
12112        Sensor elect temp B                   A        1/16
12113        Bay module A temp                     A        1/16
12114        Bay module B temp                     A        1/16
12115        A 2/3/4 lens temp (cold)              A        1/16
12117        B1 Detector radiator temp             A        1/16
12118        F/T Thermister bias voltage           A        1/16
12119        Power supply volts                    A        1/16
12120        A 1/2 sieve heater current            A        1/16
12121        A 3 sieve heater current              A        1/16
12122        A 4 sieve heater current              A        1/16
12123        B 1/2 sieve heater current            A        1/16
12124        C1 sieve heater current               A        1/16
12125        C2 sieve heater current               A        1/16
12126        C3 sieve heater current               A        1/16
12127        Mirror azimuth position               A        1/16
12128        Synch error                           A        1/16
12129        Parity error                          A        1/16
12130        Overvoltage trip                      A        1/16
12131        Limb scan drive auto/man              A        1/16
12132        Manual BB out                         A        1/16
12133        Cooler door release 1 on/off          A        1/16
12134        Cooler sun shield temp                A        1/16

             Digital data                          DA       5/1
             Digital data                          DA       5/1
             Digital data                          DA       5/1
--------------------------------------------------------------------------------


* Form of function:   A  = Analog
                      DA = Digital A 
                      DB = Digital B



    The Analog and Digital B information will be arranged on the "tape" with the
format that follows.

ANALOG SAMPLES:

     MSB                                                             LSB
BIT: 11    10    9     8     7     6     5     4     3     2     1     0

      _______________________________________________________________________
     | First analog function/sample                  | MSB of sample #2      |
     |_______________________________________________|_______________________|
     | LSB of sample #2      | 3rd function/sample                           |
     |_______________________|_______________________________________________|
     | 4th function/sample                           | etc.                  |
     |_______________________________________________|_______________________|

DIGITAL SAMPLES:

    DB1               no. of samples - 51
    DB2                              - 32
    DB3                              -  6
    spare                            -  7


(8) SPACECRAFT STATUS AND EVENTS
    ----------------------------

    Spacecraft status and events are listed in the table below.

    Where Digital B functions are used for status, all (3) samples will be used.
Where an event flag is used, 3 bits will be used to indicate state.

--------------------------------------------------------------------------------
NO.   FUNCTION/EVENT #   DESCRIPTION                 BIT/STATE (1/0)
--------------------------------------------------------------------------------
1     EV-27              Satellite day/night         day(=1)/night(=0)
2     FN-6601            TLM pwr on/off              on/off
3     FN-16001           DSAS pwr on/off             on/off
4     FN-22008           IR zip/dip to tr1           zip/dip
5     FN-22009           IR zip/dip to tr2           zip/dip
6     FN-22010           IR zip/dip to tr3           zip/dip
7     FN-18006           TR1 power on/off            on/off
8     FN-18036           TR2 power on/off            on/off
9     FN-18056           TR3 power on/off            on/off
10    (SPECIAL EVENT)    Xponder A/B power           0=both off, 1=A on, 
                                                     2=B on, 3=both on
11    FN-19002           Xponder ranging A           on/off
12    FN-19006           Xponder ranging B           on/off
13    FN-7160            WB Xmtr A pwr               on/off
14    FN-7260            WB Xmtr B pwr               on/off
15    FN-7165            WB Xmtr A/B selected        A/B
16    FN-8001            CZCS channel 1 pwr          on/off
17    FN-8002            CZCS channel 2 pwr          on/off
18    FN-8003            CZCS channel 3 pwr          on/off
19    FN-8004            CZCS channel 4 pwr          on/off
20    FN-8005            CZCS channel 5 pwr          on/off
21    FN-8006            CZCS channel 6 pwr          on/off
22    FN-8007            CZCS elect. pwr             on/off
23    FN-8008            CZCS scan drive             on/off
24    (SPECIAL EVENT)    CZCS cal lamp status        0=both off, 1=1 on, 
                                                     2=2 on, 3=unknown
25    SPECIAL EVENT      CZCS recording CZCS data    yes=1/no=0
26    SPECIAL EVENT      Real time data collection   yes=1/no=0
27    EV-72              THIR status                 O=off, 1=rad on,
                                                     2=all on, >= 3=fail
28    FN-11001           LIMS elect                  on/off
29    FN-11004           LIMS adapt screen           on/off
30    FN-11005           LIMS ACQ scan               on/off
31    FN-11006           LIMS calib space            yes/on
32    FN-11007           LIMS source calib           yes/on
33    FN-12001           SAMS power                  on/off
34    FN-12002           SAMS limb scan drive        on/off
35    FN-12003           SAMS azimuth scan drive     on/off
36    FN-13001           SBUV/TOMS master power      on/off
37    FN-13002           SBUV pwr enable             enb/dis
38    FN-13005           SBUV step scan              set/reset
39    FN-13006           SBUV continuous scan        set/reset
40    FN-13007           SBUV cage cam               set/reset
41    FN-13008           SBUV/TOMS wavelength cal    set/reset
42    FN-13009           TOMS pwr enable             enb/dis
43    FN-13020           SBUV/TOMS elect cal         on/off
44    SPECIAL EVENT      SBUV/TOMS frame counter
                         (First in Time)
45    SPECIAL EVENT      SBUV/TOMS frame counter
                         (Second in Time)
46    FN-14001           ERB elect                   on/off
47    FN-14002           ERB scan                    on/off
48    FN-14011           ERB stepper driver          off/no
49    FN-14016           ERB chopper operating       yes/no
50    FN-15001           SMMR data system            on/off
51    FN-15002           SMMR channel 1 pwr          on/off
52    FN-15003           SMMR channel 2 pwr          on/off
53    FN-15004           SMMR channel 3 pwr          on/off
54    FN-15005           SMMR channel 4 pwr          on/off
55    FN-15006           SMMR channel 5 pwr          on/off
56    FN-15007           SMMR scan power on/off      on/off
57    FN-17001           SAM II power                on/off
58    FN-17015           SAM II standby              on/off
59    FN-17014           SAM II scan mode            on/off
60    FN-17013           SAM II slew code            on/off
61    FN-17012           SAM II gimbal code          on/off
62     -                 Spare                        -
63     -                   "                          -
64     -                   "                          -
--------------------------------------------------------------------------------


ACS Functions.
-------------

--------------------------------------------------------------------------------
FUNCTION #   FUNCTION NAME                         FORM*    RATE
--------------------------------------------------------------------------------
1112         Pitch fine error                      A        1/1
1122         Roll fine error                       A        1/1
1169         Rmp A indicated rate (hi res)         A        1/1
1179         Rmp B Indicated rate (hi res)         A        1/1
--------------------------------------------------------------------------------


* FORM OF FUNCTION:   A  = ANALOG
                      DA = DIGITAL A 
                      DB = DIGITAL B

    The ACS functions included in the output block will be arranged by function
number order, and all samples of that function in time order.  (See SAMS Analog
Housekeeping paragraph for greater detail of the data arrangement.)

    Pitch bias (if used) will be indicated on pitch fine error telemetry.

    Most of the information in this document has been selected from the raw data
format given in NIMBUS G Document #NG-32.  See this document for other details
if required. 

********************************************************************************
The following notes were made when the original magnetic tapes were copied to
optical disk.


1)   Playback orbit numbers -

     Although they should be consecutive (give or take a couple of numbers),
     this is not always the case.  The very improbable-looking numbers are being
     attributed to human error because they were actually manually inputted, and
     no checksum errors occurred during our copying (impling that the data is
     correct). 

2)   Day numbers -  

     On the whole these are sensible.  There are some unexplainable "day 0"s
     however which only last a few major frames at a time, at the most.

3)   Times -

     (i)   negative times

           The correct manipulation of long and short integers initially caused
           a problem in calculations when crossing the 32767 integer*2 boundary
           and hence the appearance of negative time values in logfiles.  The
           data copied from magnetic tape was not affected in any way.  
           This is the case for all R Series tapes from R00000 to R00050,
           inclusive.

     (ii)  zero time values

           It is being assumed that major frames did sometimes have start time
           values of zero seconds.  (- There are no errors flagged to indicate
           corrupt data.)

           The log files for R00051 and R00052 show zero times all the way
           through.  This is due to incorrect buffer input and hence incorrect
           calculations.  All data written to the virtual tape files is however
           correct.

4)  	   Several parity errors occured on tape R00148 and as a result of this 
           we were unable to obtain any data after day 23.

5)	   Several parity errors occur towards the end of tape R00171.