Appendix B: Acquisition Notes

This section contains problems and idiosyncrasies about the acquistion of AVHRR data with EDC's acquisition software and hardware combination.

Bad Pass

Problems occurred when acquiring from HDT. When ACQUMAN detects a frame sync pattern error, it drops the frame. If it detects 10 consecutive frame sync pattern errors, it resets the 760 interface, which may take several seconds. During the time of the reset, several more frames will be missed. Because of the large number of frames missed during the 760 reset, ACQUMAN ran into the next files on the tape looking to satisfy its need to receive 2700 frames. Because the timestamps of the frames read from the next files on the tape were previous to the timestamps of the last two valid frames, ACQUMAN dropped these frames also. ACQUMAN would have stopped if it had encountered timestamps after the designated stop time, but it encountered end-of-tape first.

Several problems exist within acquire:

DROPLINES

This section outlines how ACQUMAN determines which frames to drop when out of sequence timecodes are encountered. The examples reference the following frames:

            -------------------------
            |       |       |       |
            |   A   |   B   |   C   |>>>>>>>>>>>>>>>>>
            | (n-2) | (n-1) |  (n)  |
            -------------------------

Where A was received before B which was received before C. Under normal conditions, the timecodes of these frames will be in the same sequence as the order in which the frames were received. In cases where this is not true the follow will be done:

  1. If frame n has bad sync
    then drop frame n
  2. If frame n timecode < frame n-2 timecode
    and frame n-2 timecode > timecode of last scheduled frame
    then drop frames n-1 and n-2
  3. If frame n timecode < frame n-2 timecode
    then drop frame n
  4. If frame n timecode < frame n-1 timecode
    then drop frame n-1
  5. If frame n-2 timecode > (frame n timecode - 500 milliseconds)
    and frame n-1 was good
    and last four frames were the same day of year
    and timecode of last scheduled frame < frame n-2 timecode
    then frame n is after stoptime, drop it and quit

SUSPEND

Pass acquisition using the Fairchild 760 buffered data channel interface is by definition a real-time process. Acquire starts data flow by issuing a cyclic I/O request at the beginning of the pass. After that request, acquire must keep up with the filling of the 4 buffers by writing the contents of each buffer to a disk file. Since 4 buffers are used, acquire may get behind by 1 or 2 buffer reads, but more of a delay would cause missed data.

I/O contention could cause a problem between the 760 and memory or between memory and disk. The 760 controller and the other UNIBUS controllers are connected to a UNIBUS adapter which resides in the first (highest priority) slot on the BI bus. All traffic on the UNIBUS, including interrupts and DMA transfers must take control of the UNIBUS and the BI bus, which preempts the CPU and disk controllers. Unfortunately, the UNIBUS adapter implementation on the VAX 8200 places an unusually high load on the BI bus. According to our DEC field service engineer, DEC built the BI to UNIBUS adapter as a temporary measure until more BI interfaces became available, and it is very inefficient.

CPU contention could prevent acquire from keeping up with the filling of the cyclic buffers. This contention could be caused by:

During the first few weeks of production on the ADAPS system, it was noticed that system load was causing dropped lines. After studying this problem, it was found that both I/O and CPU contention were causing acquire to miss data. The I/O contention problem could be reproduced at will by incurring moderate I/O traffic to the 9 track tape drives. The problem of CPU contention happened less frequently and was reduced further by raising the priority of acquire above all other processes.

There were still problems with the probability of missed data when the tape drives were in use, and the somewhat reduced occurrences of missed data due to CPU contention. To ensure that acquire does not fall behind the buffer fills, it calls the SUSPND routine before each pass to perform the following functions:

Since users are suspended during each pass, any use of the tape drives will also be suspended. CPU contention is reduced to that incurred by the console (OPA0:) and the user "SYSTEM", or any user having "OPERATOR" privilege who logs in during the pass. This suspension is inconvenient for the users, but necessary to avoid lost data. If the AVHRR products are to be accurate, then the acquisition of accurate data should be the highest priority.

Suspension of processes which are using the tape drives and allocation of unused drives would eliminate I/O contention from this source, however, CPU and I/O contention would be encountered when other UNIBUS devices are in use.