 
 
Viking Orbiter 1 Corrected Image Times DBK File
===========================================================================
 
     Created by Boris Semenov, NAIF/JPL, March-July, 1996; comments were
     augmented/reformatted in April 2000.
 
 
File Contents
--------------------------------------------------------
 
     This SPICE Data Base Kernel (DBK) contains the results of VO image
     time tags accuracy and reliability analysis, including an attempt to
     correct some of these tags.
 
 
Applicability
--------------------------------------------------------
 
     This file can be used to obtain original SEDR or corrected (by NAIF)
     time tag of an individual VO1 camera image by searching for time tags
     that correspond to the image FSC.
 
 
Data Table Structure
--------------------------------------------------------
 
     This file contains a single table called ``RECONSTRUCTED_VO1_TIMES''
     which has the following columns:
 
           IMAGE_NUMBER              INT    FSC count (or "image number")
                                            corresponding to a VO1 camera
                                            image;
 
           SEDR_TIME                 TIME   time of the image from the
                                            original VO SEDR data set
                                            generated by the Viking
                                            Project;
 
           RECONSTRUCTED_TIME        TIME   corrected time of the image;
 
           SEDR_RECNSTR_DIFFERENCE   DP     difference between original and
                                            corrected times;
 
           QUALITY_FLAG              CH*4   flag specifying level of
                                            confidence in the corrected
                                            time (GOOD or POOR);
 
     The SEDR_TIME and RECONSTRUCTED_TIME columns are of ``TIME'' type,
     i.e. store the time as Ephemeris Time in seconds past J2000. The
     SEDR_RECNSTR_DIFFERENCE column contains DP number of seconds which is
     the difference between original and reconstructed times.
 
 
