Design Consideration and Implementation of the LCX Polarimetric Scatterometer (POLARSCAT) M. Ali Tassoudji K. Sarabandi F.T. Ulaby:'. ~, June 1989 Report 022486-T-1 ~. "' '. 2 r ~. June 1989 Report 022486-T-1

'i E,.-r- ~"' -~ "r, iCI 4 S~h d~ ~ i.f iia.iJ 1..::.f i~

Contents 1 Introduction 1 2 System Design 2 2.1 Design Goals..................................... 2 2.2 Design Considerations of a Network Analyzer Based Scatterometer........ 3 3 Detailed System Description 6 3.1 General.................................... 6 3.2 Network Analyzer and Control System....................... 6 3.3 Amplifier and Pulsing Network............................ 8 3.4 Microwave Circuitry.................................. 11 3.5 Antennas....................................... 16 3.5.1 Design............................... 16 3.5.2 Patterns..................................... 17 4 Calibration and Measurement Accuracy 22 4.1 Introduction...................................... 22 4.2 System Transfer Function..........................25 4.3 Calibration................................ 26 4.4 Measurement Accuracy........................... 29 5 Measurement Modes 35 5.1 Point Target............................... 35 5.2 Surface.......................................... 36 5.3 Volume................................. 37 5.4 Polarimetry............................. 39 A APPENDIX A. Photographs of the system 42 i

B APPENDIX B. Measurement Software Listing 45 ii

List of Figures 1 Network analyzer operation as a scatterometer................... 2 Single antenna network analyzer based scatterometer............... 3 Block diagram of the LCX scatterometer...................... 4 Diagram of the amplifier and pulsing network................... 5 Time domain response of the system with a sphere in the chamber; (a)without switching, (b) with switching............... 6 Switch control pulses for transmit and receive, pulsing period is 225 ns, the on 3 3 6 9 10 pulse length is 90 ns.. 11 7 Block diagram of the L-band RF unit......................... 13 8 Block diagram of the C-band RF unit......................... 13 9 Block diagram of the X-band RF unit........................ 14 10 Schematic of a square pyramidal horn antenna..................... 16 11 L-band vertical polarization antenna pattern...................... 19 12 L-band horizontal polarization antenna pattern.................... 19 13 C-band vertical polarization antenna pattern..................... 20 14 C-band horizontal polarization antenna pattern................... 20 15 X-band vertical polarization antenna pattern..................... 21 16 X-band horizontal polarization antenna pattern......................... 21 17 Geometry of scattering of a plane wave from a particle............... 23 18 Simplified block diagram of a dual polarized radar system.............. 26 19 Automatic radar cross section measurement setup.................. 31 20 Geometry of scattering of a plane wave from a long, thin cylinder......... 31 21 Geometry of a wire-mesh............... 22 Radar cross section (hh) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and (- - -)theory.................. 32.32 iii 111

23 Radar cross section (vv) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and (- - -)theory..................... 33 24 Radar cross section (hv) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and (- - -)theory..................... 33 25 Relative phase Shh (to Svv) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and (- — )theory..................... 34 26 Relative phase Shv (to S,,) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and ( — -)theory..................... 34 27 Geometry used in the surface target measurements.................. 40 28 Geometry used in the volume target measurements.................. 40 29 Photograph of the LCX Antennas........................... 43 30 Photograph of the C-band RF Unit.......................... 44 31 Photograph of the X-band RF Unit.......................... 44 iv

List of Tables 1 HP 8753 frequency sweep range for the LCX scatterometer............. 7 2 Amplifier and pulsing network components..................... 10 3 L-band RF unit components.............................. 14 4 C-band RF unit components.............................. 15 5 X-band RF unit components.............................. 15 6 LCX square horn antenna dimensions........................ 17 7 Characteristic of LCX antennas........................... 18 8 Gain and beamwidth variations of LCX antennas with frequency......... 18 v

1 Introduction The LCX polarimetric scatterometer (POLARSCAT) is a radar system designed to measure the backscattering characteristics of extended and discrete targets, over the frequency bands of L, C, and X. It measures the magnitude and phase of the scattered electric field for all linear polarization combinations. This system is mainly designed to operate from a truck-mounted boom. A platform at the top of the boom carries the antennas and RF equipment, and the control and processing units are housed in a control room on the bed of the truck. Communication between the RF units mounted on the boom and the rest of the system is accomplished via control and RF cables. The control cable is used to control the antenna positioner, TV camera, and the transmit/receive polarization. In this report the design and implementation of the LCX scatterometer is discussed. The text is divided into four sections: System Design, Detailed System Description, Calibration and Measurement Accuracy, and Measurement modes. Under the system design section, the design goals and how we can satisfy them with a network analyzer based scatterometer are discussed. The section entitled Detailed System Description gives a complete description of all the units used in the system, the network analyzer, pulsing network, microwave circuitry, and antennas. The Calibration and Measurement Accuracy section explains a new calibration procedure and its accuracy for polarimetric scatterometers. Finally, the measurement routines used by the scatterometer are discussed in the Measurement Modes section. 1

2 System Design Before starting to discuss the design of a network analyzer based scatterometer, a brief section about the desired design goals is needed. 2.1 Design Goals The overall objective of designing the LCX polarimetric scatterometer system was to measure the scattering amplitude of point and distributed targets with great accuracy. This includes measuring the amplitude and phase of the signal backscattered from the target for any of the four linear polarization configurations. The design goals include: * Coverage of L, C, and X-Band frequencies * System mobility for indoor and outdoor experiments * Small antenna size and weight to be mounted on a boom truck * Absolute measurement of scattering coefficient of distributed targets * Phase measurement capability * Adequate dynamic range for targets of interest * High sensitivity to measure targets with small RCS * Ranging capability to separate targets by range * Sufficient spatial resolution * High speed switching between polarizations * Automated switching and data acquisition * Real time processing of the measurements By using a vector network analyzer as the basic signal processor of the scatterometer, we can satisfy most of the requirements stated above. 2

2.2 Design Considerations of a Network Analyzer Based Scatterometer In general, network analyzers are designed to make S-parameter measurements in the frequency domain. They can be configured to operate as a scatterometer system (Fig. 1) In the scatterometer configuration the RF signal is coupled to free space by an antenna. The signal reflected from the target is then picked up by the receive antenna, and is compared with a sample of the transmitted signal. This system can also be changed to a single antenna system using a circulator as shown in Fig. 2. Frequency Swept Source Ref Network Analyze A 1- Receive Figure 1: Network analyzer operation as a scatterometer. Circulator Frequency Transmit and Swept Source Receive Ref Network Analyzer Figure 2: Single antenna network analyzer based scatterometer. Network analyzer based scatterometers have measurement capabilities that are not provided by traditional scatterometers. With the recent development of more powerful network analyzers, 3

such as the HP 8753 and HP 8720, the advantages are more impressive. They have the capability of computing the inverse Fourier Transform of the measured data to give the time domain response, which displays reflections from the target as a function of time or distance. The time domain response gives great insight into where in the range dimension the reflections occur. The time domain gating feature can also be used to analyze the measured response and reduce the effects of unwanted signals. In addition, the recent HP network analyzers can be fully automated using an external computer over the HP-IB(Interface Bus). A large amount of data reduction associated with a measurement can be performed using a computer, while the system remains flexible enough to be used for a variety of applications. One of our design requirements is to be able to measure targets with a wide range of radar cross sections(RCS). In practice the limitation is on measuring the targets with small RCS. This minimum detectable target for a given scatterometer at a certain range is limited by three major factors. The first factor is the thermal noise level, which is the absolute minimum detectable signal and can be determined by the product of the noise figure and bandwidth. The dynamic range of the sampler in the network analyzer is the second factor. This problem arises when a single antenna system is used, or when there is insufficient isolation between the transmit and receive antenna. In such cases part of the transmitted signal returns to the receiver and sets the minimum detectable signal level, which can be obtained from dividing the returned signal by the dynamic range of the sampler. Finally, the third limiting factor is the effect of multiple reflection at the target range. Usually in radar systems there are impedance mismatches at interfaces between different RF components, antenna input ports, and antenna to free space transition. Since the network analyzer is a coherent system its bandwidth is very narrow, hence thermal noise usually is not a limiting factor. Dynamic range and multiple reflection problems limit the performance of the scatterometer, and they can be improved by increasing the isolation between the transmit and receive paths of the system. A two antenna system can solve these problems, but antenna size limitations and small beamwidth (spatial resolution) requirement force us to use a single antenna system. Deploying a pulsing network and including isolators in the microwave 4

circuitry can somewhat eliminate the antenna mismatch and multiple reflections. A detailed description of the system is given in the next section of this report. Another design requirement is that the antennas should be mounted on a platform at the top of a boom truck, with rotatable positioner, where there are limitations in space and weight handling. Thus, the network analyzer and its peripherals must be operated from the base platform on the bed of the truck. In this case the RF transmit and receive signals should pass through long coaxial cables that run from the network analyzer to the antennas. In order to avoid the high losses in cables at C and X-Band frequencies, a lower IF is up-converted to the desired RF band using a single side-band up-converter. Then the received signal is down-converted by the same local oscillator used for up-conversion to maintain phase coherence. 5

3 Detailed System Description 3.1 General Figure 3 presents an overall system block diagram. It divides the system into 4 subsections: network analyzer and control network, amplifier and switching network, microwave circuitry and antennas. Description of each subsystem is presented in the following sections. Figure 3: Block diagram of the LCX scatterometer. 3.2 Network Analyzer and Control System The HP 8753A is a high performance RF vector network analyzer used to measure reflection and transmission parameters. It integrates a high resolution synthesized RF source and a dual channel receiver to measure and display magnitude and phase responses of active and passive RF networks. It has the capability of transforming measured data from the frequency domain to the time domain. 6

L-Band C-Band X-Band Center Frequency 1.5 GHz 1.75 GHz 1.5 GHz Frequency Bandwidth 300 MHz 500 MHz 1.0 GHz Table 1: HP 8753 frequency sweep range for the LCX scatterometer. It consists of three receiver inputs R, A and B with identical samplers. The R input is usually used as a reference for phase-locking the source. A directional coupler is used in our system to provide a reference signal for the R input. A minimum of -35 dbm power is required for phase-locking to occur. The built-in synthesized source generates a swept RF signal in the range of 300 KHz to 3.0 GHz. The frequencies used in the HP 8753A for the LCX system are listed in Table 1. The Xband scatterometer is operated with a bandwidth(BW) of 500 MHz in field experiments because a BW of 1.0 GHz would require twice the number of points to avoid aliasing in the time domain presentation. The RF output power of the network analyzer ranges from -5 to 20 dBm. This power should be adjusted according to the length of RF cables used in the system. Another factor that determines the amount of transmit power is the use of the pulsing network which will be described later in the report. The HP 8753A is equipped with a remote programming interface using the HP-IB. This provides a controlling computer to send commands or instructions to and receive data from the network analyzer. Several output modes are available for outputting data. We use a polar format for data transfer that provides us with the magnitude and phase of the signal. Automatic control of all equipment is accomplished by the HP 9386 computer. The HP 8753A system and peripheral equipment, including a disc drive and printer, are all interfaced with the computer, providing automated measurement, real-time data reduction, hard copy output and data storage. The computer also controls a HP 59306A relay actuator which selects the frequecy and polarization of the measurement. The 10 ms switching time on the relays allows us to make 7

fast polarimetric measurements. 3.3 Amplifier and Pulsing Network To detect small targets or targets that are far away from the antenna, we needed to add an amplifier in the receive path of the system. In addition to the signal reflected from the target, the short-range returns from the antenna and circulator leakage are also amplified, and may result in saturation of the receiver. To reduce the level of these direct returns, a pulsing network is used. With this network, during the time that the signal is transmitted, the receiver is turned off, and when the return from the target is expected the receiver is turned on and the transmitter is switched off. Because this switching is done at a rate which is much higher than the bandwidth of the receiver in the network analyzer, the analyzer does not sense that the incoming signal is pulsed and measures it as CW. The block diagram of the components used in our pulsing network is shown in Figure 4 and their characteristics are listed in Table 2. The two high-speed microwave switches are placed in the transmit and receive arms. They are driven by two pulse generators in a way that one is triggered by the other. An isolator and a high pass filter are used to remove switching transients that can create adverse effects on the response of the network analyzer. It should be noted that the pulsing network is not interfaced with the network analyzer and is operated independent of the analyzer operating sequence. The effect of pulsing was tested with the X-band system when operated inside an anechoic chamber. An 8-inch diameter sphere was placed in the chamber on a styrofoam pedestal about 15 meters away from the antenna. Figure 5 shows the time domain response of the scene as displayed by the network analyzer. Without switching (upper trace) there is a large return at the start of the trace caused by the antenna reflections. The return from the sphere is some 100 nanoseconds later. The noise floor is about 23 dB below the sphere, mostly attributable to thermal(random) noise. Switching is timed in such a way that the antenna reflection is decreased by 50 dB (lower trace),the transmitted power can now be increased without overdriving the receiver. The signal 8

to noise ratio is now improved to 35 dB. Figure 6 shows the timing sequence used for the switches. The scale is 20 ns/div. The transmitter is turned on for 90 ns and off for 135 ns, corresponding to 4.4 MHz repetition rate. These parameters were obtained experimentally for optimum response and depend mostly on the spacing between the antenna and the target. For distributed targets these parameters must be chosen more carefully in such a way that no part of the backscattered signal is chopped off. Figure 4: Diagram of the amplifier and pulsing network. 9