Analysis and Correction Process Description
--------------------------------------------------------
 
         1.   Time tags were extracted from the Supplemental Experiment
              Data Record (SEDR) files generated by the Viking Project
              during the mission. In the SEDR they were stored in UTC
              day-of-year format with three digits after the decimal point
              in the seconds field. These tags were filtered to exclude
              duplicate and "bad" tags. Here "bad" means that some tags
              were corrupted and couldn't be interpreted correctly as UTC
              times.
 
         2.   Assuming that the SEDR time tags correspond to middle of
              exposure time, these times were modified to correspond to the
              beginning of the Frame Start Count (FSC) tick. The FSC tick
              was a time interval during which the sequence of actions need
              to take every single picture was executed. The nominal
              duration of one FSC tick was 4.48 seconds. The picture was
              usually taken closer to the end of the interval (for long
              exposure pictures it was at the middle of the interval).
              Since only one picture could be taken during one FSC tick,
              each VO images was tagged with the corresponding FSC count.
              The actual time of the picture can be calculated from the
              tick start time and exposure duration using the following
              algorithm described in "Applied Optics" magazine, Vol. 16,
              No. 12, December 1977:
 
                 ET_MID_EXP = ET_FSC + OFFSET_1 + OFFSET_2 + EXPOSURE / 2
 
              where:
 
                 ET_MID_EXP - ET of the middle of exposure
                 ET_FSC     - ET of the start of the FSC tick
                 OFFSET_1   - time offset depending on exposure duration
                 OFFSET_2   - constant small time offset
                 EXPOSURE   - exposure duration
 
              The time offset constants in the equation above are:
 
                 OFFSET_1 =  7/8 * NOMINAL_TICK  if EXPOSURE <= 0.42 sec.
                 OFFSET_1 =  3/8 * NOMINAL_TICK  if EXPOSURE >  0.42 sec.
                 OFFSET_2 = 1/64 * NOMINAL_TICK
 
              where:
 
                 NOMINAL_TICK - nominal duration of 1 FSC tick (4.48 sec)
 
              The figures below illustrate this algorithm for short and
              long exposure images:
 
                 SHORT EXPOSURE IMAGES (<= 0.42 SECONDS):
                 ---------------------------------------
 
                 ET_FSC                                     ET_MID_EXP
                    |                                            |
                    |                                            |
                 ---*-----'-----'-----'-----'-----'-----'-----'--*--|---
                    |                                EXPOSURE | | | |
                    |                              ------------>| |<---
                    |                             OFFSET_2    | |   |
                    |                           ------------->| |<----
                    |               OFFSET_1                  |     |
                    |<--------------------------------------->|     |
                    |                    NOMINAL_TICK               |
                    |<--------------------------------------------->|
 
 
                 LONG EXPOSURE IMAGES (> 0.42 SECONDS):
                 --------------------------------------
 
                 ET_FSC                     ET_MID_EXP
                    |                            |
                    |                            |
                 ---*-----'-----'-----'-----'----*'-----'-----'-----|---
                    |                 | |     EXPOSURE    |         |
                    |                 | |<--------------->|         |
                    |     OFFSET_2    | |                           |
                    |   ------------->| |<----                      |
                    |    OFFSET_1     |                             |
                    |<--------------->|                             |
                    |                    NOMINAL_TICK               |
                    |<--------------------------------------------->|
 
              Using this algorithm, the calculation of ET_FSC, the time of
              the start of the corresponding FSC tick, from ET_MID_EXP, the
              middle of exposure time stored in SEDR file, could be easily
              performed. The values of the exposure durations were also
              taken from SEDR files.
 
         3.   For each FSC count the "nominal" ET time for its start, i.e.
              the ET time that would correspond to a tick start if the FSC
              counter would run at a constant nominal frequency throughout
              the mission, was calculated in the following way:
 
                 ET_FSC_NOMINAL = ET_INITIAL +
                                  (FSC - FSC_INITIAL) * NOMINAL_TICK
 
              where:
 
                 FSC            - FSC of each SEDR record, for which the
                                  "nominal" ET is calculated,
                 FSC_INITIAL    - FSC of the initial point (earliest image
                                  registered in the SEDR),
                 ET_INITIAL     - ET of the initial point,
                 ET_FSC_NOMINAL - "nominal" calculated ET for each FSC,
 
              The starting FSC point (FSC_INITIAL) was set to the FSC for
              the first (earliest) image available in the SEDR file.
 
         4.   The difference between "real" and "nominal" ET for each FSC
              was calculated in the following way:
 
                 DIFFERENCE = ET_FSC - ET_FSC_NOMINAL
 
         5.   This difference was plotted for the mission duration. For VO1
              these plots illuminated several interesting things:
 
                 -- the DIFFERENCE was constantly growing through the
                    mission which means that "real" FSC clock was running
                    slower (thus its tick is longer) that "nominal" FSC
                    clock. This can be explained by the fact the real
                    oscillator speed cannot absolutely equal to "nominal"
                    and may have constant offset from it. Also the
                    relativity makes clock "flying" at high speed run
                    slower that clock on the ground;
 
                 -- the real clock speed was not constant during the
                    mission. In general three intervals could be seen:
                    first half of the primary mission (tick duration
                    ~4.4800018 seconds), second half of the primary
                    mission (tick duration ~4.4800009 seconds) and the
                    extended mission (tick duration ~4.4800011 seconds).
                    The speed during the first interval seemed be smaller
                    than for the second and third intervals. Maybe this
                    was caused by switching between prime and backup
                    spacecraft clocks?
 
                 -- during some time intervals for some orbits the
                    difference was a "noisy" kind of function instead of
                    straight line. That means that time tags on these
                    orbits have relatively big offsets from the average
                    difference value for that orbit. The reason for these
                    is a mystery.
 
                 -- time tags on some orbits deviated from straight line
                    function by a few tenths and sometimes even a few
                    seconds. This performance is also a mystery.
 
                 -- it was seen that the straight line fit, even on the
                    "good" intervals, is not continuous. After some period
                    of continuity it "jumped" up or down by a few tenths
                    of a second and went continuously until the next
                    jump. This kind of behavior usually happens when a
                    clock has "resets" during the mission, but confirmation
                    of such resets on VO1 wasn't found in the project
                    data sets that were processed in this work.
 
              To illustrate the behavior of "real" tags, additional plots
              were made for a few arbitrarily chosen orbits at different
              times during the mission. These plots showed that:
 
                 -- for some orbits (mostly at the beginning and the
                    middle of the primary mission and during the extended
                    mission) differences for time tags of images are
                    within 1 millisecond of the average difference for
                    the orbit. This 1 millisecond "error" could be
                    introduced by truncation of the UTC time to
                    milliseconds.  This "constant" difference for an
                    orbit makes good physical sense -- the mapping
                    sessions were very short in duration, about 100-200
                    FSC ticks (less than 1000 seconds). Taking onto
                    account that difference between the speeds of the
                    "real" and "nominal" FSC clocks was a maximum of
                    0.000002 sec/tick we see that maximum drift of "real"
                    clock relative to "nominal" clock during one orbit
                    will be less than 0.5 millisecond which cannot be
                    seen with one millisecond UTC tag accuracy.
 
                 -- a different situation existed for other orbits, mostly
                    at the very beginning and at the end of primary
                    mission. For these orbits the "real"-"nominal" ET
                    difference range could be hundredths or even tenths of
                    a second. The points on the plots were not distributed
                    randomly but rather located on two or more different
                    levels which suggests that only one of these "levels"
                    is correct and all points which are not on this level
                    have time tag errors. Unfortunately it was hard to
                    decide which of the "levels" represented the correct
                    value.
 
         6.   From all the above discussion it becomes clear that time tags
              for some images (and even series of images) are erroneous --
              for example, for the tags which are off by a second or more
              during the "good behavior" intervals of the difference
              function. To "correct" these tags and also to try to improve
              tags which have smaller errors, an approximation of the
              difference was made by a linear piecewise function. The
              result is formatted as a SPICE SCLK file (one for each
              spacecraft). The steps used in this process are described
              below.
 
              First, the average difference for each orbit was calculated.
              Because of strange function behavior for some orbits
              (described above) the calculation of "plain" average
              (summation of values divided by number of values for one
              orbit) could introduce additional error and difficulties
              during interpolation. Therefore, the "average" value for each
              orbit was calculated as the value corresponding to a "level"
              containing the greatest number of points.
 
              None of the linear approximation algorithms looking for end
              of linear piece intervals worked well on this "average"
              difference function. So it was plotted in a large scale and
              reasonable ends of the intervals were found manually with
              ruler and pencil. The first iteration gave 27 linear
              intervals; this number increased to 31 after some iterations.
              The criteria to start a new interval were the following: if a
              few tenths of a second "jump" occurred and if the slope of
              the line changed significantly. After more than 5 iterations
              in this process, each of which combined testing the results
              of the previous iteration and correcting the coefficients
              based on the result of the test, a linear piecewise function
              providing close (within 1-2 milliseconds) approximation was
              generated. It provides a good fit for the intervals where
              time tag "behavior" during orbits was normal, and a
              reasonable approximation for other intervals.
 
         7.   For each of the SEDR times and the corresponding
              "reconstructed" times, their difference, and a flag
              identifying the interval (GOOD quality tags or POOR quality
              tags) were found. These values were written to a DBK file.
              This function was also formatted as a SPICE SCLK file
              reconstructing on-board FSC clock.
 
 