Component MFG Model No. Specifications SPST PIN Diode switch HP 33132A Isol. 33dB, Ins. Loss IdB ( 1-2GHz Switch driver HP 33190B Off 0-0.8V, On 2.5V min. 50 MHz Pulse Generator HP 8012B Period 20ns-ls, Trans. time 5ns-0.5s Amplifier MITEQ AMMIC 1047 50-2500MHz, 38.7dB, 15V, 150mA power @ldB Comp. 18dBm High pass filter Mini-Circuits SHP-1000 1GHz cutoff, -40dB at 0.6GHz Isolator UTE CT-2102-OT Isol>20dB at 1-2GHz, VSWR<1.2 Table 2: Amplifier and pulsing network components. CHi A/R4M log MA 10o dB/ RCr -5 db SWITCHING TTeST GIN SPHE 1 Avg ~(a) - 16 CH START 50 nr STOP 200 no Figure 5: Time domain response of the system with a sphere in the chamber; (a)without switching, (b) with switching. 10

Figure 6: Switch control pulses for transmit and receive, pulsing period is 225 ns, the on-pulse length is 90 ns. 3.4 Microwave Circuitry The microwave circuitry in the LCX scatterometer is designed such that it enables the system to transmit and receive two orthogonal linear polarizations (vertical and horizontal) at the desired frequencies. The diagrams in Figures 7, 8 and 9 illustrate the designs used in the RF units of the three systems. Because losses in the cables are tolerable at L-band, the base swept frequency of the network analyzer is itself used for transmission. Two switches are placed in the transmit and receive paths to provide us with easy switching between transmit and receive polarizations, which are controlled by the relay actuator in the control unit. The performance specifications of the components used in the L-band RF unit are listed in Table 3. To avoid high losses at C and X-band frequencies, a lower frequency signal (IF) provided by the network analyzer is up-converted using a local oscillator(LO). This is accomplished using a mixer that produces the sum and difference frequencies (fRF = fLO + fiF). In the C-band unit (fLO - fIF) is used and the sum frequency is rejected with a low pass filter. In the X-band unit 11

we use a high pass filter that passes (fLo + fIF) and rejects the difference frequency. The C and X-band systems are almost identical in design except that one uses the lower side-band frequency and the other the upper side-band. An amplifier is placed after the mixer to compensate for the conversion loss of the mixer. A power divider is used to split the LO power for use in the down-conversion section. Two separate sets of down-converter sections are used (one for each polarization) to provide the option of receiving both polarizations with two receivers. For the time being a transfer switch located at the end of these two sections selects the receive polarization. Isolators are distributed throughout the system to help reduce reflections, and hence the system noise level, which arise from the relatively high VSWR of the mixer ports. Because variations in temperature can cause performance changes in the oscillator and the amplifier, a heater with a temperature-controlled unit is placed in both C and X-band RF units to stabilize the temperature. 12

SPDT Switch Circulator V From Amplifier & Pulsing Network H V To Amplifier & + Pulsing Network Figure 7: Block diagram of the L-band RF unit. From Amplifier & Pulsing Network SPDT Switch Up Convertor To V-port of Antenna rculator Isolator Down Convertor H JV Tnrufa Switch To Amplifier PFigure 8 Block diagram of twhe or RF unit. Figure 8: Block diagram of the C-band RF unit. 13

Component MFG Model No. Specifications Circulator UTE CT-2104-0 Isol>20dB at 1-2GHz, VSWR<1.2 SPDT switch Teledyne CS-33S10 Switch time 10ms, 28V, 80mA Transfer switch Transco 715C70100 Switch time 20ms, 28V, 120mA Table 3: L-band RF unit components. SPDT Switch Up Convener To V-port of Antenna Isolator Down Convetor H Trnsfer Switch Figure 9: Block diagram of the X-band RF unit. 14

Component MFG Model No. Specifications Oscillator EMF Systems 251003 6.5GHz, +17.7dBm, 15V, 250mA Mixer Watkins Johnson M14 4-8GHz, Conv loss <7dB SPDT switch Teledyne CS-33S10 Switch time 10ms, 28V, 80mA Transfer switch Transco 715C70100 Switch time 20ms, 28V, 120mA Low pass filter Microlab/FXR LA-60F 6GHz cutoff, -32dB at 7.5GHz Power divider ARRA 5200-2 4-8GHz, Iso >18dB, VSWR <1.6 Circulator UTE CT-4428-0 4-8GHz, Isolation >20dB, Isolator UTE CT-4426-OT Ins Loss <.4dB, VSWR <1.2 Amplifier Avantek AFT-6263 2-6GHz, 28.7dB, 15V, 282 mA power @ldB Comp. 22.2dBm Table 4: C-band RF unit components. Component MFG Model No. Specifications Gunn Oscillator Custom made 8.0GHz, +16dBm, 10V, 586mA Mixer Watkins Johnson M77C 8-12.5GHz, Conv loss <7.5dB SPDT switch Teledyne CS-33S10 Switch time 10ms, 28V, 80mA Transfer switch Transco 715C70100 Switch time 20ms, 28V, 120mA High pass filter Tapered WR-90 WG 8.7GHz cutoff,-30dB at 8GHz Power divider ARRA A6200-2 8-12.4GHz, Iso>18dB, VSWR<1.6 Circulator UTE CT-5158-O 8-12.4GHz, Isolation >20dB, Isolator UTE CT-5157-OT Ins Loss <.4dB, VSWR <1.2 Amplifier Avantek AFT-12664 6-12GHz, 31dB, 15V, 350 mA power @ldB Comp. 21.5dBm Table 5: X-band RF unit components. 15

3.5 Antennas 3.5.1 Design After extensive research, square horn antennas were chosen as the best design that could meet our design goals. Low VSWR constraint and physical size limitation ruled out the use of reflector and array antennas. Also the fact that their cross-pol purity remains constant across the main beam make them particularly suitable for polarimetric measurement of distributed targets. An orthogonal mode transducer(OMT) feed provides the capability of transmitting and receiving both polarizations. It has two ports (vertical and horizontal) each of which can be used to transmit and receive the signal. The physical dimensions of each antenna were determined by first selecting a certain gain and beamwidth and then optimizing them to get a reasonable size square horn[1]. A schematic of a square pyramidal horn is shown in Figure 10 and the dimensions are given in Table 6. blI ~ --- —--— 1 --- —---- r a i. _ - ^^,I_ Figure 10: Schematic of a square pyramidal horn antenna. 16

L-Band C-Band X-Band Aperture width a(cm) 92.4 43.0 40.6 Waveguide width b(cm) 12.1 4.7 2.03 Waveguide length c(cm) 20.0 5.1 2.5 Antenna length l(cm) 188.7 136.0 142.2 Table 6: LCX square horn antenna dimensions. 3.5.2 Patterns Antenna pattern measurements were performed with the HP 8510 network analyzer in the anechoic chamber. The source antenna was positioned at the neck of the chamber. The test antenna was placed on a wooden pedestal attached to a stepper-motor centered at the same height as the source antenna. The network analyzer and the stepper-motor were controlled by a HP 9836 computer. The output of the HP 8510 was sent to a source antenna via a low loss cable. An amplifier was required at the source antenna to increase the signal to noise ratio when the X-band antenna was tested. A horn antenna was used as the source antenna due to its large bandwidth. The signal received by the antenna under test was sent back to the network analyzer and the HP 8510 was set up to display the ratio of the received to transmitted signals. Time domain gating was used to eliminate reflections from ground and other directions, such that only the direct signal picked up by the antenna was being measured. The pattern measurements were performed for vertical and horizontal polarizations in each of the principal planes. The frequencies used were the same as mentioned in Table 7. The data were recorded every 1 degree over the whole pattern and also every 0.1 degree over the main beam, which were used for the illumination integral calculation. The patterns measured for each antenna at their center frequency are shown in Figures 11 through 16. The characteristics of the LCX antennas are given in Table 7. The gain and beamwidth of the antennas are functions of 17

frequency. Their limits over the bandwidth of operation are listed in Table 8. The azimuth and elevation values are reversed for the horizontal polarization. L-Band C-Band X-Band Center Frequency f,(GHz) 1,5 4.75 9.5 Frequency bandwidth(MHz) 300 500 1000 OMT frequency range(GHz) 1.35-1.72 4.5-5.0 8.5-10.0 Gain at fe(dB) 22.1 25.3 29.5 Cro6s-pol isolation at f,(dB) 22.1 26.3 28.7 V-pol beamwidth El,Az at f,(deg) 12.0,15.2 8.0,10.4 5.4,6.5 Far field distance at f,(meter) 8.5 5.8 10.5 Table 7: Characteristic of LCX antennas. L-Band C-Band X-Band Gain variation over bandwidth 20.8-23.4 25.5-27.5 26.7-31.5 V-pol elevation beamwidth(deg) 11.1-12.9 7.7-8.4 5.2-5.5 V-pol azimuth beamwidth(deg) 13.8-16.5 10.1-10.8 6.5-6.9 Table 8: Gain and beamwidth variations of LCX antennas with frequency. 18

-35. r '0 _- e.,. i. ---- r- "!-. ',,,., j I,, I,,, I, I,,.V;.,,,,, X -98.8 -68.8 -38.8 8.8 38.8 68.8 98.8 Angle (Degrees) Figure 11: L-band vertical polarization antenna pattern. -60.8 -3e.98.8 39.8 68.8 Angle (Degrees) Figure 12: L-band horizontal polarization antenna pattern. 19

6. 9.8 Angle (Degrees) 36.1 68.6 98. Figure 13: C-band vertical polarization antenna pattern. ca -98.6 -68.6 -38.98 8. 30.6 60.8 Angle (Degrees) 98.8 Figure 14: C-band horizontal polarization antenna pattern. 20

-98.8 -68.9 -38,9 9.8 Angle (Degrees) 38.6 68.8 Figure 15: X-band vertical polarization antenna pattern. 8.8 Angle (Degrees) Figure 16: X-band horizontal polarization antenna pattern. 21

4 Calibration and Measurement Accuracy 4.1 Introduction A polarimetric radar is a phase-coherent instrument used to measure the polarization scattering matrix S of point or distributed targets. The matrix S relates the field Ed scattered by the target to the field E' of a plane wave incident upon the target [4, p.1087], — ikr E = - SE, (1) r where r is the distance from the center of the target to the point of observation and k is the wave number. For a plane wave incident upon the particle in the direction ki,,its electric field vector may be written in terms of vertical and horizontal polarization components, Ei and E', using the coordinate system (ii,,hi, ci) shown in Fig. 17, E' = (EVi + E^h')e-ikki, (2) where vi = cosOicosoii + cosOisiniy - sinOii (3) hi = -siniix + cosiy (4) ki = sinOicosoii + sinOisinoiSy + sinii. (5) In (2), a time dependence of the form e+iwt is assumed and suppressed. The far-field wave scattered in the direction k, is a spherical wave given by E' = Ev,', + ELh., (6) where (vs,, h,, k.) are defined by the same expressions given in (3) to (5) except for replacing the subscript i with the subscript s. For the backscattering case, 0i + 6, = x, Oi + 0, = x, k, =-k, v, = v,, and h, = -hi. In matrix form, (1) may be rewritten as Ev ' e -ikr SV Svh Em L EJ Lr Shv Shh E LIh J L 'ph 22

where [vv Svh S = S h (8) Shv Shh is defined in terms of the scattering amplitudes Smn with m and n denoting the polarization (v or h) of the scattered and incident fields, respectively. The scattering amplitude Smn is, in general, a complex quantity comprised of a magnitude Smn =| Smn I and a phase angle kImn, Smn = Smne m,n=v or h, (9) and it is related to the radar cross section (RCS) of the target, Omn, by 'mn = 4ir I Smn |2 = 4s2mn; m,n=v or h. (10) Z 'i! 0 Y X Figure 17: Geometry of scattering of a plane wave from a particle. Interest in measuring S stems from the fact that if the elements of S are known, we can compute the RCS of the target that would be observed by a radar with any specified combination of transmit and receive antenna configuration, including elliptical and circular polarizations [6]. In fact, we do not need to know all four magnitudes and four phases of S in order to synthesize 23

the desired RCS; it is sufficient to know the four magnitudes and any three of the phase angles, measured with respect to the fourth as reference. Thus, if we choose fvv as reference, we can write (8) in the form Svv svhei'h Shv elCO Shhei[^ (11) = eiqS' where tmn -= mn - vv, m,n=v or h. (12) For backscattering, the reciprocity theorem mandates that Shv = Svh, which further reduces the number of unknown quantities from 7 to 5. The formulation given above is equally applicable to a distributed target. If the effective area illuminated by the radar antenna is A, the polarimetric scattering behavior of the distributed target is characterized by the differential scattering matrix So = S/vI/. In principle, Svv and Shv can be determined by measuring E' and Eh with the target illuminated by a pure vertically polarized wave E' = Ei'ri and, similarly, S.h and Shh can be determined by measuring the same quantities when the target is illuminated by Et = Ehi. Such a procedure requires that (1) the transmit and receive antennas of the measurement system each have excellent isolation between its v- and h-ports, and (2) the receive-transmit transfer functions of the measurement system be known for all four polarization combinations (vv, vh, hv, and hh). Design techniques are currently available to achieve antenna polarization isolation on the order of 30 dB. For a radar scatterometer system intended to measure the differential scattering matrices of distributed targets such as ground surfaces and vegetation canopies, such a level of isolation is sufficient to insure good measurement accuracy of the magnitudes and phases of all four scattering amplitudes. The error associated with measuring the like-polarized components Svv and Shh is negligibly small, and for Shv(and Svh) the error also is less than 0.85 dB if I Shv I / I Svv 1> 0.31, which corresponds to ahv/lavv > 0.1(or -10 dB). For natural targets the like- and cross-polarized components, Shv and S,, for example, are uncorrelated and 24

for Ohv/0wvv > 0.01 the associated error would be less than 0.4 dB. If the radar antennas do not individually have good polarization isolation between their vand h-ports, it is necessary to characterize each antenna by a polarization distortion matrix that accounts for the coupling between the two ports, and to use at least two, and preferably three, targets of known scattering matrices in order to calibrate the radar completely [7]. Now, we will focus our attention on the problems associated with measuring the receiver-transmitter transfer function for a radar with reasonably good overall cross-polarization isolation using suitable external calibration targets. 4.2 System Transfer Function Although a radar may use a single antenna to provide both transmit and receive functions and may also use a polarization switching network capable of exciting either v- or h-polarized waves in the antenna, we shall use the block diagram shown in Fig. 18 to represent the general case of a two-pole transmitter and a two-pole receiver. Assuming perfect isolation between antenna ports, the voltage received by the v-polarized receive antenna due to illumination of a target at range r by a v-polarized wave is given by E = [ r] (4)2 ev4 ev (13) = ~e i2k rRvTvvv where K [ P(4r)2 ]t (14) Svv is the scattering amplitude of the target, Pt is the transmitted power, and Gr and G are the nominal gains of the transmit and receive antennas. The quantities R, and Tv are field transfer functions for the receive and transmit antennas, respectively, which account for the deviation in both amplitude and phase from the nominal condition described by GtG,. Similarly, for any receive-transmit polarization configuration, we have Emn = e-i2e2kRmTnSmn, m,n=v or h. (15) 25

V-Polarized r T -s Transmitter _v L H-Polarized i Transmitter Th V-Polarized Rv Receiver H-Polarized Rh i Receiver h Figure 18: Simplified block diagram of a dual polarized radar system. 4.3 Calibration The standard calibration approach involves the use of one reference target of known scattering matrix. Upon measuring Emn with Smn known, the quantity (KRmTn) can be determined in amplitude and phase, with the latter being relative to some reference distance time delay. In principle, the procedure is simple and straightforward. The problem arises when we need to select a reference target of known scattering matrix. The metal sphere is the easiest target to align and its scattering matrix can be computed exactly [2, p.297]. Unfortunately, it can only be used to calibrate the vv- and hh-channels because its S^hi = SP = 0. Targets that exhibit significant cross-polarized scattering include the dihedral corner reflector, tilted cylinders, and others, but scattering from such targets is inherently sensitive to the orientation of the target relative to the (ii, h,ki) coordinate system. This, and other factors such as edge scattering, may lead to significant errors between the calculated values of the scattering amplitudes and their actual values. The orientation problem may be reduced down to an acceptable level when 26

operating in an anechoic chamber under controlled laboratory conditions, but it poses a difficult problem when it is necessary to calibrate a truck-mounted scatterometer, under field conditions. To solve this problem, we use two reference targets, namely a sphere and any target with strong cross-polarized RCS. As will be shown below, it is not necessary to know the RCS of the second reference target in order to calibrate the radar system. First, let us use a metal sphere of known size, and place it at a distance ro from the radar. The scattering amplitudes of a metal sphere are Shh = Sv So, and Sh = Svh =0. The received fields for vv and hh polarizations are EO= e-2 2kro RvTSo (16) K Eh = e-i2kroRhTh S (17) and consequently, K i2r o (18) Kv = - 2e RvTvSo (18) So rO Khh h = 2e- 2krRhThSo. (19) So 0 where the subscript and superscript 0 denote quantities associated with the metal sphere. Next, let us use any point target that exhibits strong cross-polarized scattering, and let us measure the received field for hv and vh polarizations, E 2 = 2e-i2 Rh^ h (20) rc EC = Ke-i2krR^h c (21) rc where the subscript and the superscript c refers to the cross-polarization calibration target. The reciprocity theorem states that in the backscattering direction, the cross-polarized scattering amplitudes are always equal. Hence, She = Sh (22) and consequently, Kd- ~v RT (23) Evh RvTh 27

Now for a a test target with unknown scattering matrix S", placed at a distance ru from the radar, the received field is Eu = e-i2vR.,T.,Sv, (24) reu ~ Ehh = e-i2ke RhThShh, (25) Ev K —e-2krT (26) Evuh = K-2 e r"RvThSvuh. (27) Since we are interested in the phase angle k', we can eliminate the factor ei'2k*' in the above equations. Using (18), (19), and (23) in combination with (24)-(27) we obtain the following expressions for the unknown scattering amplitudes S 1= e r (28) Kua ro. Sh (r=) (29) Sh = /K K ( ) (30) Kd (ru Sva = E-KKh ro (31) Equations (28)-(31) provide expressions for the four scattering amplitudes in terms of (1) the like-polarized received voltages for the metal sphere, E~O and ELh, (2) the ratio of the crosspolarized received voltages for the second calibration target, Kd = Ehf/EhX (3) the like-polarized scattering amplitude of the sphere, So, and (4) the ranges to the sphere and the test target, ro and r,. Note that knowledge of the scattering amplitude of the second calibration target is not required. 28

4.4 Measurement Accuracy To verify the validity of the calibration technique summarized by equations (28)-(31), we measured the scattering matrix of a tilted cylinder with the X-band scatterometer. The scatterometer was used in continuous chirped mode operating at a frequency of 9-10 GHz. The scattering measurements were performed in a 13-m long anechoic chamber using the setup diagrammed in Fig. 19. Although an exact theoretical solution for a finite-length, conducting cylinder does not exist, the solution based on the assumption that the current along the axis of the cylinder is constant provides accurate results in the specular direction, if the length of the cylinder (L) is much larger than the wavelength [8]. In order to minimize edge effects caused by scattering by the ends of the cylinder, the diameter of the cylinder (D) must also be chosen to be much smaller than the wavelength. Hence, we selected a cylinder with L=30.48 cm and D=1.625 mm. Correct positioning of the test target with respect to the antenna coordinates is very important. First, the target must be placed at the center of the antenna beam in order to avoid phase variations of the incident field along the axis of the target. This was accomplished using a pair of two laser beams. Another alignment parameter that has to be carefully controlled is the angle < between the incidence direction (ki) and the projection of the cylinder axis onto the horizontal plane (Fig. 20). The elements of the scattering matrix are very sensitive to variations in azimuth angle and the rate of change is proportional to the length of the cylinder. This angle was set to 900 with a fine-control stepper motor (steps of a fraction of a tenth of a degree) by maximizing the received power. The 13p (vi). Accurate setting of this angle is very difficult. This angle was set to 500 using an inclinometer. Under the mentioned conditions a signal to noise ratio of 25 dB was achieved for the test cylinder and after background subtraction the signal to noise ratio was improved to 40 dB. To eliminate short-range reflections from the antenna circulators, the returned signal was time-gated, as a result of which the frequency response around the beginning and the end of the frequency band was distorted and discarded. 29

A 15-cm sphere was used for sphere calibration and a 450 wire-mesh (Fig. 21) was employed as the cross-polarization target. The distances of all the targets from the scatterometer, which were accurately measured using the time-domain feature of the HP 8753, were arranged such that ro = r, = ru. The measured amplitudes of the scattering matrix elements of the cylinder are compared with theoretical values in Figures 22- 24. The measured values are within ~0.3dB of the theoretical results. For relative phase, the measured values (Figs. 25 and 26) are within ~50 of theoretical predictions. These deviations are attributed to alignment errors and to the imperfect polarization isolation of the antenna. The excellent agreement between measurements and theory demonstrates that the calibration technique is an effective approach for calibrating single antenna polarimetric scatterometer systems. This technique is particularly useful for field operations because it does not require accurate alignment of calibration targets or knowledge of the radar cross section of the cross-polarization target. 30

Target R Figure 19: Automatic radar cross section measurement setup. 11 I I I I I I I k Figure 20: Geometry of scattering of a plane wave from a long, thin cylinder. 31

Figure 21: Geometry of a wire-mesh -18. - -19. -20. E ax o -21. -22. -23. - 9.20 Frequency (GHz) Figure 22: Radar cross section (hh) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and (- - -)theory. 32

-18. Ir I I I I I I I I I I I I I r I I T - T- - - I - -19. -20. -21. -22. I, I -I. — I.. I I I I..... I -23. 9.21 0 9.30 9.40 9.50 9.60 Frequency (GHz) 9.70 9.80 Figure 23: Radar cross section (vv) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, ( —)measured and (- - -)theory. -18. ' -I I '-. ' ' ' | - I. I.. - i I -19. -20. (4 c-21. -21. _~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I-~...~ ~~'.~..~~ ~...........IIIIII'............. I...................................................................."I......... -22. -23. - 9.20 9.30 9.40 9.50 9.60 9.70 9.80 Frequency (GHz) Figure 24: Radar cross section (hv) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and ( — -)theory. 33

5. 0. r l- 1- 1-1 — -I- -- --- -- --- -- -------------- ----.......................................................... 0 0) 0 -5. H -10. _ -15. 9.20 9.30 9.40 9.50 Frequency (GHz) 9.60 9.70 9.80 Figure 25: Relative phase Shh (to Svv) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and ( - -)theory. 5. 1 I -.. I I. I. I I I I 'I, I I I I I I I " I I I I I 0. 0 o cm -5. 0 -10. -15. L 9.20 9.30 9.40 9.50 9.60 9.70 Frequency (GHz) 9.80 Figure 26: Relative phase Shy (to Svv) versus frequency of a cylinder with L=30.48 cm and D=1.625 mm, (-)measured and ( --- -)theory. 34

5 Measurement Modes The LCX polarimetric scatterometer can perform measurements in four different modes: (a)point target, (b) surface, (c) volume, and (d) polarimetry, each of which will be discussed in the sections that follows. A software(LCX Version 4.0) was written to facilitate the use of the scatterometer. By selecting from various menus and responding to on-screen prompts, the operator can calibrate and use the scatterometer in the desired mode without having to manually set the parameters on the network analyzer and the relay actuator. To simplify the equations in the following sections, we redefine the cross polarization calibration factors as follows Khv = IKvvKhhKd (32) V Khh Kvh = V (33) Kd such that equations (28)-(31) become. Era. r. (34) Stun = Kn34 In the next four sections the assumption is that calibration has been performed and the calibration factors(Kmn) and the distance to the calibration target(ro) are known at all N discrete frequencies across the bandwidth of operation. 5.1 Point Target The point target routine measures the scattering amplitude of a target with finite size such that the solid angle subtended by the target is smaller than the antenna solid angle. The target should be placed in the far field of the antenna. Point target measurements are done in the frequency domain. Time domain gating is set such that only the target characteristic is being 35