Time Tags and Approximation Quality Statistics
--------------------------------------------------------
 
     The tables below gives an idea about quality of a VO1 time tags and,
     correspondingly, the approximation for a different intervals during
     the mission.
 
          interval  start      stop    time tag
           number    FSC        FSC    quality
           ----------------------------------------
              1   25837050   26068841    poor
              2   26068841   26481992    GOOD
              3   26481992   27406171    poor
              4   27406171   29204603    poor
              5   29204603   31392767    poor
              6   31392767   32233616    GOOD
              7   32233616   33410000    GOOD
              8   33410000   33924780    poor
              9   33924780   35672722    poor
             10   35672722   36703660    poor
             11   36703660   37340633    poor
             12   37340633   38054766    GOOD
             13   38054766   38996669    GOOD
             14   38996669   39516735    GOOD
             15   39516735   40501750    GOOD
             16   40501750   41286989    GOOD
             17   41286989   42269975    GOOD
             18   42269975   43316542    poor
             19   43316542   43733568    poor
             20   43733568   44181868    poor
             21   44181868   46158780    poor
             22   46158780   49117882    GOOD
             23   49117882   50003708    GOOD
             24   50003708   50099895    GOOD
             25   50099895   50196079    GOOD
             26   50196079   50446330    GOOD
             27   50446330   51830000    GOOD
             28   51830000   52359442    GOOD
             29   52359442   53205980    GOOD
             30   53205980   53752833    GOOD
             31   53752833   85837049    GOOD
 
 
Usage Note
--------------------------------------------------------
 
     The Data in this file may accessed via SPICE Toolkit EK subroutines or
     examined using SPICE utility program INSPEKT.
 
 
Related Kernels
--------------------------------------------------------
 
     An LSK file is required by INSPEKT in order to access the data in this
     file.
 
     The DBK file ``VO1_TIME.BDB'' contains all variants of Viking Orbiter
     1 (VO1) camera image time tags that have been collected by NAIF from
     different science groups involved in VO image cartographic
     application, can be used to correlate other data sets with this data.
 
     The VO1 ``FSC'' SCLK ``VO1_FSC.TSC'' file containing linear
     approximation function that was the result of the reconstruction
     effort described above can be used to compute UTC/ET time for FSC
     counts other than those associated with the camera images and
     registered in this DBK file.
 
 
Contacts
--------------------------------------------------------
 
     If you have any question regarding this data contact NAIF at JPL:
 
        Charles H. Acton, Jr
        (818)-354-3869
        chuck.acton@jpl.nasa.gov
 
        Boris V. Semenov
        (818)-354-8136
        boris.semenov@jpl.nasa.gov
 
 