observed in the frequency response. While setting the gate parameters, the operator is asked to specify the target range(r,) on the time domain trace which will be used in calibrating the data. After setting the gate parameters the program steps through each selected polarization and records N complex values each corresponding to the scattered field(E~ ) at that frequency. After removal of the target, a measurement of the background signal(E' ) is obtained with the same gate parameters. Then the program calculates the scattering amplitude of the target at each frequency point using U - (Eu - Eb ) (r 2 S n - - (- 2n (35) Kmn \r '-e can calculate the radar cross section of the target using equation (10) which gives mn = 4r mn 2n 4 (36) Kmn ro0 5.2 Surface The surface routine measures the average surface backscattering coefficient(o^). The measurements are performed in the frequency domain for N frequency points from each of M independent samples. The gate parameters are set at the beginning of the program and will remain the same for all the M samples. To derive the equations used in calibration of the distributed target measurements we begin with the radar equation for a point target located at ru P PtGtoGroA2 (37) (4r)3rwhere Pr is the received power, Pt is the transmitted power, Gto and Gro are the boresight transmit and receive antenna gains, respectively, A is the wavelength, and a is the radar cross section of the target. By comparing equations (36) and (37) and substituting Pr/Pt for I E, - E,^ 12 36

and Kl12 for IKml,2 we get IK2 r4 GtoGroA2 (38) | o - W * (38) (4a.)2 The form of the radar equation used in determining the return power from a surface is given by the expression[3] PtA2 00A P (4r i - r) a GtoGo dA. (39) Figure 27 illustrates the geometry used. If we assume ~a to be constant over the illuminated area and writing the gains as Gt(0, 4)) = Gtogt(O, 4), the above equation can be rewritten as p PtGtOGrOA2b M. Pr = PG~G~foA2~ JI g,(O, S)gg(O, 4)-4 dA. (40) (4r)3900) (41r)a Jlll.area Using equation (38), we can write Pr IK12 r040' fI -Pt 4r / laa t (, ) or( ) dA. (41) t 4r Jlll.area The integral in this equation is known as the illumination integral, I. Values of the illumination integral for a given height and incidence angle have been evaluated using the main-lobe patterns of the antenna. After rearranging equation (41) to obtain the backscattering coefficient we get I=K2 I. (42) The averaging process is performed over N frequency points and M independent samples.If we write o,' for the backscattering coefficient at the jth point of the th trace, then we obtain the overall average of the backscattering coefficient using a.0 E 1 ~E OJ (43) M i=1 j= 5.3 Volume The volume measurement mode measures the differential volume backscattering coefficient. The measurements are performed in the time domain mode of the network analyzer and an 37

integration range over the target return is set by the operator. The program divides this range into N slices and measures M independent samples. After averaging the samples, it evaluates the volume backscattering coefficient of the kth slice attenuated by the volume above that slice. The development of the formulas is similar to those explained in the previous section. Consider a volume illuminated by the scatterometer as in Figure 28, and divide this volume into k slices perpendicular to the direction of propagation, each with range extent Ark. Similar to the surface case we can write an expression for the power received from each of these slices[3]. The power received from the kta slice is given by PtGtoG,oA2 Pr1k -p= (4i^r) I(hk6)L -i)rk (44) L(zk) where L(zk) is the two way loss through the medium above the kth slice in the z-direction and Iv is the volume illumination integral and is given by I (hk,) = ] gt(9 )9gr( ), )-dA~l. (45) tll.area rk where A. = AcosS is the illuminated area perpendicular to the antenna beam. The volume integral equation can be written as Iv(hk, ) = I(hk, ) cos (46) so that only the surface illumination integral needs to be evaluated. Since the volume measurement mode is done in the time domain we need to take the average of the calibration constants obtained in the frequency domain and use that as the correction factor. Using equation (38) and (46), we can rearrange equation (44) and get PL/Pt = I I(h^,r 9) iAr cos6 (47) 4r 'k'L(z)t Thus, the volume backscattering coefficient for the kth slice attenuated by the volume above it can be obtained from 38

kb _ 4lPrk/Pt (48) L(zk) -IK 2 rI(hk, G)Ark Cose In many instances it is desirable to have the integrated backscattering coefficient o~. It can be written as a summation over N slices as N 0 =E t Lk rk cos 8 (49) k=1 L(Zk) 5.4 Polarimetry The polarimetric measurement mode measures the calibrated magnitude and phase of the four polarizations of the returned signal from a distributed target. It measures several independent samples and stores them separately. These data can be used to calculate the average phase matrix. In this mode only the center frequency data is recorded. Time domain gating is set by the operator over the target return. For each sample, all four polarizations are measured sequentially with very short intervals, so that the phase information is conserved. This routine uses a calibration scheme similar to that of the point target except for scaling the result by the illumination integral instead of the point target range. The equation used is given below Su=n = mn (50) where I is the illunination integral. 39

Transmit and Receive h Surface Normal dA Figure 27: Geometry used in the surface target measurements. Transmit and Receive hk z=O. z=d Figure 28: Geometry used in the volume target measurements. 40

References [1] Braun, E.H.,"Some Data for the Design of Electromagnetic Horns",EEE Transactions on Antennas and Propagation, Vol. AP-4, January 1956, pp. 29-31. [2] Ulaby, F.T., R.K. Moore, and A.D. Fung, Microwave Remote Sensing: Active and Passive, Vol. I, Reading, MA: Addison Wesley, 1981. [3] Ulaby, F.T., R.K. Moore, and A.D. Fung, Microwave Remote Sensing: Active and Passive, Vol. I, Reading, MA: Addison Wesley, 1982. [4] Ulaby, F.T., R.K. Moore, and A.D. Fung, Microwave Remote Sensing: Active and Passive, Vol. III, Dedham, MA: Artech House, Inc., 1986. [5] Whitt, M.W., F.T. Ulaby, T.F. Haddock,"The Development of a Millimeter-Wave Network Analyzer Based Scatterometer," The University of Michigan, Radiation Lab Technical Report 022872-1-T, January 1987T [6] Zebker, H.A., J.J. van Zyl, and D.n. Held, "Imaging Radar Polarimetry from Wave Synthesis," J. Geophys. Res., Vol. 92, No. 81, January 1987, pp. 683-701. [7] Barnes, R.M.,"Polarimetric Calibration Using In-scene Reflectors," MIT Lincoln Lab Technical Report TT-65, September 1986. [8] Ruck, G.T., D.E. Barrick, W.D. Stuart, and C.K. Krichbaum, Radar Cross Section Handbook, Vol. 1, New York, NY: Plenum Press, 1970. 41

A Photographs of the system 42

I K Fr - - i! 1 —... *.: I, Figure 29: Photograph of the LCX Antennas. 43

Figure 30: Photograph of the C-band RF Unit. Figure 31: Photograph of the X-band RF Unit. 44

B Measurement Software Listing 45

100!****** ********** * 110 L/C/X POLARIMETER MEASUREMENT PROGRAM 120 FILE: LCX VERSION 4.0 130 *** ***** ************************************************************** 140 LAST EDIT: JUNE 1989 150 160 170 RE-WRITE OF PROGRAM TO CALIBRATE ANTENNAS USING A SPHERE AND A 180 CROSS-POL TARGET. DATE FEB 4, 1989. THE SUBROUTINE RADAR MENU 190 HAS BEEN LEFT ESSENTIALLY INTACT, BUT MOST OF THE OTHER ROUTINES 200 HAVE BEEN MODIFIED TO REDUCE COMPLEXITY. 210 220 NAME DATE VER. CHANGE 230 240 250!r****************++******************************************************* 250 260 OPTION BASE 1 270 COM /Paths/ @Nwa,@Nwa data, Hpib, Relay 280 COM /Constants/ Vel,Zero(3) 290 COM /Sys 1/ Freq$(3)[3],Freq cent(3),Freq span(3) 300 COM /Sys-2/ Pol$(4) [2],Polsw5(3,4) [8] 310 COM /Sys-3/ INTEGER F disp,P disp 320 COM /Sys-4/ Drive aS[T5],Drive b$[15],Drive cS[15],INTEGER Preamble,Bytes 330 COM /Sys-5/ Targee$[30],Version$ [12],Mode$[7],Outtype$s[10],Sound[3],Bell$[1],Debug$[3] 340 COM /Sys 6/ Angle,AngleS[10],Bin rng(3),Beam(3),INTEGER Npts,Ntrace 350 COM /Sys-7/ INTEGER Cal flag(2,4T,Meas flag(2,4) 360 COM /Cal7 Cal keep$(3) [TO],Rcal(3),Donecal(3) 370 COM /Illum/ CT3,4,13) 380 DATA "L","C", X"!FREQUENCY 390 DATA WVV""HH"', HV#",VHN! POLARIZATION 400 DATA 1.5,1.75,1.5! FREQ CENT 410 DATA.3,.5,.5 I FREQ-SPAN 420 DATA 12.5,9.0,6.2! BEAMWIDTH 430 DATA 1.0,0.6,0.6! BIN RNG 440 DATA "?*B3456","?*A56B34n,"?*A6B345,~#?*A5B346'! L 450 DATA "?*B3456",?*A34B56, "?*A4B356N","*A3B456" C 460 DATA "?*A34B56","?*B3456, "?*A3B456","?*A4B356"! X 470 DATA ":,700,0",:,700,1, ":MEMORY,0,71! DRIVEA,B,C 480 READ Freq$(*) 490 READ Pol$(*) 500 READ Freq cent (*) 510 READ Freq span(*) 520 READ BeamT*) 530 READ Bin rng(*) 540 READ PolswS(*) 550 READ Drive_a$,Driveb$,Drive c$ 560! 570!Set up error handling routine. 580 590 ON ERROR CALL Fix error 600 610! Read illumination integral coefficients from disc. 620!Also define look-up table for FORM1 to FORM3 conversion. 630 640 ASSIGN @Disc TO FNFilelocS("ILLUM", "/LCX/ILL"&Drive aS) 650 ENTER @Disc;C(*) 660 ASSIGN @Disc TO * 670 CALL Table def 680! 690!Initialize important parameters. 700 710 DEG 720 MAT Donecal- (0) 730 MAT Cal flag- (0) 740 MAT Meas flag- (0) 750 Mode$-"MATRIX " 760 F disp-1 770 P-disp-1 780 Out typeS-"PRINT/DISC" 790 Span time-3. 0E-7 800! 810! Zero(*) is the 2-way time domain return from the antenna 820! aperture. They have to be changed according to cable lengths. 830 840 L-Band aperture is 13.50 ns away from the vv-pol max return. 850 C-Band aperture is 12.25 ns away from the vv-pol max return. 860 X-Band aperture is 13.75 ns away from the vv-pol max return. 870 880 Zero (1) -(1. 8700E-7) + (1. 350E-8) 890 Zero(2)-(1.8075E-7)+(1.225E-8) 900 Zero(3)-(1.7800E-7) + (1.375E-8) 910 Vel-2.99792458E+8

920 Ntrace-3 930 Npts-201 940 Angle$-S"0 950 Angle-0 960 Target$-"" 970 Sound$-"ON 980 DebugS-"OFF" 990 BellS-"" 1000 VersionS-"Version 4.0" 1010 PRINTER IS PRT 1020 PRINT CHRS(27)&"&llL"! Set Page Breaks 1030 PRINTER IS CRT 1040 Clear crt 1050 PRINT1060 PRINT 1070 PRINT ************************************************* 1080 PRINT" * 1090 PRINT" * LCX 1100 PRINT * UNIVERSITY OF MICHIGAN RADIATION LAB *" 1110 PRINT" L/C/X MEASUREMENT PROGRAM 1120 PRINT" *(VERSION 4.0) *" 1130 PRINT" * 1140 PRINT" *OCTOBER 23, 1988 1150 PRINT * 1160 PRINT H ************************************************ 1170 IF FNAsk("INITIALIZE RAM DISK?") THEN 1180 INITIALIZE Drive c$,0 1190 INITIALIZE Drive-c$,1000 1200 END IF 1210 Hp8753_init (Nwa, Nwadata, Hpib, Relay,Debug$) 1220 Series init 1230 OUTPUT KBD;"SCRATCH KEY"&CHR$ (255) &CHR$(88); 1240 Start loop:! 1250 Radar menu(End$) 1260 IF End$-"Y" THEN GOTO Program end 1270 IF Mode$-"POINT " THEN CALL Point target 1280 IF Mode$-"SURFACE" THEN CALL Surface 1290 IF ModeS-"VOLUME " THEN CALL Volume 1300 IF ModeS-"MATRIX " THEN CALL Polarimetry 1310 GOTO Start loop 1320 RETURN 1330 Program end:! 1340 DISP "PROGRAM EXIT" 1350 LOAD KEY "EDITKEY:MEMORY,0,1" 1360 STOP 1370 END 1380! ************************************************************************ 1390!SUB Freq set(INTEGER Ifreq) 1400! 1410! This subroutine sets the transmit frequency for the HP8753. 1420 1430 COM /Paths/ @Nwa, Nwa data, Hpib,8Relay 1440 COM /Sys 1/ Freq$(*),Freq_cent(*),Freq span(*) 1450 OUTPUT @Nwa;"TIMDTRANOFF" 1460 OUTPUT @Nwa;"CENT "&VAL$(Freq cent(Ifreq))&" GHZ" 1470 OUTPUT @Nwa;"SPAN "&VAL$ (Freqspan (Ifreq)) &" GHZ" 1480 SUBEND! Freq set 1490 ************W************************************************************ 1500 SUB Polsw(INTEGER Ifreq,Ipol) 1510! 1520! This subroutine sets the transmit and receive polarization by 1530! sending the proper command over the HPIB to the polarization 1540! relays. It also displays the freq and pol on HP8753. 1550 1560 COM /Paths/ eNwa, Nwa data, Hpib,SRelay 1570 COM /Sys 1/ Freq$(*),Fre cent(*),Freq span(*) 1580 COM /Sys-2/ Pol$(*),PolswC(*) 1590 OUTPUT @Relay;PolswS(Ifreq,Ipol) 1600 OUTPUT 8Nwa;"TITL "" "&FreqS(Ifreq)&" BAND - "&PolS(Ipol)&f""" 1610 WAIT.1 1620 SUBEND! Pol sw 1630 ************************************************************************ 1640 SUB Angleset(Angle) 1650! 1660! This subroutine tells the user to set the antenna positioner angle. 1670 1680 COM /Sys 5/ Target$,VersionS,Mode$,Out typeS,SoundS,Bell$,Debug$ 1690 Angle$-VXL$(Angle)&CHR$ (179) & "!Regree sign 1700 DISP "SET ANTENNA ANGLE TO ";AngleS;" <CONTINUE>";BellS 1710 PAUSE 1720 DISP "WORKING" 1730 SUBEND! Angle set 1740! ** **************************************************************** 1750 SUB Series init 1760! 1770! This subroutine prints a header for the printout and sets the system 1780 date and time. 1790!

1800 DIM InputS[80] 1810 PRINTER IS PRT 1820 PRINT CHRS(12) 1830 Set clock 1840 LINPUT "ENTER MEASUREMENT SERIES TITLE",InputS 1850 PrefaceS-**"&RPT$(" ",9) 1860 PRINT RPTS("*", 70) 1870 PRINT Preface$&Input$ 1880 LINPUT "ENTER OPERATOR NAME",InputS 1890 PRINT Preface$&InputS 1900 PRINTER IS CRT 1910 PRINT 1920 PRINT 1930 PRINTER IS PRT 1940 PRINT Preface$&"MEASUREMENT SERIES STARTED AT "&TIMES(TIMEDATE) 1950 PRINTER IS CRT 1960 WAIT 1.0 1970 Comments 1980 SUBEND! Series init 1990 ** ******************************************************************** 2000 SUB Comments 2010 2020 This subroutine prints comments on the printout. 2030 2040 DIM Input$[80] 2050 Clear crt 2060 PRINT-"ENTER COMMENTS. WHEN FINISHED, BEGIN THE NEXT LINE" 2070 PRINT "WITH A / THEN <ENTER>." 2080 PRINT RPT$("*",70) 2090 PRINTER IS PRT 2100 PRINT RPTS (*",70) 2110 Loop start:! 2120 LTNPUT "",Input$ 2130 IF InputS[l,1]-"/" THEN Loop_end 2140 PRINTER IS CRT 2150 PRINT Input$ 2160 PRINTER IS PRT 2170 PRINT Input$ 2180 GOTO Loop start 2190 Loop end: 2200 PRINTER IS PRT 2210 PRINT RPT$("*",70) 2220 PRINTER IS CRT 2230 Clear crt 2240 SUBEND T Comments 2250 *********************************************************************** 2260 SUB Hp8753_init (Nwa, Nwa data, Hpib, Relay,Debug$) 2270! 2280! This subroutine configures the HP-IB bus and presets the HP8753. 2290! It also sets the frequency and pol switches to the default values & 2300! HP8753 in the time domain mode. 2310! 2320 COM /Sys 1/ FreqS(*),Freqcent(*),Freq_span(*) 2330 COM /Sys-2/ PolS(*),PolswN(*) 2340 COM /Sys-3/ INTEGER F disp,P disp 2350 ASSIGN @Rpib TO 7 2360 ASSIGN eNwa TO 716 2370 ASSIGN eNwa data TO 716;FORMAT OFF 2380 ASSIGN @Relay TO 710 2390 REMOTE eHpib 2400 ABORT eHpib 2410 CLEAR SNwa 2420 IF Debug$-"ON " THEN OUTPUT SNwa;"DEBUON" 2430 OUTPUT @Nwa;"USEPASC" 2440 IF Debug$-"OFF" THEN 2450 OUTPUT eNwa;"DEBUOFF" 2460 OUTPUT eNwa;"TITL """*FreqS(1)&" BAND - "&Pol$(1)&"""# 2470 END IF 2480 CALL Freq_set(F disp) 2490 CALL Freqsw (F aisp) 2500 CALL Pol sw(F aisp,P disp) 2510 OUTPUT *Rwa;"TIMDTRANON;STAR 100 NS;STOP 400 NS" 2520 SUBEND! Hp8753 init 2530 ********************************************************************** 2540 SUB Radar menu(End$) 2550 2560! This is the main subroutine. In this subroutine, measurement parameters 2570! are set, and calibration routine is called. This subroutine is exited 2580 1 when beginning a measurement sequence or ending the program. 2590 1 2600 CCM /Paths/ $Nwa, Nwa data,SHpib, Relay 2610 COM /Constants/ Vel,Zero(*) 2620 CCM /Sys 1/ Freq$(*),Freqcent (*),Freq_span(*) 2630 COM /Sys-2/ PolS(*),PolswN(*) 2640 COM /Sys-3/ INTEGER F disp,P disp 2650 COM /Sys 4/ Drive aS, Drve b, Drive c, INTEGER Preamble,Bytes 2660 COM /Sys-5/ Target$,Version$,Mode$,Out type$,Sound$,Bell$,Debug$ 2670 COM /Sys-6/ Angle,AngleS,Bin rng(*),Beam(*),INTEGER Npts,Ntrace

2680 2690 2700 2710 2720 2730 2740 2750 2760 2770 2780 2790 2800 2810 2820 2830 2840 2850 2860 2870 2880 2890 2900 2910 2920 2930 2940 2950 2960 2970 2980 2990 3000 3010 3020 3030 3040 3050 3060 3070 3080 3090 3100 3110 3120 3130 3140 3150 3160 3170 3180 3190 3200 3210 3220 3230 3240 3250 3260 3270 3280 3290 3300 3310 3320 3330 3340 3350 3360 3370 3380 3390 3400 3410 3420 3430 3440 3450 3460 3470 3480 3490 3500 3510 3520 3530 3540 3550 COM /Sys 7/ INTEGER Cal flag(*),Meas flag(*) COM /Cal7 Cal keep$(*),Rcal(*),Donecal(*) INTEGER F disp_old,P_disp old INTEGER FP!!This is the main menu subroutine. ALLOCATE INTEGER Cal flag old(2,4) ALLOCATE INTEGER Meas_flag _old(2,4) End$-"N" Menu clear:! OFF KEY Clear crt Menu:! OUTPUT KBD;CHR$ (255) &CHR$ (84); PRINT TABXY(1,1) PRINT PRINT PRINT I PRINT " PARAMETER S PRINT PRINT PRINT PRINT " PARAMETER PRINT PRINT N FREQUENCY FOR F-1 TO 3 IF Meas_flag(l,F) THEN PRINT Freq$(F)&" "; NEXT F PRINT " PRINT " POLARIZATION FOR P-1 TO 4 IF Measflag(2,P) THEN PRINT Pol$(P)&" "; NEXT P PRINT " PRINT " ANTENNA ANGLE PRINT " TARGET TYPE PRINT" MEASUREMENT MODE PRINT " CURRENT DISPLAY Menu 1:! OFF KEY ON KEY 0 LABEL " FREQ/POLARIZ " GOTO Freq_po. ON KEY 1 LABEL " ANGLE " GOTO Angle ON KEY 2 LABEL " TARGET " GOTO Target ON KEY 3 LABEL " MODE " GOTO Mode ON KEY 4 LABEL * BEGIN "GOTO Begin ON KEY 5 LABEL" MORE "GOTO Menu 2 ON KEY 6 LABEL N COMMENTS N GOTO Comment ON KEY 7 LABEL " DISPLAY " GOTO Display' ON KEY 8 LABEL " CALIBRATE " GOTO Calibral ON KEY 9 LABEL " QUIT " GOTO Quit Spin:GOTO Spin! WAIT FOR Menu 2:! OFF KEY ON KEY 1 LABEL " PARAMETERS " GOTO Parameti ON KEY 3 LABEL " SPHERE RESP " CALL Sphere ON KEY 9 LABEL " MAIN MENU "GOTO Menu clT GOTO Spin!home display L/C/X" SELECTION MENU" CURRENT VALUE" "&AngleS "&Target$ "&ModeS "&Freq (F disp)} & "&PolS (P_disp); 1 _print te SOFTKEY INTERRUPT ers response ear Freqpol: OFF KEY MAT Meas flag old- Meas flag MAT Meas-flag= (0) ON KEY 0 LABEL " L BAND ON KEY 1 LABEL" C BAND ON KEY 2 LABEL" X BAND ON KEY 4 LABEL" STORE ON KEY 5 LABEL" W ON KEY 6 LABEL" HH ON KEY 7 LABEL" HV ON KEY 8 LABEL VH ON KEY 9 LABEL" CANCEL GOTO Spin Set 1: I OFF KEY 0 Meas flag (l, )-1 GOTO Spin Set c: I OFF KEY 1 Meas flag(, 2)-l GOTO-Spin Set x:! OFF KEY 2 Meas flag(1, 3) -1 GOTO Spin Vv set:! -OFF KEY 5 Meas_flag (2, 1) -1 "GOTO Set 1 "GOTO Set-c " GOTO Set x " GOTO Store " GOTO Vv set GOTO Hh set "GOTO Hv set " GOTO Vh-set "GOTO Can

3560 GOTO Spin 3570 Hh set:! 3580 OFF KEY 6 3590 Meas flag(2,2)-1 3600 GOTO-Spln 3610 Hv set:! 3620 -OFF KEY 7 3630 Meas flag(2,3)-1 3640 GOTO Spin 3650 Vh set:! 3660 -OFF KEY 8 3670 Meas flag(2,4)-1 3680 GOTO Spin 3690 Can:! 3700 OFF KEY 3710 MAT Meas flag- Meas_flagold 3720 GOTO Menu 3730 Store:! 3740 OFF KEY 3750 GOTO Menu 3760! --- —------------------------------------------ 3770 Angle:! 3780 OFF KEY 3790 INPUT "ENTER MEASUREMENT ANGLE",Angle 3800 AngleS-VAL$(Angle)&CHR$(179)&" " degree sign 3810 GOTO Menu 3820! --- —---------------------------------------------------------— _____ 3830 Target:! 3840 OFF KEY 3850 LINPUT "ENTER TARGET TYPE",Target$ 3860 TargetS-TRIMS (TargetS) 3870 Target$-Target$&RPT$(" ",30-LEN(TargetS)) 3880 GOTO Menu 3890! --- —---------------------------------------------— __ —_________________ 3900 Comment print: 3910 OFF KEY 3920 Comments 3930 GOTO Menu 3940! --- —-----------------------------------------— ~ --- —------------------- 3950 Quit:! 3960 OFF KEY 3970 Clear crt 3980 End$-wY" 3990 GOTO Sub end 4000!~ --- —------------------------------------------— __-_-__-_ — __ 4010 Parameters:! 4020 OFF KEY 4030 Clear crt 4040 PRINT 4050 PRINT 4060 PRINT " PARAMETER CURRENT VALUE" 4070 PRINT 4080 PRINT " # OF TRACES/SET ";Ntrace 4090 PRINT " # OF POINTS ";Npts 4100 PRINT " VOLUME BIN SIZE (meters) ";Bn rng(l);Bin rng(2 4110 PRINT" OUTPUT TYPE ";Ouf types 4120 PRINT" SOUND ";Sounds 4130 PRINT" DEBUG ";Debug$ 4140 ON KEY 0 LABEL " 9 OF TRACES " GOTO Trace 4150 ON KEY 1 LABEL "t# OF POINTS "GOTO Points 4160 ON KEY 2 LABEL" BIN SIZE " GOTO Bin rng set 4170 ON KEY 3 LABEL" OUTPUT TYPE "GOTO Output set 4180 ON KEY 4 LABEL " SOUND " GOTO Sound set 4190 ON KEY 5 LABEL " DEBUG MODE "GOTO Debug set 4200 ON KEY 9 LABEL" MAIN MENU " GOTO Menu clear 4210 GOTO Spin 4220 Trace:! 4230 OFF KEY 4240 INPUT "INPUT THE # OF TRACES DESIRED (integer)",Ntrace 4250 GOTO Parameters 4260 Points:! 4270 OFF KEY 4280 INPUT "INPUT THE # OF SAMPLE POINTS DESIRED (integer 51,101,201,401)",Npts 4290 Bytes-Npts*16 4300 GOTO Parameters 4310 Bin rng set: I 4320 OFF KEY 4330 ON KEY 0 LABEL " L BAND " GOTO Bin rng 1 4340 ON KEY 1 LABEL " C BAND " GOTO Bin-rng c 4350 ON KEY 2 LABEL " X BAND " GOTO Bin~rngjx 4360 GOTO Spin 4370 Bin rng 1:! 4380 UFF KEY 4390 INPUT "ENTER THE DESIRED BIN SIZE (ONE-WAY IN METERS)",Bin rng(l) 4400 GOTO Parameters 4410 Bin rng c:! 4420 UFF KEY 4430 INPUT "ENTER THE DESIRED BIN SIZE (ONE-WAY IN METERS)",Binrng(2) 2);Bin_rng(3)

4440 4450 4460 4470 4480 4490 4500 4510 4520 4530 4540 4550 4560 4570 4580 4590 4600 4610 4620 4630 4640 4650 4660 4670 4680 4690 4700 4710 4720 4730 4740 4750 4760 4770 4780 4790 4800 4810 4820 4830 4840 4850 4860 4870 4880 4890 4900 4910 4920 4930 4940 4950 4960 4970 4980 4990 5000 5010 5020 5030 5040 5050 5060 5070 5080 5090 5100 5110 5120 5130 5140 5150 5160 5170 5180 5190 5200 5210 5220 5230 5240 5250 5260 5270 5280 5290 5300 5310 GOTO Parameters Bin rng x:! UFF KEY INPUT "ENTER THE DESIRED BIN SIZE (ONE-WAY IN METERS)",Bin_rng(3) GOTO Parameters Output set:! OFF-KEY ON KEY 0 LABEL" PRINT n GOTO Outpr ON KEY 1 LABEL " DISC " GOTO Out d ON KEY 2 LABEL " PRINT/DISC "GOTO Out-pr d GOTO Spin Out pr: UFF KEY Out type$-"PRINT GOTT Parameters Out d:! UFF KEY Out typeS-"DISC GOTU Parameters Out pr d: OFF-KEY Out typeS-"PRINT/DISC" GOTU Parameters Sound set:! OFF KEY IF Sound$-"ON " THEN Sound$-"OFF" Bell$-" " ELSE Sound$-"ON " Bell$-"" END IF GOTO Parameters Debug set:! OFF KEY IF Debug$-"ON " THEN Debug$-"OFF" OUTPUT @Nwa; DEBUOFF" ELSE Debug$-"ON OUTPUT eNwa; "DEBUON" END IF GOTO Parameters Calibrate: OFF KEY MAT Cal flag old- Cal flag MAT Cal flag- (0) ON KEY U LABEL" L BAND ON KEY 1 LABEL" C BAND ON KEY 2 LABEL" X BAND ON KEY 4 LABEL "BEGIN FULL ON KEY 5 LABEL" VV ON KEY 6 LABEL" HH ON KEY 7 LABEL HV-VH ON KEY 9 LABEL" CANCEL GOTO Spin Cal 1:! UFF KEY 0 Cal flag(1,l1)l GOTU Spin Cal c:! OFF KEY 1 Cal flag(1,2)-1 GOTO Spin Cal x:! UFF KEY 2 Cal flag (1,3) - GOTU Spin Cal w:! 5FF KEY 5 Cal flag (2,1) -1 GOTU Spin Cal hh:! OFF KEY 6 Cal flag (2,2)-1 GOTU Spin Cal cross:! OFF KEY 7 Cal flag (2,3) -1 Cal-flag(2,4)-1 GOTO Spin Begin cal:! OFF KEY Clear crt Cal(Cal flag(*),Npts) GOTO Menu clear Cancel:! " GOTO Cal 1 " GOTO Cal-c " GOTO Cal x CAL" GOTO Begn _cal " GOTO Cal w "GOTO Cal-hh " GOTO Cal-cross " GOTO Cancel

5320 OFF KEY 5330 MAT Cal flag- Cal_flag old 5340 GOTO Menu 5350! --- —------------------------------------------- 5360 Mode:! 5370 OFF KEY 5380 ON KEY 0 LABEL " POINT " GOTO Point 5390 ON KEY 1 LABEL " SURFACE " GOTO Surface 5400 ON KEY 2 LABEL " VOLUME N GOTO Volume 5410 ON KEY 3 LABEL " MATRIX " GOTO Matrix 5420 GOTO Spin 5430 Point: 5440 OFF KEY 5450 ModeS-"POINT N 5460 GOTO Menu 5470 Surface:! 5480 OFF KEY 5490 ModeS-"SURFACE" 5500 GOTO Menu 5510 Volume:! 5520 OFF KEY 5530 ModeS-"VOLUME " 5540 GOTO Menu 5550 Matrix:! 5560 OFF KEY 5570 Mode$-"MATRIX " 5580 GOTO Menu 5590! --- —-------------------------------------------------------------------- 5600 Display:! 5610 OFF KEY 5620 Clear crt 5630 F disp old-F disp 5640 P-disp-old-P-disp 5650 F disp=0 5660 P-disp-0 5670 ON KEY 0 LABEL L GOTO L disp 5680 ON KEY 1 LABEL" C GOTO C.disp 5690 ON KEY 2 LABEL" X " GOTO X-disp 5700 ON KEY 4 LABEL " DISPLAY " GOTO DIsp 5710 ON KEY 5 LABEL " W " GOTO Vv disp 5720 ON KEY 6 LABEL " HH " GOTO Hh-disp 5730 ON KEY 7 LABEL " HV GOTO Hv disp 5740 ON KEY 8 LABEL " VH N GOTO Vh-disp 5750 ON KEY 9 LABEL" CANCEL N GOTO Can disp 5760 GOTO Spin 5770 L disp:! 5780 IF F disp-0 THEN F disp-1 5790 IF F-disp<>l THEN GOTO Mess disp 5800 OFF KEY 0 5810 GOTO Spin 5820 C disp:! 5830 - IF Fdisp-0 THEN Fdisp-2 5840 IF F disp<>2 THEN GOTO Mess disp 5850 OFF KEY 1 5860 GOTO Spin 5870 X disp:! 5880 - IF F disp-0 THEN F disp-3 5890 IF F-disp<>3 THEN GOTO Mess disp 5900 OFF KEY 2 5910 GOTO Spin 5920 Vv disp:! 5930 -IF P disp-0 THEN P disp-1 5940 IF P-disp<>l THEN GOTO Mess disp 5950 OFF KEY 5 5960 GOTO Spin 5970 Hh disp:! 5980 IF P disp-0 THEN P disp-2 5990 IF P-disp<>2 THEN GOTO Mess disp 6000 OFF KEY 6 6010 GOTO Spin 6020 Hv disp:! 6030 -IF P disp-0 THEN P disp-3 6040 IF P —dip<>3 THEN 'OTO Mess disp 6050 OFF KEY 7 6060 GOTO Spin 6070 Vh disp:! 6080 -IF P disp-0 THEN P disp-4 6090 IF Pdisp<>4 THEN GOTO Mess disp 6100 OFF KEY 8 6110 GOTO Spin 6120 Disp:! 6130 IF F disp-0 OR P disp-0 THEN 6140 DISP "YOU MUST-SET BOTH A FREQUENCY AND A POLARIZATION TO DISPLAY" 6150 GOTO Spin 6160 END IF 6170 OFF KEY 6180 DISP "WORKINGN 6190 OUTPUT eNwa;"USEPASC"

6200 CALL Freq set(F disp) 6210 OUTPUT @Nwa;"TIRDTRANON; LOGM; GATEOFF; CONT" 6220 IF Debug$-"OFF" THEN 6230 OUTPUT @Nwa; DEBUOFF" 6240 OUTPUT @Nwa;"TITL """&Freq$(Fdisp)&" BAND - "&Pol$(P_disp)&"""" 6250 ELSE 6260 OUTPUT @Nwa;"DEBUON" 6270 END IF 6280 CALL Freq sw(F disp) 6290 CALL Pol _w(F_disp,P _disp) 6300 DISP "" 6310 GOTO Menu 6320 Can disp:! 6330 UFF KEY 6340 F disp-F disp old 6350 P-disp-Pdisp-old 6360 DTSP " 6370 GOTO Menu 6380 Messdisp:! 6390 DISP "ONLY ONE FREQ./POL. CAN BE DISPLAYED AT ONCE." 6400 GOTO Spin 6410! --- —- ----------------------------------------------------------- 6420 Begin:! 6430 OFF KEY 6440 Clear crt 6450 Sub end:! 6460 Message$-"" 6470 SUBEND! Radar menu 6480!****************************************************************** 6490 SUB Clear crt 6500 OUTPUT KBD;CHR$(255)&CHRS (75); 6510 SUBEND 6520 ********************************************************************** 6530 SUB Date string(BriefdateS, Realtime) 6540 6550! This subroutine converts the timedate as produced by the computer 6560! to a 10-digit number YYMMDDHHMM used for various-purposes. 6570 6580 INTEGER Month 6590 RealdateS-DATE$ (Realtime) 6600 Brief date$-Realdate$[10,11] 6610 SELECT RealdateS[4,6] 6620 CASE "Jan" 6630 Month-1 6640 CASE "Feb" 6650 Month-2 6660 CASE "Mar" 6670 Month-3 6680 CASE "Apr" 6690 Month-4 6700 CASE "May" 6710 Month-5 6720 CASE "Jun" 6730 Month-6 6740 CASE "Jul" 6750 Month-7 6760 CASE "Aug" 6770 Month-8 6780 CASE "Sep" 6790 Month-9 6800 CASE "Oct" 6810 Month-10 6820 CASE "Nov" 6830 Month-11 6840 CASE "Dec" 6850 Month-12 6860 END SELECT 6870 Month$-VALS (Month) 6880 IF LEN(MonthS)-1 THEN Month$-"0"&Month$ 6890 Day$-VALS (VAL(Realdate$[1,2])) 6900 IF LEN(Day$)-l THEN Day$-"0"&Day$ 6910 Brief dateS-Brief date$&MonthS&Day$ 6920 RealtIme$-TIME$ (Realtime) 6930 Briefdate$-Briefdate$&Realtime$S[1,2] Realtime$[4,5] 6940 SUBEND! Date string 6950!************************************************************************ 6960 SUB Gate set(Gatecent,Gate_span,Angle,Range,Height,Beam,INTEGER F) 6970! 6980 This subroutine sets the time gate and returns the range distance. 6990 7000 COM /Paths/ eNwa, Nwa data, Hpib, Relay 7010 COM /Constants/ Vel,Zero(*) 7020 COM /Sys 1/ Freq$(*),Freqcent(*),Freqspan(*) 7030 COM /Sys-5/ TargetS,VersionS,ModeS,Out typeS,Sound$,BellS,Debug$ 7040 Gate cenl-1.50E-7 7050 Gate span-2.00E-8 7060 OUTPUT @Nwa;"TIMDTRANON; LOGM;" 7070 OUTPUT @Nwa; GATSNORM;GATECENT "&VALS(Gate_cent)&" S;GATESPAN "&VALS(Gate span)&" S;GATECENT"

7080 OUTPUT @Nwa;"OPC?;WAIT" 7090 ENTER @Nwa;Reply 7100 LOCAL 716 7110 DISP "SET CENTER OF TIME GATE WITH KNOB OR KEYPAD <CONTINUE>";Bell$ 7120 PAUSE 7130 REMOTE 716 7140 DISP "WORKING" 7150 OUTPUT @Nwa;"OUTPACTI;" 7160 ENTER @Nwa;Gate cent 7170! 7180 OUTPUT @Nwa;"MARKl";Gate cent 7190 LOCAL 716 7200 DISP "FIND RANGE WITH MARKER" 7210 PAUSE 7220 REMOTE 716 7230 OUTPUT @Nwa;"OUTPACTI;" 7240 ENTER @Nwa;Range 7250 Range-(Range-Zero(F))*Vel/2.0 7260 Height-Range*COS (Angle) 7270 Gate span-2* (Height/Vel) * (1/COS (Angle+Beam/2)-1/COS (Angle-Beam/2)) 7280 Test l.5*(1.92/Freq span(F))/1.E+9 7290 IF Gate span<Test THEN Gate span-Test 7300 OUTPUT lNwa;"GATESPAN"&VAL$TGatespan)&" S" 7310 OUTPUT @Nwa;"GATESPAN" 7320 OUTPUT @Nwa;"OPC?;WAIT" 7330 ENTER @Nwa;Reply 7340 LOCAL 716 7350 DISP "MODIFY GATE SPAN IF DESIRED <CONTINUE>";Bell$ 7360 PAUSE 7370 REMOTE 716 7380 DISP "WORKING" 7390 OUTPUT @Nwa;"OUTPACTI;" 7400 ENTER @Nwa;Gate span 7410 IF Gate span<0 THEN Gate span —Gate span 7420 OUTPUT TNwa;"GATESPAN "&VALS(Gate span)&" S" 7430 SUBEND! Gate set 7440!******** ** ************************** 7450 SUB Cal(INTEGER Cal flag(*),Npts) 7460 7470! This subroutine calibrates all frequencies and polarizations which 7480! were selected from main menu after pressing the CALIBRATE softkey 7490! (as recorded in the Calflag matrix). 7500 OPTION BASE 1 7510 COM /Paths/ @Nwa,8Nwa data, Hpib, Relay 7520 COM /Constants/ Vel,Zero(*) 7530 COM /Sys 1/ FreqS(*),Freqcent (*),Freq span(*) 7540 COM /Sys-2/ PolS(*),PolswT(*) 7550 COM /Sys 3/ INTEGER F disp,P disp 7560 COM /Sys-4/ Drive a$,lSrive bT,Drive cS,INTEGER Preamble,Bytes 7570 COM /Sys 5/ Targe$S,Version$,ModeS$,Uut typeS,SoundS,BellS,DebugS 7580 COM /Cal7 Cal keepS(*),Rcal(*),DonecalT*) 7590 INTEGER F,P, K 7600 ALLOCATE COMPLEX Room(3,4,Npts),Refer(3,4,Npts),Room ref(3,4,Npts) 7610 ALLOCATE Amp (Npts),Phas (Npts), Freq(Npts) 7620 ALLOCATE COMPLEX Sph(Npts),Kvv(Npts),Khh(Npts),Khv(Npts),Kvh(Npts) 7630 ALLOCATE COMPLEX Kc(Npts),Kt(Npts),Km(Npts), Kd(Npts) 7640 TO-TIMEDATE 7650 Preamble-9025 7660 Bytes-Npts*16 7670 MAT Refer- (CMPLX(0,0)) 7680 MAT Room ref- (CMPLX(OO)) 7690 MAT Room- (CMPLX(0,0)) 7700 7710 Begin stepping through frequency and polarization for 7720 calibration. 7730! 7740 FOR F-1 TO 3 7750 IF Cal flag(1,F)-0 THEN 7910 7760 CALL Freqset(F) 7770 CALL Freq_sw(F) 7780 CALL Pol sw(F,1) 7790 OUTPUT @Rwa;"TIMDTRANON;STAR 100 NS;STOP 400 NS" 7800 DISP "POSITION REFERENCE TARGET FOR "&Freq$(F)&" BAND <CONTINUE>";BellS 7810 PAUSE 7820 DISP "WORKING" 7830 CALL Maasure cal (Room ref(*),Cal_flag(*),Npts,F,"ROOM REF") 7840! 7850! Measure background 7860 7870 DISP "REMOVE REFERENCE TARGET (DO NOT REMOVE MOUNT!) <CONTINUE>";BellS 7880 PAUSE 7890 DISP "WORKING" 7900 CALL Measure cal(Room(*),Calflag(*),Npts,F,"ROOM") 7910 NEXT F 7920 MAT Refer- Room ref-Room 7930 MAT Room ref- Room 7940! 7950! JUGGLE ARRAYS AND STORE CALIBRATION.

7960 7970 FOR F-1 TO 3 7980 IF Cal flag(1,F)-0 THEN 8460 7990 DISP "ENTER CALIBRATION TARGET TYPE (SPH8,SPH12) FOR ";Freq$(F);"-BAND"; 8000 INPUT File refS 8010 Move file fo RAM cache. 8020 COPY FNFileloc$(File ref$,"/LCX/SphTheor"&Drive aS) TO File ref$&Drive cS 8030 ASSIGN @Datafile TO Fileref$&Drive_cS;FORMAT OFF 8040 ENTER @Datafile,l;File refS,T, Bytes,Preamble,Npts 8050 ENTER @Datafile;Freq(*, Amp (*),Phas (*) 8060 ASSIGN @Datafile TO * 8070 8080 Convert Theoretical Sphere Data to Real & Imaginary 8090 8100 FOR K-1 TO Npts 8110 Sph re-Amp(K)*COS(Phas(K)) 8120 Sph-im-Amp(K)*SIN (Phas (K)) 8130 SphTK) CMPLX(Sph_re,Sphim) 8140 NEXT K 8150 8160! Calculating Calibration Constants 8170 8180 FOR P-1 TO 3 8190 IF Cal flag(2,P)-0 THEN 8320 8200 MAT Kcz Refer(F,P,*) 8210 IF P-1 THEN MAT Kw- Sph/Kc 8220 IF P-2 THEN MAT Khh- Sph/Kc 8230 IF P-3 THEN 8240 MAT Kt- Refer(F,4,*) 8250 FOR K-1 TO Npts 8260 Km (K) -SQRT (Kvv (K) *Khh (K)) 8270 Kd (K) -SQRT (Kc (K) /Kt (K)) 8280 NEXT K 8290 MAT Khv- Km/Kd 8300 MAT Kvh- Km. Kd 8310 END IF 8320 NEXT P 8330 Realtime-TIMEDATE 8340 8350 Storing Calibration Constants 8360 8370 CALL Date string(Cal keep$(F),Realtime) 8380 Cal keep$TF)-FreqS(FT&Cal keep$(F) [2,10] 8390 Bytes per rec-256+(4*16*Nptis) 8400 CREATE BDAT FNFilelocS(Cal keep$(F),"/LCX/CAL"&Drive a$),1,Bytes per rec 8410 ASSIGN eKeep TO FNFileloc$TCal keepS(F),"/LCX/CAL"&Drive aS) 8420 OUTPUT @Keep;Cal keeps (F),Npts.Rcal (F) 8430 OUTPUT @Keep;KvvT*),Khh(*), Khv(*),Kvh(*) 8440 ASSIGN @Keep TO * 8450 Donecal (F) -1 8460 NEXT F 8470 CALL Freq_sw(F_disp) 8480 CALL Pol sw(F disp,P disp) 8490 T1-TIMEDATE 8500 T-(T1-TO)/60 8510 DISP "CALIBRATION TOOK ";DROUND(T,5);" MINUTES" 8520 WAIT 5 8530 SUBEND! Cal 8540 '*** **. 8540!************************************************************************ 8550 SUB Measure cal (COMPLEX Array(*),INTEGER Flag(*),Npts,F,TitleS) 8560 8570! This subroutine measures the cal target and backgound. 8580! It is called from Cal subroutine. 8590 8600 OPTION BASE 1 8610 COM /Paths/ @Nwa, Nwa data, Hpib, Relay 8620 COM /Sys 1/ Freq$(*),Freqcent (*),Freq span(*) 8630 COM /Sys-2/ PolS(*),Polsw4(*) 8640 COM /Cal7 Cal keepS(*),Rcal(*),Donecal(*) 8650 INTEGER P 8660 ALLOCATE COMPLEX Dummy(Npts) 8670 FOR P-1 TO 4 8680 IF Flag(2,P)-0 THEN 8870 8690 CALL Pol sw(F,P) 8700 IF TitleS-"ROOM REF" THEN!Do the co-pols first 8710 IF P-3 THEN - 8720 DISP "POSITION CROSS-POL TARGET FOR "&FreqS(F)&" BAND <CONTINUE>";BellS 8730 PAUSE 8740 END IF 8750 CALL Gate set (Gate cent(F, P),Gate span(F,P),Angle,Range (F),Height,Beam(F),F) 8760 Rcal(F) -Ringe (F) 8770 PRINT "RANGE-, Rcal (F) 8780 OUTPUT @Nwa;" TIMDTRANOFF;" 8790 OUTPUT eNwa;"SAVE"&VAL$(P) &; WAIT;" 8800 END IF 8810 OUTPUT @Nwa;"RECA"aVALS(P)&"; WAIT;" 8820 OUTPUT @Nwa;"POLA; AUTO; AVERFACT 17; 8830 OUTPUT @Nwa;"AVEROON; NUMG 17;"

8840 CALL Get form3(Dummy(*),Npts,F) 8850 MAT Array(F,P,*)- Dummy 8860 OUTPUT eNwa;"AVEROOFF; LOGM; TIMDTRANON; WAIT; CONT" 8870 NEXT P 8880 SUBEND! Measure cal 8890! ***** *************************************************************** 10650 SUB Pointtarget 10660! 10670 This subroutine measures the rcs of a point target. 10680 The range of the target and cal target should be the same, 10690 if different, correct it using the (Rcal/Range)^2. 10700 10710 OPTION BASE 1 10720 COM /Paths/ eNwa, Nwa data, Hpib, Relay 10730 COM /Constants/ Vel,Zero(*) 10740 COM /Sys 1/ Freq$(*),Freqcent(*),Freq span(*) 10750 COM /Sys 2/ Pol$(*),PolswS(*) 10760 COM /Sys-3/ INTEGER F disp,P disp 10770 COM /Sys-4/ Drive a$,Urive bT,Drive cS, INTEGER Preamble, Bytes 10780 COM /Sys 5/ Target$,Version$,ModeS, Out typeS,SoundS,BellS,Debug$ 10790 COM /Sys 6/ Angle,AngleS,Bin rng(*),Beam(*),INTEGER Npts,Ntrace 10800 COM /Sys-7/ INTEGER Cal flagT*),Meas flag(*) 10810 COM /Ca17 Cal keepS(*),cal(*),Donecal(*) 10820 DIM OutfilS[1U] 10830 INTEGER F,P,K,Flg 10840 10850! Allocate memory space. 10860 10870 ALLOCATE COMPLEX Room(3,4,Npts),Refer(3,4,Npts),Room ref(3,4,Npts) 10880 ALLOCATE COMPLEX Kcal(3,4,Npts),Subkcal(Npts),Dummy (Npts) 10890 ALLOCATE COMPLEX Datal(3,4,Npts) 10900 ALLOCATE Magdata(3,4,Npts),Phasedata(3,4,Npts) 10910 ALLOCATE Range(3) 10920 ALLOCATE Gate cent(3),Gate span(3) 10930 ALLOCATE Tim (, 4) 10940 MAT Refer- (CMPLX(0,0)) 10950 MAT Room ref- (CMPLX(0,0)) 10960 MAT Room= (CMPLX(0,0)) 10970 CALL Load cal(Kcal(*),Flg) 10980 IF Flg-1 THEN SUBEXIT 10990 11000! Begin target measurement (step thru frequency & polarization). 11010 11020 FOR F-1 TO 3 11030 IF Meas flag(l,F)-O THEN 11450 11040 CALL Freq_set (F) 11050 CALL Freq_sw(F) 11060 Flg-0 11070 FOR P-1 TO 4 11080 IF Meas flag(2,P)-0 THEN 11250 11090 CALL PoI sw(F,P) 11100 IF Flg-0 THEN 11110 DISP "POSITION TEST TARGET FOR "&Freq$(F)&" BAND <CONTINUE>";Bell$ 11120 PAUSE 11130 END IF 11140 CALL Gate set(Gate cent(F),Gate_span(F),Angle,Range(F),Height,Beam(F),F) 11150 Rcal(F) -Rnge(F) - 11160 PRINT "RANGE-",Rcal(F) 11170 OUTPUT @Nwa;" TIMDTRANOFF;" 11180 OUTPUT @Nwa;"SAVE"&VAL$(P)& "; WAIT;" 11190 OUTPUT @Nwa;"POLA; AUTO; AVERFACT 17;" 11200 OUTPUT eNwa;"AVEROON; NUMG 17;" 11210 CALL Get form3(Dummy(*),Npts,F) 11220 MAT Room ref (F,P,*) Dummy 11230 Flg-1 - 11240 OUTPUT eNwa;"AVEROOFF; LOGM; TIMDTRANON; WAIT; CONT" 11250 NEXT P 11260! 11270! Background measurement 11280! 11290 Flg-0 11300 FOR P-1 TO 4 11310 IF Meas flag(2,P)-0 THEN 11440 11320 CALL PoT sw(F,P) 11330 IF Flg-0 THEN 11340 DISP "REMOVE TEST TARGET (DO NOT REMOVE MOUNT!) <CONTINUE>";BellS 11350 PAUSE 11360 END IF 11370 OUTPUT QNwa;"RECA"&VALS(P)&"; WAIT;" 11380 OUTPUT 9Nwa;"POLA; AUTO; AVERFACT 17;" 11390 OUTPUT eNwa;"AVEROON; NUMG 17;" 11400 CALL Get form3(Dummy (*),Npts,F) 11410 MAT RoomTF,P,*)- Dummy 11420 Flg-1 11430 OUTPUT @Nwa;"AVEROOFF; LOGM; TIMDTRANON; WAIT; CONT" 11440 NEXT P 11450 NEXT F 11460!

11470! Data correction Magdata is in voltage 11480 11490 MAT Refer- Room ref-Room! Subtract Background 11500 MAT Room ref- Room 11510 MAT DataT- Kcal. Refer! Scale data according to Cal constants 11520 MAT Magdata- ABS(Datal)! Store the magnitude in Magdata 11530 MAT Phasedata- ARG(Datal)! Store the phase in Phasedata 11540 11550 Realtime-TIMEDATE 11560 CALL Date string (OutfilS,Realtime) 11570 CALL Catalog(Outfil$,Mode$,Target$,Angle) 11580 11590 Write output to printer if this output type is set. 11600 11610 IF TRIMS(Out typeS)-"PRINT' OR TRIMS(Out type$)-"PRINT/DISC" THEN 11620 PRINTER IS PRT 11630 PRINT 11640 PRINT "VERSION - ";Version$;" # OF POINTS - ";Npts 11650 PRINT 11660 PRINT 11670 PRINT TAB(4);"FREQ";TAB(12);"GATE CENT";TAB(25);"GATE SPAN"; 11680 PRINT TAB(38); R CAL";TAB(47);"RANGE";TAB (56);"CAL FITE 11690 PRINT 11700 FOR F-1 TO 3 11710 IF Meas flag(1,F)-0 THEN 11750 11720 PRINT TAB(6);FreqS(F);TAB(12);DROUND(Gate cent (F),5);TAB(25);DROUND(Gate span(F),5); 11730 PRINT TAB(37);DROUND(Rcal(F),4);TAB(46);DROUND (Range(F),4); 11740 PRINT TAB(55);Cal keep$(F) 11750 NEXT F 11760 PRINT 11770 PRINT 11780 PRINT TAB(4);"FREQ";TAB(11); POL";TAB(20);"MAGNITUDE";TAB(34);" PHASE " 11790 PRINT 11800 FOR F-1 TO 3 11810 IF Meas flag(1,F)-0 THEN 11960 11820 FOR P-1-TO 4 11830 IF Meas flag(2,P)-0 THEN 11940 11840 FOR K-1-TO 3 11850 PRINT TAB(4);FreqS(F)&" beg";TAB(11);Pol$(P);TAB(19); 11860 PRINT DROUND(Magdata(F,, 1),5);TAB(30);DROUND(Phasedata(F,P,1),5) 11870 11880 PRINT TAB(4);FreqS(F)A" mid";TAB(11);PolS(P);TAB(19); 11890 PRINT DROUND(Magdata(F,P, (Npts-1)/2),5);TAB(30);DROUND(Phasedata(F,P, (Npts-1)/2),5) 11900! 11910 PRINT TAB(4);Freq$(F)&a end";TAB(11);PolS(P);TAB(19); 11920 PRINT DROUND(Magdata(F,P, Npts),5);TAB(30);DROUND(Phasedata(F,P,Npts),5) 11930 NEXT K 11940 NEXT P 11950 PRINT 11960 NEXT F 11970 PRINTER IS CRT 11980 END IF 11990 12000! Create an output filename based on the current date and time. 12010! Then output important processing parameters and sigma zero data. 12020 12030 IF TRIMS(Out type$)- DISC" OR TRIMS(Out typeS)-"PRINT/DISC" THEN 12040 Bytes per rec-64+(10+12+7+30+3*10+4*8T8*2+7*5) + (8*8)+(Npts*2*8) 12050 CREATE BDAT FNFileloc$(Outfil$, "/LCX/DATA"&Drive aS),1,Bytes_per rec 12060 ASSIGN @Disc TO FNFilelocS(Outfil$, /LCX/DATA"&Dirve a$) 12070 OUTPUT @Disc;Outfil$,Version$,Mode$,Target$,Cal keep (*),Angle,Range(*), Measflag(*) 12080 OUTPUT @Disc;Gate cent(*),Gate span(*),Npts,Ntrace 12090 OUTPUT @Disc;Magdata(*), Phasedata(*) 12100 ASSIGN eDisc TO * 12110 END IF 12120 12130! Place radar in default mode. 12140! 12150 CALL Freq_sw(F disp) 12160 CALL Pol sw(F aisp,P disp) 12170 SUBEND! Point Target 12180 ************************************************************************ 12190 SUB Surface 12200! 12210! This subroutine treats all targets as surfaces. 12220! It measures the sigma-zero and std dev of it. 12230! It averages each frequency trace and then averages 12240! over Ntrace traces. 12250 12260 OPTION BASE 1 12270 COM /Paths/ @Nwa, Nwa data, Hpib, Relay 12280 COM /Constants/ Vel,Zero(*) 12290 COM /Sys 1/ FreqS(*),Freqcent(*),Freq span(*) 12300 COM /Sys-2/ Pol$(*),PolswN(*) 12310 COM /Sys-3/ INTEGER F disp,P disp 12320 COM /Sys 4/ Drive a$,Drive b, Drive cS,INTEGER Preamble,Bytes 12330 COM /Sys-5/ Targe$S,VersionS,Mode$,Out type$,Sound$,Bell$,Debug$ 12340 COM /Sys-6/ Angle,AngleS,Binrng(*),Beam(*),INTEGER Npts,Ntrace

12350 COM /Sys 7/ INTEGER Cal flag(*),Meas flag(*) 12360 COM /Ca17 Cal keep (*),cal(*),Donecal(*) 12370 DIM Outfil$[1U] 12380 INTEGER F,P,K,Flg,Skyflg 12390! 12400! Allocate memory space. 12410! 12420 ALLOCATE COMPLEX Sky(3,4,Npts),Subsky(Npts),Datal (Npts) 12430 ALLOCATE COMPLEX Kcal (3, 4,Npts), Subkcal (Npts), Dummy(Npts) 12440 ALLOCATE Pwr mag(Ntrace),Dummy5(Npts),Dummy6(Npts) 12450 ALLOCATE Sig-zro(3,4),Sig_zro_sd(3,4) 12460 ALLOCATE Range(3) 12470 ALLOCATE Gate cent(3),Gate span(3) 12480 ALLOCATE Tim (, 4) 12490 MAT Sky- (CMPLX(0,0)) 12500 Skyflg-0 12510! 12520! Load Calibration Constants 12530 12540 CALL Load cal(Kcal(*),Flg) 12550 IF Flg-1 THEN SUBEXIT 12560 CALL Angle set(Angle) 12570 IF FNAsk("SO SKY MEASUREMENT?") THEN 12580 FOR F-1 TO 3 12590 CALL Freq set(F) 12600 CALL Freq sw(F) 12610 CALL Pol sw(F,1) 12620 CALL Gate set(Gate cent(F),Gate span(F),Angle,Range(F),Height,Beam(F),F) 12630 OUTPUT @Nwa;"GATECENT "&VAL$(GaVe cent(F))&" S;" 12640 OUTPUT eNwa;"GATESPAN "&VALS(Gate-span(F)) " S;" 12650 CALL Measure_sky(Sky(*),Meas_flag(*),Npts,F) 12660 Skyflg-1 12670 NEXT F 12680 END IF 12690! 12700! Begin measurement sequence (step thru frequency and polarization). 12710! 12720 FOR F-1 TO 3 12730 IF Meas flag(1,F)-0 THEN 13350 12740 CALL Freqset(F) 12750 CALL Freqsw(F) 12760 IF Skyflg-0 THEN 12770 CALL Gate set(Gate cent(F),Gate span(F),Angle,Range(F), Height, Beam(F),F) 12780 END IF 12790 OUTPUT eNwa;"GATECENT "&VAL$(Gate cent(F) ) S" 12800 OUTPUT 8Nwa;"GATESPAN "&VALS (Gatespan(F)) &" S; 12810 OUTPUT eNwa;"TIMDTRANOFF;" 12820 OUTPUT eNwa;"POLA;ENTO;"! Polar form for Re/Im pairs. 12830 OUTPUT eNwa;"AUTO;OPC?;WAIT" 12840 ENTER eNwa;Reply 12850 FOR P-1 TO 4 12860 IF Meas_flag(2,P)-0 THEN 13330 12870 MAT Subsky- Sky(F,P,*) 12880 MAT Subkcal- Kcal(F,P,*) 12890 CALL Pol sw(F,P) 12900 DISP "READY FOR MEASUREMENT? <CONTINUE>";Bell$ 12910 PAUSE 12920 DISP "WORKING" 12930! 12940! Average frequency trace points across band. 12950! 12960 Tim(F,P)-TIMEDATE! time of measurement. 12970! Display number of traces remaining in this set. 12980 PRINT TABXY(1,5),"Traces remaining - "; 12990 FOR K-1 TO Ntrace! Loop through Ntrace traces 13000! Get a trace, consisting of Npts complex values, from the 13010! HP8753 using form3. Forml can be used,if faster data 13020! transfer is required. 13030 CALL Get form3(Dummy(*),Npts,F) 13040 MAT DataT- Dummy-Subsky! Subtract Sky 13050 MAT Dummy- Datal. Subkcal! Multiply by cal constant 13060 MAT Dummy5- ABS (Dummy) 13070 MAT Dummy6- Dummy5. Dummy5! Convert to power 13080! Sum the power over Npts points and divide by Npts to get 13090! average power. 13100 Pwr mag(K)-SUM(Dummy6)/Npts 13110 WAIT 2 13120 PRINT TABXY(20,50); 13130 PRINT USING "DDD";Ntrace-K 13140 NEXT K 13150 13160! Scale the data according to the calibration and illum integral. 13170! Then generate stats on the sigma zero measurement. 13180! 13190 Sum-0 13200 Sumsq-0 13210 Fk-l1(FNIll(Height,Angle,F,P)*Rcal(F)^4)! Calc.the ill intg ratio 13220 FOR K-1 TO Ntrace

13230 13240 13250 13260 13270 13280 13290 13300 13310 13320 13330 13340 13350 13360 13370 13380 13390 13400 13410 13420 13430 13440 13450 13460 13470 13480 13490 13500 13510 13520 13530 13540 13550 13560 13570 13580 13590 13600 13610 13620 13630 13640 13650 13660 13670 13680 13690 13700 13710 13720 13730 13740 13750 13760 13770 13780 13790 13800 13810 13820 13830 13840 13850 13860 13870 13880 13890 13900 13910 13920 13930 13940 13950 13960 13970 13980 13990 14000 14010 14020 14030 14040 14050 14060 14070 14080 14090 14100! Scale each trace by the illumination integral and sum. Sum-Sum+Pwr mag(K)*Fk! Also sum Ehe squares. Sumsq-Sumsq+Pwrmag(K) *Pwrmag (K)*Fk*Fk NEXT K! Sigma-zero is the average scaled power. Sig zro (F, P) -Sum/Ntrace! ATso compute the std dev of the Ntrace valuesod sig-zro. Sig zro sd(F,P)-SQR((Ntrace*Sumsq-Sum*Sum)/ (Ntrace* (Ntrace-1))) Sig zro sd(F,P)-Sig zrosd/SQR(Ntrace) NEXT P OUTPUT @Nwa;" TIMDTRANON; WAIT;" NEXT F Realtime-TIMEDATE Put current time in Realtime variable. Create a 10 character filename basedon the current time and date. CALL Date string(OutfilS,Realtime) CALL CataTog (Outfil$,ModeS, Target$, Angle)! Write output to printer if this output type is set.! IF TRIMS(Out typeS)-"PRINT" OR TRIMS(Out typeS)-"PRINT/DISC" THEN PRINTER IS PRT PRINT PRINT "VERSION - ";VersionS;" # OF POINTS - n;Npts;" i OF TRACES - ";Ntrace PRINT PRINT PRINT TAB(4);"FREQ";TAB(12);"GATE CENT";TAB(25);"GATE SPAN";TAB(38); PRINT TAB(38);"R CAL";TAB(47); RANGE";TAB(56); CAL FITE" PRINT FOR F-1 TO 3 IF Meas flag(1,F)-0 THEN 13570 PRINT TXB(6);FreqS(F);TAB(12);DROUND(Gate cent(F),5);TAB(25);DROUND(Gate_span(F),5); PRINT TAB(37);DROUND(Rcal(F),4);TAB(46);DROUND(Range(F),4); PRINT TAB(55);Calkeep$ (F) NEXT F PRINT PRINT PRINT TAB(4);"FREQ";TAB(11);"POL";TAB(20);"SIG ZRO";TAB(34);"STD. DEV.";TAB(51);"TIME" PRINT FOR F-1 TO 3 IF Measflag(1,F)-0 THEN 13700 FOR P-1 TO 4 IF Meas flag(2,P)-0 THEN 13680 PRINT TAB(6);FreqS(F);TAB(11);PolS(P);TAB(19);DROUND(FNDb(Sig zro(F,P)),5); PRINT TAB(33);DROUND(Sig_zro_sd(F,P),5);TAB(49);TIME (Tim (F, P); NEXT P PRINT NEXT F PRINTER IS CRT END IF!! Create an output filename based on the current date and time.! Data will be stored in Directory: /LCX/DATA.! Then output important processing parameters and sigma zero data. IF TRIMS(Out typeS) -DISC" OR TRIMS(Out typeS) -"PRINT/DISC THEN Bytes per rec-64+ (10+12+7+30+3*10+4*8T8*2+7*4) + (8*8) + (24*8) CREATE BDAT FNFilelocS(OutfilS, /LCX/DATA"&Drive aS),l,Bytesper rec ASSIGN eDisc TO FNFilelocS(Outfil$,"/LCX/DATA"&Drive a$) OUTPUT 8Disc;Outfil$,Version$,Mode$, TargetS, Cal keep (*),Angle, Range(*),Meas flag(*) OUTPUT @Disc;Gate cent (*),Gate span(*),Npts,Ntrace OUTPUT eDisc;Sig Zro(*),Sig zro sd(*) ASSIGN eDisc TO END IF! Place radar in default mode.! CALL Freq sw(F disp) CALL Pol sw(F aisp,P disp) SUBEND! Surfaci SUB Volume!! This is the volume subroutine designed to measure volume! backscattering coefficients for extended targets such as trees. OPTION BASE 1 COM /Paths/ SNwa,eNwa data,8Hpib, Relay COM /Constants/ Vel,Zero(*) COM /Sys 1/ Freq$(*),Freq_cent(*),Freq span(*) COM /Sys-2/ Pol$(*),Polsw( *) COM /Sys 3/ INTEGER F disp,P disp COM /Sys-5/ TargetS,Version$7ModeS, Out type$, Sound$,Bell, Debug$ COM /Sys-6/ Angle,AngleS,Bin rng(*),Beam(*),INTEGER Npts,Ntrace COM /Sys-7/ INTEGER Cal flagT*),Meas flag(*) COM /Cal7 Cal keepS(*),Rcal(*),Donecal(*) REAL Delm(3),Tim(3,4),Start int(3),Stop int(3) REAL Starttime(3),Stoptime(3),Nobytei

14110 REAL Bin rng old(3) 14120 INTEGER F,P,K, L,Flg,Ichk,Istep,Nbins(3),Ibeg, Iend, N,Nbins max 14130! 14140! Allocate memory space. 14150 14160 MAT Bin rng old- Bin rng 14170 ALLOCATF CORPLEX Kcatm(3,4),Kcal(3,4,Npts) 14180 ALLOCATE COMPLEX Block(Npts) 14190 ALLOCATE INTEGER Binary(Npts,0:2),Bin(Ntrace,Npts,0:2) 14200 ALLOCATE Sigv att(3,4,Npts) 14210 ALLOCATE Sigv att sd(3,4,Npts) 14220 ALLOCATE Sig zro (7, 4) 14230 ALLOCATE Sig zro sd(3,4) 14240 ALLOCATE Pwr magTNtrace,Npts) 14250 ALLOCATE SumT3,4,Npts) 14260 ALLOCATE Sumsq(3,4,Npts) 14270 ALLOCATE Range(3) 14280 ALLOCATE Range s1(3,4,Npts) 14290 MAT Kcalm- (CM7LX(0,0)) 14300 MAT Sigv att- (0) 14310 MAT Sigv att sd- (0) 14320 MAT Sig zro- (0) 14330 MAT Sig zro sd- (0) 14340 MAT Pwr mag- (0) 14350 MAT Sum= (0) 14360 MAT Sumsq- (0) 14370! 14380! Read in calibration data. 14390! 14400 CALL Load cal(Kcal(*),Flg) 14410 IF Flg-1 THEN SUBEXIT 14420! 14430! Begin measurement sequence (step thru frequency and polarization). 14440 14450 FOR F-1 TO 3 14460 IF Meas flag(l,F)-0 THEN 15460 14470 CALL Freqsw(F) 14480 Ichk-0 14490 FOR P-1 TO 4 14500 IF Meas flag(2,P)-O THEN 15450 14510 CALL PoT sw(F,P) 14520! Average the Calibaration constants. 14530 FOR N-1 TO Npts, 14540 Kcalm (F, P) -Kcalm(F P) +Kcal (F, P, N) 14550 NEXT N 14560 MAT Kcalm- Kcalm/(Npts) 14570 OUTPUT eNwa; -MARKDISC" 14580! 14590! Set start and stop integration times (and other necessary 14600! parameters) for each new frequency. 14610! Prompt user for readiness. 14620 14630 IF Ichk-0 THEN 14640 CALL Integ set(Start int(F),Stopint(F)) 14650 Start timeTF)-Start Tnt(F) 14660 Delm (F) -(Stop int (FT-Start time(F)) / (Npts-) 14670 Istep-PROUND(T2*Bin rng(F)7Vel)/Delm(F),0) 14680 Bin time-Istep*DelmTF) 14690 Nbins (F) —INT(-(Stop int(F)-Start int(F))/Bin time) 14700 stop time(F)-Start int(F)+Nbins(FT*Bin time-Dilm(F) 14710 Loop: DelmTF)-(Stop timeTF)-Start time(F))/(Rpts-1) 14720 Istep-PROUND(T2*Bin rng(F)/Vel)/Delm(F),0) 14730 Bin_time-Istep*DelmTF) 14740 Nbins(F) —INT (-(Stop int (F)-Start int(F) )/Bin time) 14750 IF Nbins(F)*Istep>Npfs THEN 14760 Stop time (F)-Stop time(F)+Bin time 14770 DISP-"READJUSTING-STOP TIME" 14780 GOTO Loop 14790 END IF 14800 Stop int(F)-Start int(F)+Nbins(F)*Bin time-Delm(F) 14810 Bin rng(F)-Bin tiie*.5*Vel 14820 Ich-I-l 14830 END IF 14840 OUTPUT *Nwa;"STAR "&VALS(Start time(F))&" S" 14850 OUTPUT *Nwa;"STOP "&VAL$(Stop time(F)) & S" 14860 OUTPUT INwa;"POLA;AUTO;ENTO"! Smith chart form for Re/Im pairs. 14870 OUTPUT SNwa; OPC?;WAIT" 14880 ENTER #Nwa;Reply 14890 DISP "READY FOR MEASUREMENT? <CONTINUE>";Bell$ 14900 PAUSE 14910 DISP "WORKING" 14920 14930! Transfer data using the binary forml and convert to form3. 14940 i Integrate the power in each bin for each of the (Ntrace) 14950! number of traces. 14960! 14970 Tim(F,P)-TIMEDATE! time of measurement. 14980 FOR K-1 TO Ntrace

14990 CALL Get forml(Binary(*)) 15000 MAT Bin(K,*,*)- Binary 15010 PRINT K 15020 NEXT K 15030 FOR K-1 TO Ntrace 15040 MAT Binary- Bin(K,*,*) 15050 CALL Convert (Block (*),Binary(*),Npts) 15060! Creating the sum & sum*sum of the raw trace to store on disc 15070 FOR N-l TO Npts 15080 Pwr-ABS (Block (N)) ^2 15090 Sum(F,P,N)-Pwr 15100 Sumsq(F, P,N) -Pwr*Pwr 15110 NEXT N 15120! Determining the average power of each bin 15130 FOR L-1 TO Nbins(F) 15140 Ibeg-l+(L-) *Istep 15150 Iend-L*Istep 15160 FOR M-Ibeg TO Iend 15170 Pwr mag(K,L)-Pwr_mag(K,L)+ABS(Block (M)*Kcalm(F,P)) ^2 15180 NEXT M 15190 Pwr mag(K,L)-Pwrmag (K, L)/Istep 15200 NEXT L 15210 NEXT K 15220 15230! Scale the data according to the calibration and illum integral. 15240! Then generate stats on the sigma zero (volume attenuated) for 15250! each range bin and the volume as a whole. 15260 15270 Var tot-0 15280 FOR-L-1 TO Nbins(F) 15290 Sum sl-0 15300 Sumiq_sl-0 15310 Range sl(F,P,L)-.5*Vel*(Start int(F)-Zero(F)+.5*(Istep-1)*Delm(F)+(L-1)*Istep*Delm(F)) 15320 Height sl-Range sl(F,P,L)*COSTAngle) 15330 Fk-l/(Bin rng(FT*COS (Angle) *FNIll(Height_sl,Angle,F,P)*Rcal(F) 4) 15340 FOR K-1 TO Ntrace 15350 Sum sl-Sum sl+Pwr mag(K,L)*Fk 15360 Sumsq sl-Simsq_slPwr mag(K,L) *Pwr mag(K,L) *Fk*Fk 15370 NEXT K 15380 Var sl- (Ntrace*Sumsq_l-Sum sl*Sum sl) /(Ntrace* (Ntrace-1)) 15390 Sigvatt (F, P, L) -Sumsl/Ntrace 15400 Sigv att sd(F,P,L)-SQR(Var sl) 15410 Sig zro(F,P)-Sig zro(F,P) +in rng(F) *COS(Angle) *Sigv att(F,P,L) 15420 Var-tot-Vartot+TBin rng (F) *CS (Angle)) ^2*Var sl 15430 NEXT L 15440 Sig zro sd(F,P)-SQR(Var tot) 15450 NEXT P 15460 NEXT F 15470 Realtime-TIMEDATE 15480 CALL Date string(OutfilS,Realtime) 15490 CALL Catalog (OutfilS,ModeS, Target$, Angle) 15500! 15510! Write output to printer if this output type is set. 15520! 15530 IF TRIM$(Out typeS)-"PRINT" OR TRIMS(Out typeS)-"PRINT/DISC" THEN 15540 PRINTER IS-PRT 15550 PRINT 15560 PRINT "VERSION - ";VersionS;" # OF POINTS - ";Npts;" # OF TRACES -;Ntrace 15570 Sp$-S " 15580 FOR F-1 TO 3 15590 IF Meas flag(l,F)-0 THEN 15800 15600 PRINT 15610 PRINT FreqS(F) & BAND" 15620 PRINT SpS;"START TIME: ";DROUND(Start time(F),5);" STOP TIME: ";DROUND(Stop time(F), 5) 15630 PRINT SpS;"START INT: ";DROUND(Start int(F),5);" STOP INT: ";DROUND(Stop int(F),5) 15640 PRINT Sp$;"DELM: ";DROUND(Delm(F),5);w RCAL: ";DROUND(Rcal(F),5);" BIN SIZE: ";DROUND(Bin rng(F),5) 15650 FOR P-1 TO 4 15660 IF Meas flag(2,P)-0 THEN 15790 15670 PRINT 15680 PRINT 15690 PRINT Pol$(P)&" POLARIZATION" 15700 PRINT SpS; TIME OF MEAS: ";TIMES(Tim(F,P)) 15710 PRINT 15720 PRINT Sp$;"BIN NO.";TAB(21);"RANGE";TAB(41);"SIGV ATT";TAB(61);"STD. DEV." 15730 FOR N-1 TO Nbins (F) 15740 PRINT TAB(7);N;TAB(20);DROUND(Range_sl(F,P,N),5);TAB(40);DROUND(FNDb(Sigv att(F,P, N)),5);TAB(60);DROUND(Sigvattsd(F,P,N),5) _ 15750 NEXT N 15760 PRINT 15770 PRINT SpS;"SIG ZRO: ";DROUND(FNDb(Sig zro(F, P)),5) 15780 PRINT SpS;"STDT DEV.: ";DROUND(Sigzro sd(F,P),5) 15790 NEXT P 15800 NEXT F 15810 PRINTER IS CRT 15820 END IF 15830!

15840! Create an output filename based on the current date and time. 15850! Then output important processing parameters and sigma zero data. 15860 15870 IF TRIM$(Out typeS) -DISC" OR TRIMS(Out typeS)-"PRINT/DISC" THEN 15880 Nbins max-RAX(Nbins(*)) 15890 No byfes-919.+Nbins max*4*24.+Npts*4*16.+10. 15900 CREATE BDAT Outfil$S":,700,0,1",No bytes,1 15910 ASSIGN @Disc TO Outfil$S&:,700,0,1w 15920 OUTPUT @Disc;OutfilS,VersionS,ModeS,Target$,Angle,Range(*),Measflag(*);Cal keep$(*) 15930 OUTPUT @Disc;Tim(*),Rcal(*) 15940 OUTPUT @Disc;Start time(*),Stop time(*) 15950 OUTPUT @Disc;Delm (),Npts,Ntrace 15960 OUTPUT @Disc;Start int(*),Stop int(*) 15970 OUTPUT @Disc;NbinsT*),Bin rng(T) 15980 OUTPUT gDisc;Sig zro(*),SIg zro sd(*) 15990 CALL Array_pr(Range sl(*),@5isc7Meas flag(*),Nbins max) 16000 CALL Array pr(Sigv att(*),@Disc,Meas flag(*),Nbins max) 16010 CALL Array pr(Sigv-att sd(*),eDisc,Meas flag(*),NbTns max) 16020 CALL Array-pr(Sum(T), 5isc,Meas_flag(*),-Npts) 16030 CALL Array_pr(Sumsq(*), Disc,Meas flag(*),Npts) 16040! 16050 MODIFIED TO PRINT Sig zro's IN DISC MODE 16060 16070 PRINTER IS PRT 16080 FOR K-1 TO 3 16090 PRINT 16100 IF Meas flag(l,K)-1 THEN PRINT FreqS(K),DROUND(FNDb(Sig zro(K,1)),5), DROUND (FNDb(Sig zroK, 2)),5), 16110 IF Reas flag(l,K)-1 THEN PRINT DROUND(FNDb(Sig_zro(K,3)),5),DROUND(FNDb(Sig_zro(K,4)),5) 16120 NEXT K - 16130 PRINTER IS CRT 16140 END IF 16150! 16160! Place radar in default mode. 16170! 16180 MAT Bin rng- Bin rng old 16190 CALL Freqsw(F dtsp) 16200 CALL Pol sw(F aisp,P_disp) 16210 SUBEND! Volume16220********************************************************************** 16230 SUB Polarimetry 16240! 16250! This subroutine measures all 4 polarizations backscattering 16260! coefficients. It oily stores the center frequency data. 16270! If more than one point is required, make sure that for C-Band 16280! the order of the data is reversed. 16290! 16300 OPTION BASE 1 16310 COM /Paths/ eNwa, Nwa data, Hpib, Relay 16320 COM /Constants/ Vel,Zero(*) 16330 COM /Sys 1/ FreqS(*),Freq cent (*),Freqspan(*) 16340 COM /Sys-2/ Pol$(*),Polsw (*) 16350 COM /Sys 4/ Drive aS,Drive b$,Drive cS,INTEGER Preamble,Bytes 16360 COM /Sys 5/ TargeF$,Version$, ModeS, ut type$,Sound$,Bell$,DebugS 16370 COM /Sys-6/ Angle,AngleS,Bin rng(*),Beam(*),INTEGER Npts,Ntrace 16380 COM /Sys 7/ INTEGER Cal flagT*),Meas flag(*) 16390 COM /Cal7 Cal keep$(*),cal(*),Donecal(*) 16400 INTEGER F,P,KFlg, Ichk, Skyflg 16410 16420! Allocate memory space. 16430! 16440 ALLOCATE INTEGER Binvv(Npts, 0:2) 16450 ALLOCATE INTEGER Binhv(Npts,0:2) 16460 ALLOCATE INTEGER Binvh(Npts,0:2) 16470 ALLOCATE INTEGER Binhh(Npts,0:2) 16480 ALLOCATE INTEGER Binary (4, Ntrace, Npts, 0:2) 16490 ALLOCATE INTEGER Dunmy(Npts,0:2) 16500 ALLOCATE Height(3) 16510 ALLOCATE Range(3) 16520 ALLOCATE Fk(4) 16530 ALLOCATE Sqsig0(3,4,Ntrace) 16540 ALLOCATE Relphas (3, 4,Ntrace) 16550 ALLOCATE Tim(3,Ntrace) 16560 ALLOCATE Gate cent(3) 16570 ALLOCATE Gate span(3) 16580 ALLOCATE CCMPLEX Sky(3,4,Npts),Subsky(3,4) 16590 ALLOCATE COMPLEX Datal(3,4,Ntrace) 16600 ALLOCATE COMPLEX Kcalm(3,4),Kcal(3,4,Npts) 16610 MAT Sky- (CMPLX(0, 0)) 16620 Skyflg-0 16630 16640! Read in calibration data. 16650! 16660 CALL Load cal(Kcal(*),Flg) 16670 IF Flg-1 THEN SUBEXIT 16680 PRINT Npts,Rcal(*) 16690 Midindex- (Npts-l) /2 16700 Kcalm(F, 1) -Kcal (F, 1,Midindex)

16710 Kcalm(F, 2) -Kcal (F, 2,Midindex) 16720 Kcalm(F,3)-Kcal(F,3,Midindex) 16730 Kcalm(F, 4)-Kcal (F, 4,Midindex) 16740 DEALLOCATE Kcal(*) 16750! 16760 CALL Angle set (Angle) 16770 FOR F-1 TO-3 16780 IF Measflag(l,F)-0 THEN 17860 16790 OUTPUT @Nwa; GATEOFF" 16800 OUTPUT @Nwa;"LOGM" 16810 CALL Freq_set(F) 16820 CALL Freq sw(F) 16830 Ichk-0 16840 16850 Take Ntrace measurements of all 4 polarizations for frequency F. 16860 Store individual measurements in a larger array. 16870! 16880 OUTPUT eNwa;"OPC?;WAIT" 16890 ENTER eNwa;Reply 16900 FOR K-1 TO Ntrace 16910 OUTPUT eNwa;"FORM1" 16920 IF F-1 THEN 16930 OUTPUT eRelay;"B56" 16940 DISP "READY FOR MEASUREMENT? <CONTINUE>";Bell$ 16950 PAUSE 16960 OUTPUT eNwa;"SING;OUTPRAW1" 16970 ENTER @Nwa data;Preamble,Bytes,Binvv(*) 16980 OUTPUT eReIay;"A5" 16990 WAIT.07 17000 OUTPUT @Nwa;"SING;OUTPRAW1" 17010 ENTER eNwa data;Preamble,Bytes,Binvh(*) 17020 OUTPUT eReIay;"A6" 17030 WAIT.07 17040 OUTPUT eNwa;"SING;OUTPRAW1" 17050 ENTER eNwa data;Preamble,Bytes,Binhh(*) 17060 OUTPUT @ReTay;"B5" 17070 WAIT.07 17080 OUTPUT @Nwa;"SING;OUTPRAW1" 17090 ENTER eNwa data;Preamble,Bytes,Binhv(*) 17100 Tim (F, K) -TMEDATE 17110 END IF 17120 IF F-2 THEN 17130 OUTPUT eRelay;"B34" 17140 DISP "READY FOR MEASUREMENT? <CONTINUE>";Bell$ 17150 PAUSE 17160 OUTPUT @Nwa;"SING;OUTPRAW1" 17170 ENTER eNwa data;Preamble,Bytes,Binvv(*) 17180 OUTPUT @Relay;"A3" 17190 WAIT.07 17200 OUTPUT @Nwa;"SING;OUTPRAW1" 17210 ENTER @Nwa data;Preamble,Bytes,Binvh(*) 17220 OUTPUT eReIay;"A4" 17230 WAIT.07 17240 OUTPUT @Nwa;"SING;OUTPRAW1" 17250 ENTER @Nwa data;Preamble,Bytes,Binhh(*) 17260 OUTPUT eReTay;"B3" 17270 WAIT.07 17280 OUTPUT eNwa; SING;OUTPRAW1" 17290 ENTER @Nwa data;Preamble,Bytes,Binhv(*) 17300 Tim (F, K) -TIMEDATE 17310 END IF 17320 IF F-3 THEN 17330 OUTPUT @Relay;"A34" 17340 DISP "READY FOR MEASUREMENT? <CONTINUE>";Bell$ 17350 PAUSE 17360 OUTPUT 9Nwa;"SING;OUTPRAW1" 17370 ENTER eNwa data;Preamble,Bytes,Binvv(*) 17380 OUTPUT eReIay;"B3" 17390 WAIT.07 17400 OUTPUT 9Nwa;"SING;OUTPRAW1" 17410 ENTER 9Nwa data;Preamble,Bytes,Binvh(*) 17420 OUTPUT 9ReTay;"B4" 17430 WAIT.07 17440 OUTPUT 9Nwa;"SING;OUTPRAW1" 17450 ENTER SNwa data;Preamble,Bytes,Binhh(*) 17460 OUTPUT eReIay;"A3" 17470 WAIT.07 17480 OUTPUT NNwa;"SING;OUTPRAW1" 17490 ENTER 9Nwa data;Preamble,Bytes,Binhv(*) 17500 Tim (F, K) -TIMEDATE 17510 END IF 17520 MAT Binary(1,K,*,*)- Binvv 17530 MAT Binary(2,K,*,*)- Binhh 17540 MAT Binary(3,K,*,*)- Binhv 17550 MAT Binary(4,K,*,*)- Binvh 17560 PRINT K 17570 NEXT K 17580

17590! Load calibration for the specified polarization and reload 17600! (one-by-one) the Ntrace measurements. Gate the first trace 17610! and output the voltage mag & phase at the center frequency. 17620 17630 NOTE: The gate changes for each new frequency but remains the 17640 same regardless of polarization for all Ntrace measurements. 17650 17660 FOR P-1 TO 4 17670 FOR K-1 TO Ntrace 17680 MAT Dummy- Binary (P, K, *,*) 17690 OUTPUT @Nwa;"FORM1;INPURAW1" 17700 OUTPUT @Nwa data;Preamble,Bytes,Dummy(*) 17710 IF Ichk-0 TREN 17720 CALL Gate set(Gate cent(F),Gate_span(F),Angle,Range(F),Height(F),Beam(F),F) 17730 Ichk-1 17740 ELSE 17750 OUTPUT @Nwa;"GATECENT "&VAL$(Gate cent(F))&" S" 17760 OUTPUT eNwa;"GATESPAN "&VAL$(Gate-span (F) ) " S" 17770 END IF 17780 IF K-1 THEN OUTPUT 9Nwa;"TIMDTRANOFF;GATEOON" 17790 OUTPUT 8Nwa; POLA;AUTO;MARK1 "aVALS(Freqcent(F)) &" GHZ" 17800 OUTPUT SNwa; "POLMRI;OUTPMARK" 17810 ENTER @Nwa;Datal(F,P,K) 17820 OUTPUT @Nwa;"OPC?;WAIT" 17830 ENTER @Nwa;Reply 17840 NEXT K 17850 NEXT P 17860 NEXT F 17870 17880! Prompt the user to do sky subtraction. 17890! 17900 IF FNAsk("DO SKY MEASUREMENT?") THEN 17910 FOR F-1 TO 3 17920 IF Meas flag(l,F)-0 THEN 18000 17930 CALL Freq set(F) 17940 CALL Freqsw (F) 17950 CALL Pol sw(F,1) 17960 OUTPUT @Nwa;"GATECENT "&VAL$(Gate cent(F))&" S;" 17970 OUTPUT eNwa;"GATESPAN "&VAL$(Gate-span(F)) &" S;" 17980 CALL Measure sky(Sky(*),Meas flagT*),Npts,F) 17990 MAT Subsky- Sky(*,*,MidindexT 18000 NEXT F 18010 END IF 18020 18030! Convert to power and scale data to give square root of sigma zero 18040! and relative phase. 18050! 18060 FOR F-1 TO 3 18070 IF Meas flag(l,F)-0 THEN 18190 18080 FOR P-1-TO 4 18090 Fk(P)-SQR(1/ (FNI11(Height(F),Angle,F,P)*Rcal(F)^4)) 18100 FOR K-1 TO Ntrace 18110 Datal(F,P,K) -(Datal(F,P,K)-Subsky (F,P) )*Kcalm(F,P) 18120 SqsigO (F, P, K) -ABS (Datal (F, P, K) ) *Fk (P) 18130 IF P<>1 THEN 18140 Relphas(F,P,K)-ARG(Datal(F,P,K))-ARG(Datal(F,1,K)) 18150 Relphas (F, P, K) -FNPhase norm (Relphas (F, P, K)) 18160 END IF 18170 NEXT K 18180 NEXT P 18190 NEXT F 18200 OUTPUT @Nwa; FORM3" 18210! 18220 Realtime-TIMEDATE 18230 CALL Date string(Outfil$,Realtime) 18240 CALL Catalog(OutfilS,ModeS,TargetS,Angle) 18250 18260! Write output to printer if this output type is set. 18270! 18280 IF TRIM$(Out type$)-"PRINT" OR TRIMS(Out type$)-"PRINT/DISC" THEN 18290 PRINTER IS-PRT 18300 PRINT 18310 PRINT "VERSION - ";Version$;" # OF POINTS - ";Npts;" * OF TRACES - ";Ntrace 18320 PRINT 18330 PRINT 18340 PRINT TAB(4);"FREQ";TAB(12);"GATE CENT";TAB(25);"GATE SPAN";TAB(38); R CAL";TAB(47);"RANGE";TAB(56);"CAL FI E" 18350 PRINT 18360 FOR F-1 TO 3 18370 IF Meas flag(l,f)-0 THEN 18410 18380 PRINT TAB(6);FreqS(F);TAB(12);DROUND(Gate cent(F),5);TAB(25);DROUND(Gate span(F),5); 18390 PRINT TAB(37);DROUND(Rcal(F),4);TAB(46);DDROUND(Range(F),4); 18400 PRINT TAB(55);Cal keep$(F) 18410 NEXT F 18420 PRINT 18430 PRINT 18440 FOR F-1 TO 3

18450 IF Meas_flag(1,F)-0 THEN 18650 18460 PRINT 18470 PRINT 18480 PRINT FreqS(F);" BAND";TAB(12);"MAGNITUDE IS THE SQ ROOT OF SIGMA ZERO (REAL #)" 18490 PRINT TAB(12);"PHASE IS THE RELATIVE PHASE WITH RESPECT TO W POL." 18500 PRINT 18510 PRINT TAB(12);"MAGVV";TAB(27); "MAGHH";TAB (42);"MAGHV";TAB(57);"MAGVH" 18520 PRINT 18530 FOR K-1 TO Ntrace 18540 PRINT TAB(11);DROUND(SqsigO(F,1,K),5);TAB(26);DROUND(SqsigO(F,2, K),5); 18550 PRINT TAB(41);DROUND(SqsigO(F,3,K),5);TAB(56);DROUND (SqsigO (F, 4, K),5) 18560 NEXT K 18570 PRINT 18580 PRINT 18590 PRINT TAB(12);"PH HH";TAB(27);"PH HV";TAB(42);"PHVH";TAB(58);"TIME" 18600 PRINT 18610 FOR K-1 TO Ntrace 18620 PRINT TAB(11);DROUND(Relphas(F,2,K),5);TAB(26);DROUND(Relphas(F,3,K),5); 18630 PRINT TAB(41);DROUND(Relphas(F,4,K),5);TAB(56);TIMES(Tim(F,K)) 18640 NEXT K 18650 NEXT F 18660 PRINTER IS CRT 18670 END IF 18680 18690! Create an output filename based on the current date and time. 18700! Then output important processing parameters and scat. matrix 18710! data. 18720! 18730 IF TRIMS(Out type$)-"DISC" OR TRIMS (Out type$)-"PRINT/DISC" THEN 18740 Bytesjperrec-64+(10+12+7+30+3*10+4*88*2+7*4) + (8*8) + (15*8) + (3*7*Ntrace*8) 18750 CREATE BDAT FNFileloc$(Outfil$,"/LCX/DATA"&Drive aS),1,Bytes per_rec 18760 ASSIGN 6Disc TO FNFileloc$(Outfil$,"/LCX/DATA"&Drive aS) 18770 OUTPUT 9Disc;OutfilS,Version$,ModeS,TargetS,Cal keep (*),Angle,Range(*),Meas_flag(*) 18780 OUTPUT @Disc;Gate cent(*),Gatespan(*),Npts,Ntrace 18790 OUTPUT eDisc;Tim(T),Rcal(*) 18800 CALL Array prm(SqsigO(*), Disc,Meas flag(*),Ntrace,0) 18810 CALL Array_prm(Relphas(*),@Disc,Meas flag(*),Ntrace,1) 18820 ASSIGN SDisc TO * 18830 END IF 18840 18850! Place radar in default mode. 18860! 18870 CALL Freq_sw(F disp) 18880 CALL Pol sw(F aisp,P disp) 18890 SUBEND! Polarimetry 18900************************************************************************ 18910 SUB Measure sky(COMPLEX Sky(*),INTEGER Flag(*),Npts,F) 18920! 18930! This subroutine measures sky for frequency F. It checks Flag(2,P) 18940! to measure the corresponding polarization. It uses form3 to 18950! transfer data and stores it in Sky(*). 18960! 18970 OPTION BASE 1 18980 COM /Paths/ eNwa, Nwa data, Hpib, Relay 18990 COM /Sys 3/ INTEGER F disp,P disp 19000 COM /Sys-5/ TargetS,Version$,ModeS,Out type$,Sound$,Bell$,Debug$ 19010 INTEGER F 19020 ALLOCATE COMPLEX Dummy2(Npts) 19030 DISP "POSITION FOR SKY MEASUREMENT <CONTINUE>";BellS 19040 PAUSE 19050 DISP "WORKING" 19060 OUTPUT eNwa;"TIMDTRANOFF; POLA; AUTO;" 19070 FOR P-1 TO 4 19080 IF Flag(2,P)-0 THEN 19140 19090 CALL Pol sw(F,P) 19100 OUTPUT @Rwa;"AVERFACT 17;" 19110 OUTPUT @Nwa;"AVEROON; NUMG 17;" 19120 CALL Get form3(Dunmy2 (*),Npts,F) 19130 MAT Sky(F,P,*)- Dumuy2 19140 NEXT P 19150 OUTPUT eNwa;"AVEROOFF; LOGM; TIMDTRANON; WAIT; CONT" 19160 CALL Pol sw(F,1) 19170 SUBEND! Measure sky 19180 ********************************************************************** 19190 SUB Integ set (Start int,Stop int) 19200! 19210! This subroutine is called by Volume to set the integration start 19220! and stop points. 19230! 19240 COM /Paths/ eNwa,9Nwa data, Hpib, Relay 19250 COM /Sys 5/ Target$,VersionS,Mode$,Out typeS,Sound$,Bell$,Debug$ 19260 OUTPUT eNwa;"MARK1" 19270 LOCAL 716 19280 DISP "SET INTEGRATION START POINT WITH KNOB OR KEY PAD <CONTINUE>";Bell$ 19290 PAUSE 19300 REMOTE 716 19310 OUTPUT @Nwa;"OUTPACTI" 19320 ENTER @Nwa;Start int

19330 LOCAL 716 19340 DISP "SET INTEGRATION STOP POINT WITH KNOB OR KEY PAD <CONTINUE>";BellS 19350 PAUSE 19360 REMOTE 716 19370 OUTPUT QNwa;"OUTPACTI" 19380 ENTER eNwa;Stop int 19390 SUBEND! Integ seU 19400************************************************************ 19410 SUB Freq_sw(INTEGER Ifreq) 19420! 19430! This subroutine sets the relay actuator to Ifreq frequency. 19440 19450 COM /Paths/ @Nwa,@Nwa_data,@Hpib, Relay 19460 SELECT Ifreq 19470 CASE 1 19480 OUTPUT @Relay;"?*A1B2n 19490 CASE 2 19500 OUTPUT @Relay;?*A2B1" 19510 CASE 3 19520 OUTPUT @Relay;?*B12" 19530 END SELECT 19540 WAIT.1 19550 SUBEND! Freq sw 19560 ********************************************************************** 19570 SUB Table def 19580! 19590! This subroutine creates a look-up table used in the Convert subroutine, 19600! which converts forml data to form3. 19610! 19620 COM /Table/ Exp_tbl(0:255) 19630 Exp tbl(0)-2 (-15) 19640 FOR7I-0 TO 126 19650 Exp tbl(I+1)-2*Exp tbl(I) 19660 NEXT T 19670 Exp tbl(128)-2^(-143) 19680 FOR-I-128 TO 254 19690 Exp tbl(I+1)-2*Exp tbl(I) 19700 NEXT T 19710 SUBEND 19720******* ******** 19730 SUB Convert(COMPLEX Block(*),INTEGER Binary(*),Npts) 19740! 19750! This subroutine converts binary (forml) to complex base-10 numbers. 19760! 19770 COM /Table/ Exp tbl(*) 19780 FOR I-1 TO Npts19790 Exp-Exp tbl(BINAND(Binary(I,2),255)) 19800 Block(IT-Binary(I,1)*Exp*CMPLX(1., 0.)+Binary(I,0)*Exp*CMPLX(0.,1.) 19810 NEXT I 19820 SUBEND 19830! ********************************************************************* 19840 SUB Get forml (INTEGER Binary(*)) 19850! 19860! This subroutine gets a trace ofdata from HP8753 in forml and 19870! puts it in Binary(*). 19880! Make sure the order of frequency points for C-Band radar is 19890! not important for the routine which uses this subroutine. 19900 19910 COM /Paths/ @Nwa, Nwa data, Hpib, Relay 19920 INTEGER Preamble,Bytes 19930 Preamble-9025 19940 Bytes-Npts*6 19950 OUTPUT eNwa; FORM1;OUTPFORM" 19960 ENTER 9Nwa data;Preamble,Bytes,Binary(*) 19970 SUBEND 19980 ************************************************************************ 19990 SUB Get form3(COMPLEX Arrayl(*),INTEGER Npts,I) 20000! This subroutine uses the form3 of HP8753 to transfer data into 20010! Arrayl(Npts). It also sets the GATE and reverses the order of data 20020! if measuring C-Band (I-2). 20030 OPTION BASE 1 20040 COM /Paths/ @Nwa, Nwa data,Hpib, eRelay 20050 INTEGER Preamble,Bytes 20060 ALLOCATE COMPLEX Dummy3(Npts) 20070 OUTPUT *Nwa;"WAIT; FORM3;GATEOON; WAIT; OUTPFORM;" 20080 ENTER eNwa data;Preamble,Bytes,Dummy3(*) 20090 OUTPUT *Nwa;"GATEOFF; WAIT;" 20100! 20110! Reverse the order if C-Band 20120! 20130 IF I-2 THEN 20140 FOR W-1 TO Npts 20150 Arrayl (W) -Dummy3 (Npts-W+1 ) 20160 NEXT W 20170 ELSE 20180 MAT Arrayl- Dummy3 20190 END IF 20200 SUBEND! Get form3

20210**** **************************************************************** 20220 SUB Load cal(Kcal(*),Flg) 20230! 20240! This subroutine loads the calibration constants into Kcal(*). 20250! If Calibration has not been done in this run, it prompts the user 20260! to use an old calibration file. The file should be located in 20270! directory "/LCX/CAL". 20280! 20290 OPTION BASE 1 20300 COM /Paths/ @Nwa,8Nwa data, Hpib, Relay 20310 COM /Sys 4/ Drive a$,Drive b$,Drive cS,INTEGER Preamble,Bytes 20320 COM /Sys-6/ AngleAngle$[l1],Bin rnq (3),Beam(3),INTEGER Npts,Ntrace 20330 COM /Sys-7/ INTEGER Cal flag(*),Meas flag(*) 20340 COM /Cal7 Cal keepS(*),Acal(*),Donecal(*) 20350 DIM Outfil$S[1] 20360 INTEGER F,P 20370 Flg-0 20380 FOR F-1 TO 3 20390 IF Measflag(l,F)-0 THEN 20610 20400 IF Donecal(F)-i THEN 20410 ASSIGN SKeep TO FNFilelocS(Cal keepS(F),"/LCX/CAL"&Drive a$) 20420 ENTER @Keep;Cal keepS(F), Npts,Rcal (F) 20430 ALLOCATE COMPLEX Subkcall(Npts),Subkcal2(Npts),Subkcal3(Npts), Subkcal4 (Npts) 20440 ENTER SKeep;Subkcall(*),Subkcal2(*),Subkcal3(*),Subkcal4(*) 20450 ASSIGN 8Keep TO * 20460 MAT Kcal(F,1,*)- Subkcall 20470 MAT Kcal(F,2,*)- Subkcal2 20480 MAT Kcal(F,3,*)- Subkcal3 20490 MAT Kcal(F, 4,*)- Subkcal4 20500 DEALLOCATE Subkcall (*), Subkcal2(*),Subkcal3(*),Subkcal4 (*) 20510 ELSE 20520 IF FNAsk("USE OLD CALIBRATION FILE?") THEN 20530 INPUT "ENTER CALIBRATION FILENAME?",Cal keepS(F) 20540 Donecal(F) -1 20550 GOTO 20400 20560 ELSE 20570 Flg-1 20580 SUBEXIT 20590 END IF 20600 END IF 20610 NEXT F 20620 SUBEND I Load cal 20630 ***************** ****************************************** 20640 SUB Catalog(FilenameS,ModeS,TargetS,Angle) 20650! 20660! This subroutine prints the 10-digit filename (containing the 20670! date and time of measurement) and the current mode,angle and 20680! target. 20690! 20700 PRINTER IS PRT 20710 PRINT 20720 PRINT 20730 PRINT CHRS(27)&"(slB"; I Bold print on 20740 PRINT RPT("*", 70) 20750 PRINT "TIME/DATE: "&Filename$&" MODE: "&ModeS&" ANGLE: "&VAL$(Angle) CHR$ (129) 20760 PRINT RPT$(" ",26)&"TARGET: "&Target$ 20770 PRINT CHRS(27)&" (sOB"; Bold print off 20780 PRINTER IS CRT 20790 SUBEND! Catalog 20800************************************************************************ 20810 SUB Array_pr (Array (*), Disc, INTEGER Measflag (*), Num) 20820! 20830! This subroutine is used by the Volume subroutine to store 20840! Array(*,*,*) on 9Disc if corresponding Measflag is set. 20850! 20860 OPTION BASE 1 20870 INTEGER F,P,N 20880 ALLOCATE Dummy(Num) 20890 FOR F-1 TO 3 20900 IF Meas flag(l,F)-0 THEN 20980 20910 FOR P-1-TO 4 20920 IF Meas flag(2,P)-O THEN 20970 20930 FOR N-1-TO Num 20940 Dumay (N) -Array (F, P, N) 20950 NEXT N 20960 OUTPUT *Disc;Dummy(*) 20970 NEXT P 20980 NEXT F 20990 SUBEND I Array pr 21000 *********************************************************************** 21010 SUB Array_prm(Array(*), Disc,INTEGER Meas flag(*),Num,Ph) 21020! 21030! This subroutine is used by the Polarimetry subroutine to store 21040! Array(F,*,*) on BDisc if Meas flag(1,F) is set. 21050! If Array(F,*,*) contains the phase measurements (Ph-1), it does 21060! not store Array(F,1,*). 21070! 21080 OPTION BASE 1

21090 INTEGER F 21100 ALLOCATE Duml(Num),Dum2(Num), Dum3 (Num),Dum4 (Num) 21110 FOR F-1 TO 3 21120 IF Meas flag(l,F)-0 THEN Next freq 21130 MAT DumT- Array(F,1,*) 21140 MAT Dum2- Array(F,2,*) 21150 MAT Dum3- Array(F,3,*) 21160 MAT Dum4- Array(F,4,*) 21170 IF Ph-0 THEN 21180 OUTPUT @Disc;Duml(*) 21190 END IF 21200 OUTPUT @Disc;Dum2(*),Dum3(*),Dum4(*) 21210 Next freq:! 21220 NEXT F 21230 SUBEND! Array prm 21240 ******************* ***************************************************** 21250 DEF FNIll(H,Ang,INTEGER F,P) 21260 COM /Illum/ C(*) 21270 A-Ang*PI/180 21280 RAD 21290 Ill-C(F,P,1)+C(F,P,2)*H+C(F,P,8)*H^(1/3)+C(F,P,9)*SQR(H) 21300 Ill-Ill+COS(A)* (C(F,P,3)+C(F,P,6)*H)+SIN(A)* (C (F,P,4)+C(F,P,5)*H) 21310 Ill-Ill+C(F,P, 7)*COS(A) 3+C(F,P,13)*H*A^2 21320 Ill-Ill+C(F, P, 10) *A+C(F,P,11) *A^2+C(F,P,12)*A^3 21330 I1l-10^(I11/10) 21340 DEG 21350 RETURN Ill 21360 FNEND! Ill 21370 21370 ********************************************************************** 21380 DEF FNDb(Number) 21390! 21400! This function converts a number to "decibels". 21410! 21420 Db-10*LGT(Number) 21430 RETURN Db 21440 FNEND 21450!************************************************************************ 21460 DEF FNPhase norm(Theta) 21470! This subroutine normalizes Theta to -180<Theta<180, if out of range. 21480 WHILE ABS(Theta)>180 21490 IF Theta>180 THEN 21500 Theta-Theta-360 21510 ELSE 21520 Theta-Theta+360 21530 END IF 21540 END WHILE 21550 RETURN Theta 21560 FNEND! Phase norm 21570 ************************************************************************ 21580 DEF FNAsk(PromptS) 21590! This subroutine displays Prompts the user. If answer is #Y" it returns 21600! 1 otherwise it returns 0. 21610 OFF KEY 21620 DISP Prompt$; 21630 INPUT "",YnS 21640 Yn$-UPC (YnS [,1]) 21650 SELECT YnS 21660 CASE -"Y" 21670 RETURN 1 21680 CASE -"N", "" 21690 RETURN 0 21700 CASE ELSE 21710 RETURN 0 21720 END SELECT 21730 FNEND! Ask 21740 21750! ***************** ******************************************************* 21760 DEF FNFileloc$(FileS, Dir$) 21770 21780 1 This function locates ":" in DirS and inserts File$ string between 21790 directory and drive string with a "/" after directory(if not there). 21800 I For example if DirS-"/LCX:,700,0", this function returns 21810 */LCX/File$:,700,0". 21820 INTEGER C I for the location of the ':' in DirS (minus 1) 21830 LET C-POS(DirS,":")-1 21840 IF C<-0 THEN 21850 RETURN TRIMS(FileS&DirS) 21860 ELSE 21870 RETURN DirS[l,C]&RPT$("/",DirS[C,C]<>"/")&File$&Dir$[C+l,LEN(DirS)] 21880 END IF 21890 FNEND! Fileloc 21900************************************************************************ 21910 SUB Sphere response 21920 21930! Generate Theoretical calibration files. 21940! 21950 OPTION BASE 1 21960 COM /Sys_4/ Drive_aS,DrivebS,Drivec$cS,INTEGER Preamble,Bytes

21970 COMPLEX A,B,C,E 21980 REAL Delta,Inc,Frequency,Radius,Vel,X 21990 REAL Fstart,Fstop,Fdelta 22000 INTEGER I, J,K,T,Npoints,Record,Template_flg 22010 M sphere:! Conducting sphere RCS. 22020! ---------------------------—. —~_____________ -- 22030 Clear crt 22040 GOSUB-Get_sphere_pars 22050 SUBEXIT 22060 M sph: B-CMPLX(1,0) 22070 C-CMPLX(1,0) 22080 E-CMPLX(0,0) 22090 T-0 22100 LOOP 22110 T-T+1 22120 A-B 22130 B-C 22140 C-A+B*CMPLX (0, (1-2*T)/X) 22150 E-E+CMPLX (0,T+.5)/(C*(B+C*CMPLX(0,-T/X) ) ) 22160 EXIT IF ABS(REAL(C))>1.E+10 22170 END LOOP 22180 Amp ref(I)-(ABS(E)) 2*4/X^2*PI*Radius*Radius 22190 Amp ref(I)-SQR(Amp ref(I))! Square root of sigma for polarimetry. 22200 DISP 20*LGT(Amp reT(I)) 22210 Phase ref (I)-AR (E) 22220 RETURN 22230 Get_sphere_pars: Gets relevant sphere parameters. 22240 1 ---------------------------------------------------------- 22250 22260 Vel-2.998E+8 22270 INPUT "Starting frequency in GHz?",Fstart 22280 INPUT "Stopping frequency in GHz?",Fstop 22290 INPUT "Number of points?",Npoints 22300 INPUT "Sphere diameter in inches?",Radius 22310 Radius-Radius/2 22320 Radius-Radius*25.4/1000! Now in meters 22330 ALLOCATE Freq_ref (Npoints),Amp ref(Npoints),Phase ref(Npoints) 22340! 22350 Fdelta-(Fstop-Fstart) / (Npoints-1) 22360 I-0 22370 DISABLE 22380 FOR J-I+1 TO Npoints STEP 1 22390 Frequency-Fstart+I*Fdelta 22400 I-I+1 22410 X-2*PI*Frequency*10^9/Vel*Radius 22420 GOSUB M sph 22430 Freq re (I) -Frequency 22440 PRINT I,Freqref(I),Amp_ref(I),Phase ref(I) 22450 NEXT J 22460 BEEP 22470 ENABLE 22480 New file_flg-1 22490 INPUT "Store metal sphere RCS data as (eg.SPH12C)",File ref$ 22500 ALLOCATE T$[80] 22510 LINPUT "Enter file title:",T$ 22520 Bytes per rec-256+3*8*N 22530 CREATE BDKT File ref$&Drive c$,1,Bytes_per rec 22540 ASSIGN eDatafile-TO File reZ$&Drive c$;FORMAT OFF 22550 OUTPUT SDatafile,l;File Fef$,T$,Bytes,Preamble,Npoints 22560 OUTPUT eDatafile;Freqref(*),Amp ref(*),Phase ref(*) 22570 ASSIGN eDatafile TO * 22580 COPY File ref$&Drive cS TO FNFileloc$(Fileref$,"/LCX/SphTheor"&Drive a$) 22590 PURGE Fill refS&Drive cS 22600 DEALLOCATE-T$,Freq_re(*),Amp_ref(*),Phase ref(*) 22610 Clear crt 22620 RETURN - 22630 Quit:SUBEXIT 22640 SUBEND! Sphere response 22650 **************T********************************************************** 22660 SUB Set clock 22670 1 22680 I This subroutine asks the user for date & time and sets the HP clock. 22690 1 22700 OPTION BASE 1 22710 INTEGOR I 22720 DIM Chrono$(12],MonthS (12) [3] 22730 Exec key$-CHRS(255)&CHR$(88) 22740 READ-~bnth$(*) 22750 DATA "JAN, "FEB", "MAR", APR", "MAY", "JUN", "JUL", "AUG", "SEP", OCT", "NOV", "DEC 22760 OUTPUT KBD;"SCRATCH KEY "&Exec key$; 22770 Clear crt 22780 PRINT-" Current system date: ";DATE$(TIMEDATE) 22790 PRINT " Current system time: ";TIME$(TIMEDATE) 22800 PRINT 22810 Ask:LINPUT "Enter date and time (YYMMDDHHMMss):",Chrono$ 22820 IF Chrono$-"" AND DATE$(TIMEDATE)<> 1 Mar 1900" THEN 22830 Clear crt 22840 SUBEXTT

22850 END IF 22860 Year$-VALS(1900+VAL (ChronoS 1,2] ) ) 22870 IF (VAL(ChronoS3,4])<-0 OR VAL(ChronoS[3,41)>12) THEN 22880 BEEP 22890 PRINT "Incorrect month value." 22900 GOTO Ask 22910 END IF 22920 Year$-MonthS(VAL(ChronoS[3,4]) )&" "&Year$ 22930 Year$-ChronoS [5,6]&" "&Year$ 22940 SET TIMEDATE (DATE(YearS)) 22950 IF (VAL(ChronoS[7,8]))>23 THEN 22960 BEEP 22970 PRINT "Incorrect hour value." 22980 GOTO Ask 22990 END IF 23000 Day$-Chrono$[7,8]&":" 23010 IF VAL(ChronoS[9,10])>59 THEN 23020 BEEP 23030 PRINT "Incorrect minute value." 23040 GOTO Ask 23050 END IF 23060 Day$-Day$&Chrono$[9,10]&":" 23070 IF (LEN(ChronoS)>10 AND LEN(ChronoS)-12) THEN 23080 IF VAL(ChronoS[11,12])>59 THEN 23090 BEEP 23100 PRINT "Incorrect seconds value." 23110 GOTO Ask 23120 END IF 23130 Day$-DayS&ChronoS[11,12] 23140 ELSE 23150 Day$-DayS&"00" 23160 END IF 23170 SET TIME TIME(Day$) 23180 Clear crt 23190 SUBEXIT - 23200 SUBEND! Set clock 23210 ****************************************************** 23220 SUB Fix error 23230! 23240! This is the error correction subroutine. Certain errors, such as 23250! a disc full error, can be fixed without stopping the program. 23260 23270 SELECT ERRN 23280 CASE ELSE 23290 PRINTER IS CRT 23300 PRINT "ERROR ";ERRN 23310 PRINT ERRMS 23320 PRINT "THE PROGRAM IS PAUSED. FIX ERROR, IF POSSIBLE, AND CONTINUE." 23330 PAUSE 23340 END SELECT 23350 SUBEND 23360 ***********************************************************************

WARNING *** fes were too long and were wrapped. IWARNING ***

UNIVERSITY OF MICHIGAN 111 9011115 02829 98501111 3 9015 02829 9850