NRO APPROVED FOR 

RELEASE 1 JULY 2015 -SEGRETABIF-4-B30001-69 

Copy 01 of 25 

Total Pages:179 

LYE-SL.- 69 

C 3/P-, Pgs 

TSPOOND 

MATHEMATICAL AND SUBROUTINE DESCRIPTION 

3 February 1969 

Prepared for 

MOL Systems Office 

Under Contract No. 

Prepared by 

Mission Planning and Evaluation Project 

In addition to the security requirements which 

apply to this document and must be met, it may 

be further distributed by the holder only with 

the specific prior approval of SAFSi-ell. 

TRW 

SYSTEMS GROUP 

HANDLE VIA BYEMAN 

CONTROL SYSTEM ONLY 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 -SEC-RETia- BIF-4-B30001-69 

Page v 

ACKNOWLEDGEMENT 

The TSPOOND program, described in this document, was designed 

and developed through the combined effort of: 

Members of the Technical Staff: 

P. Eng 

P. L. Mc Entire 

S. E. Steelsmith 

Technical Support: 

R. D. Mc Intyre 

Secretarial Support: 

N. M. Edwards 

J. A. Roman 

M. R. Snell 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 -SEC-REV-11- Page vii 

TABLE OF CONTENTS 

1. INTRODUCTION 1 

2. TSPOOND MATHEMATICAL MODELS 3 

2.1 General Discussion 3 

2.2 Monte Carlo Approach 5 

2.3 Random Number Generators 7 

2.4 Acquisition Scope Simulation 10 

2.5 Intra-Group Weather Correlation 13 

2.6 Inter-Group Weather Correlation 17 

3. TSPOOND SUBROUTINE DESCRIPTIONS 21 

3.1 Glossary of TSPOOND Common Storage 21 

3.2 Main Program TSPOOND 39 

3.3 Subroutine BERN 41 

3.4 Subroutine BITRE 45 

3.5 Subroutine BUFSET 55 

3.6 Subroutine CCP 57 

3.7 Subroutine CORV 65 

3.8 Subroutine DECIDE 71 

3.9 Subroutine DUMPLOC 77 

3.10 Subroutine EJECTPG 79 

3.11 Subroutine FUNCDRD 81 

3.12 Subroutine GETDT 85 

3.13 Subroutine GETFDET 89 

3.14 Subroutine GETV 91 

3.15 Subroutine GROUT 97 

3.16 Subroutine INCRS 103 

3.17 Subroutine INTER 107 

3.18 Subroutine MCDRIV 113 

3.19 Subroutine PRINTOUT 123 

3.20 Subroutine PROBIT 127 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page viii -SECRET/13- 

3.21 Subroutine PROGRO 135 

3.22 Subroutine PROREV 139 

3.23 Subroutine PROTAR 145 

3.24 Subroutine RDM1J 148 

3.25 Subroutine SETF78 153 

3.26 Subroutine SINC 155 

3.27 Subroutine SPACEUP 159 

3.28 Subroutine SPANOUT 161 

3.29 Subroutine SPECOL 169 

3.30 Subroutine TAPERR2 173 

3.31 Subroutine TAPERR4 177 

3.32 Subroutine TRI 181 

3.33 Subroutine VOTE 185 

4. REFERENCES 191 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

-SEDRETtil BIF-4-B30001-69 

Page ix 

ILLUSTRATIONS 

2-1 TSPOOND Basic Functional Diagram 4 

2-2 Dwell Time Probability Density Function 8 

2-3 Dwell Time Cumulative Distribution Function 9 

2-4 Dwell Time Density Function When Target is Clear 10 

2-5 Dwell Time Density Function When Target is Cloudy 11 

2-6 TWONDER and TSPOOND Scope On and Off Times 12 

3-1 TSPOOND Subroutine Hierarchy 37 

3-2 Main Program TSPOOND Flow Diagram 40 

3-3 Subroutine BERN Flow Diagram 43 

3-4 Subroutine BITRE Flow Diagram 49 

3-5 Subroutine CCP Flow Diagram 61 

3-6 Subroutine CORV Flow Diagram 68 

3-7 Subroutine DECIDE Flow Diagram 74 

3-8 Subroutine FUNCDRD Flow Diagram 83 

3-9 Subroutine GETDT Flow Diagram 88 

3-10 Subroutine GETV Flow Diagram 94 

3-11 Subroutine GROUT Flow Diagram 101 

3-12 Subroutine INCRS Flow Diagram 105 

3-13 Subroutine INTER Flow Diagram 111 

3-14 Subroutine MCDRIV Flow Diagram 118 

3-15 Subroutine PRINTOUT. Flow Diagram 125 

3-16 Subroutine PROBIT Flow Diagram 131 

3-17 Subroutine PROGRO Flow Diagram 137 

3-18 Subroutine PROREV Flow Diagram 142 

3-19 Subroutine PROTAR Flow Diagram 147 

3-20 Subroutine RDM1J Flow Diagram 151 

3-21 Subroutine SINC Flow Diagram 157 

3-22 Subroutine SPANOUT Flow Diagram 165 

3-23 Subroutine SPECOL Flow Diagram 171 

3-24 Subroutine TAPERR2 Flow Diagram 175 

3-25 Subroutine TAPERR4 Flow Diagram 179 

3-26 Subroutine TRI Flow Diagram 184 

3-27 Subroutine VOTE Flow Diagram 187 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 1 

1. INTRODUCTION 

The purpose of this document is to describe the mathematical 

models, capabilities, and detailed computational methods of the 

TSPOOND study computer program. The information contained in this 

document is intended to supplement the TSPOOND User's Manual (Reference 

1) by providing, in detail, the logic and computational methods 

employed by the program. 

Section 2 of this document describes the mathematical models and 

capabilities. Section 3 contains descriptions of the program subroutines including computational methods and detailed flow diagrams. 

TSPOOND usage and operating instructions along with reauired program 

interfaces may be obtained from Reference 1. 

The version of the TSPOOND program currently being used resides 

on the SOFT 11-05 U flight support tape along with the study program 

TWONDER and its environment. This tape has been copied and delivered to 

SAMS° and contains the following programs: 

Element No. Name ID, Mod Codes No. 

1 DIRCTY Directory 1777 

7. DUMPL B65CA 35 

3 LTAB P41AA 102 

4 SIPHON R69AA 103 

5 STTOMT G8ORB 346 

6 TANGVEL P16DA 626 

7 TBCD 033WH 130 

8 TCOIN SO3EC 446 

9 TDETAIL 034AL 131 

10 TDISPLAY A76AN 632 

11 TDMERGE PO8EG 341 

12 TEPHSPAN PO6FA 334 

13 TIRCOS P12DA 622 

14 TITANIC Q30EB 464 

15 TNTERP P10EA 620 

16 TOVER P11DA 621 

17 TSIGMA P17DD 627 

18 TSTACOR P15DA 625 
NRO APPROVED FOR 

1 JULY 2015 

BIF-4-B30001-69 

Page 2 

Element No. Name ID, Mod Codes No. 

19 TSTAVEC P14DA 624 

20 TWONDER U06AA 612 

21 TWONDER2 U07AI 613 

• 22 TWOPIN U01BA 1272 

23 TWPATW UO3AI 1276 

24 TWOPS UO2AR 1274 

25 TWACQPR UlOAQ 572 

26 TWEEDOFF U04AP 1123 

27 TWASCON U08CA 333 

28 TWMOSP UllBT 575 

29 TWMOSP2 U12AS 1005 

30 TWPLOT1 U3OAS 1030 

31 TWASSP2 U32AS 1033 

32 TWLIST U09AC 573 

33 TWOUT U13BD 1227 

34 TWASSP1 U32AD 1032 

35 TSPOOND X4OBH 1271 

Element numbers 1 through 5 are SDC programs. Element 7, TBCD 

and 9, TDETAIL are part of TDISPLAY's operating environment. TWASSP1 

is a table generating program used in TWONDER checkout, and TWLIST is 

a secure tape listing program. The remaining programs, except for 

TSPOOND, have specific TWONDER functions. TSPOOND can operate as a 

stand-alone program, but a prerequisite run must be made on TWONDER to 

generate a BIT containing the optimum target acquisition strategy for 

the main optics and the acquisition telescope(s). TSPOOND requires 

the BIT as a primary input. Consequently, TSPOOND and TWONDER 

environments have been placed on the same flight support tape. 

RELEASE 

SECRET/ D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001--69 -SfIRETtil- Page 3 

2.0 TSPOOND MATHEMATICAL MODES 

2.1 GENERAL DISCUSSION 

The purpose of the computer program TSPOOND (Statistical Program 

of On-Board Decisions) is to simulate the actual conditions of target 

visibility and activity, crew voting and consequent main optics 

selections for the MOL/DORIAN missions. Two general types of results 

are generated over a given rev span: (1) typical sample information 

describing crew performance, target visibility and activity, and main 

optics selections, and (2) statistical summary data of specified 

output parameters derived from a specified number of samples including 

the means, variances, maximum and minimum values. 

TSPOOND accomplishes the simulation using a Monte Carlo technique, 

sampling at random certain variables such as target visibility, 

activity, scope dwell times, crew recognition and false alarm. Using 

the path selections for the main optics and acquisition telescopes from 

the TWONDER BIT, TSPOOND simulates the effects of different crew voting 

strategies and other relevant factors on overall mission results. 

A basic flow diagram showing the hierarchy of operations is shown 

in Figure 2-1. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 4 -SEC-REV-11 

(

TSPOOND TSPOOND 

Process 

Inputs 

10( Last rev span 

processed? 

No 

Process next rev span 

Process next rev 

"' ( 

Last sample for Yes 

current rev processed? 

Process next sample 

for current rev 

Yes 

EXIT 

(

Yes Last rev in current 

rev span processed? 

IV° 

Yes ( Last group in 

current rev processed? 

irNo 

Process next group for 

current rev. 

• Last target for 

( 

)Ye s 

current group processed? 

Process next target 

in current group 

Figure 2-1. TSPOOND Basic Functional Flow 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 -SEUETia- Page 5 

2.2 MONTE CARLO APPROACH 

The Monte Carlo technique employed in TSPOOND answers questions 

about various mission results by constructing a random process corresponding, as close as possible, to what a typical mission is like. 

The program accomplishes the simulation by representing the relevant 

physical and performance parameters as random variables. The 

cummulative distribution functions for the random variables are 

chosen based on historical data. The specific random variables 

used in TSPOOND are listed in the following table. 

Variable Description 

V visibility of a target 

(V=1 target visible; V=0 not visible) 

6t scope dwell time 

a target activity 

(a=1 target active; a=0 target inactive) 

§ astronaut recognition of target activity 

(§=1 recognition; §=0 failure to recognize) 

1 astronaut false alarm, i.e., reporting 

a target active when it is actually inactive 

(1=1 false alarm; 1=0 correct report) 

On the basis of these random variables, the program can 

effectively simulate a mission, and hence determine those parameters 

which depend on the random variables. Thus the mission parameters 

of interest are also random variables which depend in a complex way 

on those listed above. If the dependence were simple, an analytic 

approach could be utilized to immediately determine the statistical 

properties of the pertinent mission parameters. If, as in the 

present case, the dependence in complex, the Monte Carlo approach 

provides an effective means. 

Basically, the Monte Carlo approach repeats the complete mission 

a large number of times (each repetition called a cycle) and tabulates 

the variations in the parameters of interest. For example, if r 

represents one such parameter, r is a function of the Vi, 6t,, 

§ and 1 where the subscript i ranges over N, the number of targets 

involved, i.e., 
NRO APPROVED FOR 

RELEASE 1 JULY2015 

BIF-4-B30001-69 

Page 6 --SEC-REVDr = f (V1,..., VN; 6tN; al,..., tti; 1N). 

If the program then processes M cycles, M different values of 

r result, r1,... r . The statistical properties of r are then 

inferred from the sample values. An approximation to the mean of 

r, for example, is found from 

M 

r = E r /24 

j=1 

and the variance from 

M 

a2(r) = E (rj - 72) /M 

j=1 

The program also records the largest and smallest value assumed 

by r over the M cycles. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 7 

2.3 RANDOM NUMBER GENERATORS 

Two types of random number generators (RNG) are used by TSPOOND 

to generate the (pseudo) random numbers needed to compute the values 

of the random variables involved in the Monte Carlo sampling: 

(1) a zero-one generator, and (2) a generator that samples from a 

triangular density function. Both of these RNG use a subroutine 

RDM1J (section 3.24) which computes random numbers between 0 and 1 

with a uniform distribution. The two RNG are described below. 

2.3.1 Zero-One RNG 

Many of the variables in the program are so-called "zero-one" 

random variables that assume the value 1 with some probability al and 0 

with probability 1 - al. If Z is such a variable, its value for each 

sample is determined by obtaining a number r from RDM1J falling 

between 0 and 1 and comparing it with a1

. If r < a Z is set to 1. 

If r 2: a Z is set to 0. 

That Z has probability al of being equal to 1 follows from: 

Pr{Z = 1) = Pr{r < al} = 

a

l 

1 = 1 

since r is uniformly distributed on [0, 1]. 

2.3.2 Triangular Density RNG 

The simulation of the acquisition scope dwell time requires the 

generation of random variables with a specified triangular density 

function. Let f be the required triangular density function with 

mean Q and let r1Q and r2

Q be the two base points (See Figure 2-2). 

--SEC-RET-tD- 
r1(1 Q r2Q 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 8 -SECRET-lit 

Dwell Time 

Figure 2-2. Dwell Time Probability Density Function 

Since f is a density function, the area of the triangle must 

equal 1. Thus, the altitude h is given by 

1 = 2 

1 (r2

Q - r1

Q)h 

Or 

2 h = 

Q(r2 rl) 

Thus, the definition of f(x) is 

f (x) 

[

h(x - r1Q) 

Q(1 - r1) 

S 

h(r2Q - x) 

Q(r2 - 1) 

if x < Q 

if x > Q 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 B1F-4-B30001-69 

Page 9 

The distribution function for x is then given by the integral 

of f, 

F(x) = 13c f(t)dt 

h(x r1Q)2 

2Q(1 - r1) 

if x Q 

1- h(r2

Q - x)2 

if x > Q 

2Q(r2 - 1) 

One property of F as a distribution function then guarantees that 

if a random variable r with uniform distribution on [0, 1] is 

generated, the variable T = F 1

(r) will have the distribution function 

F. TSPOOND uses this method of generating the variable T with the 

required triangular density function. 

F 

r 

T 

T= 

Solving 

Figure 

Dwell Time 

2-3. Dwell Time Cumulative Distribution Function. 

for T from the inverse of F yields 

( 

(3) 

/2Qr(1 - r1) 1 - r

1 

r1Q h if r < 

- r2 - rl 

( 

2Q(1 - r)(r2 - 1) 1 - r1 if r > 

r2Q - V 

2 - r1 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 10 -SEC-REVD2.4 ACQUISITION SCOPE SIMULATION 

The amount of time that a crew member spends viewing a target is 

a variable that depends on whether or not the target is visible, and, 

if visible, on whether or not the crew member notices activity. 

TWONDER uses a recommended dwell time for each target which is then 

transmitted to TSPOOND on the Binary Interface Tape. If the target 

is clear, TSPOOND uses the TWONDER recommended dwell time, dt R' 

as 

a basis for determining a triangular density function, f, for the 

sample dwell time, dt. If the target is cloudy, the density function 

f(dt) will be determined entirely from parameters input on the TSPOOND 

function card. 

More precisely, if the target is visible, two ratios, Q1 and 

Q2 are read from the function card, and f(dt) has the following form: 

f(6t) 

Qi 6tR 6tR 

Dwell Time 

Figure 2-4 Dwell Time Density Function When Target is Clear 

Q26tR 
f(dt) 

X2 

Dwell Time 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 11 

If the target is cloudy, three numbers, X1

, X2 and X3, are read 

from the function card and f(dt) has the form: 

Figure 2-5 Dwell Time Density Function When Target is Cloudy 

The TSPOOND scope on and off times are generated for each group 

using the sampled dwell times. The time between targets, SST, is 

approximated by the corresponding time in TWONDER, so that the equations 

for each scope are: 

t

(1) 

= 

i(1) 

on on 

t (i) = t (1) + (St(i) 

off on 

i > 1 

ton

(i) _ t (i-1) 1. a (i) _ i (i-1)) i > 2 

- off 

on off — 

where the bar denotes the TWONDER values and the superscripts refer 

to the target numbers within each group for the scope. The Ot(0is 

the actual (or sampled) dwell time. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 12 3ECRET1-11 

The situation is illustrated in Figure 2-6. 

on") t(1) t(2) tO121) 

t(2) E(3) 

off on 

 TWONDER 

4 

1SST(1)/ 2 e

-lI 

SST(2) 

(PLANNED) 

„R(1) 

i 

Est __„R( _ 

/ 

/ i / / 

I i / / 

1--- (s I SST

„ 1.1 

)----...1/ SST(2)/ TSPOOND 

at(1)---mmil ( t(2 

r r (ACTUAL) 

Figure 2-6 TWONDER and TSPOOND Scope on and off Times 

t

on

(1) toff on 

(1)' t(2) (2) (3) toff 

t

on 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 13 -SE ET/D 

2.5 INTRA-GROUP WEATHER CORRELATION 

The term "intra-group correlation" refers to the correlation 

between the visibility of targets within the same group. If one target 

is known to be visible, the probability that another target within 

the same group (and hence geographically close) is visible is enhanced. 

TSPOOND models this correlation by assuming that the correlation 

between any two targets is the same, i.e., 

p (Vi, V.) = p for i, j = 1, 2, ..., N (1) 

j 

where V. is a zero-,one variable for the ith target which is 1 if the 

target is visible and 0 if not. The probability of visibility P for 

the targets satisfies 

PriV. = 1) = P for i=1, N (2) 

Thus TSPOOND must generate the N variables V1,..., VNsatisfying 

(1) and (2). To accomplish this, TSPOOND uses the following conditional 

sampling technique:, First an auxiliary zero-one random variable C is 

introduced with Pr !C=1f = Pc and Pr (C=0) = 1-Pc. Then the distribution functions for the V. are determined conditionally so that 

Pr( Vi=i C=1 = P1 

Pr c Vi=0 I C=0 = P1 (Pr ( Vi=1 I C=0 ; = 1-P1) 

The basic problem, then, is to determine Pc and P1 in order to 

satisfy (1) and (2). 

Equation (2) implies that 

E (Vi) = PcP1 + (1-Pc) (1-P1) = P (4) 

(Pr K Vi=0 C=0 = 1-P1) 

(3) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 14 

The covariance of Vi andVj is given by 

COV(V, Vj

) = E(V V1 j

) - E (Vi) E (Vj

) 

where • 

and 

E(ViVj) = Pei)1

2 + (1-Pc) (1-P1)

2 

E(Vi) = E(Vj) = Pc P1 + (1-Pc) (1-P1) (5) 

So, carrying out the algebra, 

COV(Vi, Vj) = Pc(1-Pc) (2P1-1)2. 

Finally, the correlation coefficient between Vi andVj is 

p(VV 

V

j

) - a(v ) a v ) 

cov(vi, v ) 

where a(Vi) = (V j) = E(Vi):1-E(Vi) J . 

(6) 

So (6) becomes (using (2)) 

p (Vi, vj

) - 

P

c 

 (1-P 

c ) (2P1-1)

2 

7 (1-7) 

(7) 

Applying condition (1) to (7) yields 

— Pc(1-Pc) (2131-1)2 

P - (8) 

15(1-7) 

Thus the problem reduces to the simultaneous solution of (4) 

and (8) for P

c 

and P1. 

Letting K = p F1(1-13) in (8) yields 

K = (Pc-FC2) (2131-1)2 (9) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 15 

Solving (6) for Pl, 

T+P

c

-1 

P

1 2P

c

-1 (10) 

Returning to (9), 

K = (Pc 

or K = 

Now define 

Equation (12) now becomes 

K t 

Kt 

- Pc2) 

- P 2) 

c 

K

r 

(2Pc- 1)2 

(4Pc2 - 

2P + 2P

c 

- 2 

1 

2 - Pc 

2 

(11) 

(12) 

(13) 

2P

c 

 - 

f- 217 - 1 

1 

- 

= 

2 

Pc2 

Pc 

2P - 1 

c 

K 

(2P 

2 

- 1) 

= Pc 

4Pc+ 1) 

where finally 

Kt P

c

2 - P

c 

+ 1 = 0 

41( + 1 

The solution of (14) is 

(14) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 16 --SEC-RETI-BPc 

+ 

2 2 4K +1 t 

Substituting Pc into (10) results in 

P

1 = 2+ (P- V4KI+1 

Thus the values for P

c 

and P1 in (15) and (16) will guarantee 

the generation of the N variables V1, VNsatisfying (1) and (2). 

This method is particularly convenient for computational purposes 

because the visibility of the targets in a group can be accomplished 

by a succession of calls to a simple Bernoulli random number 

generator. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 17 -SECRET& 

2.6 INTER-GROUP WEATHER CORRELATION 

Inter-group weather correlation refers to the correlation between 

the visibility of targets in adjacent groups. The model used in 

TSPOOND assumes that the weather for group 1+1 is dependent only upon 

the weather for group i but not upon that for any other group. The 

amount of correlation is determined as a function of the time interval 

between their group decision times. A quantity tmax(input on the 

TSPOOND function card) specifies the time at which the inter-group 

correlation coefficient falls to 0. 

More precisely, define two zero-one random variables, V(0 and 

V

(i+i), representing the visibility of group i and group i+1 respectively, with 

V(i) ) = 

Pr ( V(i+1)= 1 ) IA 2 

Further let p be the specified 

V(i) and V(i+1) 

(Pr ( v(i) = 0) = 1-P1) (1) 

(Pr ( V(i+1)=0 ) = 1- 2) (2) 

correlation coefficient between 

p(v( i), v(i+1)) p 

The variable V(i) and V(1+1) satisfying (1) - 

by a conditional sampling technique. The value of 

selected to satisfy (1) and then the value of V(i+1 

conditionally so that 

(3) 

(3) are generated 

V

(i) is first 

is selected 

Pr 

and Pr 

v

(i+1)

= 1 I v(i)= 1 

( V(14.1)= 1 I V(i)= 0 

) = P1 

) =P2' 

From equations (1) and (2) and the definition of expectation, 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 18 -SEC-RETta 

E(V(i+1)) = 112 = g1P1 + (1-g1

)P2 (6) 

Also the variances of V(i) and V(i+1) are given by 

a2(v(i)) = 1

(1-p.1

) (7) 

and a2(V(i+l)) = 112 (1-112) (8) 

The expected value of the product of V(i) and V(i+1) is 

(i) (1+1) E(V V ) =. 111p1 

Hence the correlation coefficient between V(i) and V(i+i) is 

p(V (i), V(1+1)) = E(V(i) V(i+1)? - E(V() 1) E (V(i+1)

a(V(i)) a (V 1+1)) 

1/1P1 111μ2 (9) 

11)F12 (1-112

) 

So from (3), 

V /11(1-41) 1/2 (1-112

) 

/111'1 - 111112 (10) 

Thus the problem has reduced to the simultaneous solution of 

(6) and (10) for P1 and P2. Solving (10) for P1 yields 

P= --- ,/ 1 pa v (1-111) 112(1-412) + 42 (n) 

Substituting Pi from (11) into (10) produces 

(12) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 -SEC-RETtBBIF-4-B30001-69 

Page 19 

The solutions, P1 and P2, given in (11) and (12) must fall 

between 0 and 1, however. Applying this inherent constraint to 

(11) yields 

_ • - 

1 V

/ 1-pi) p2 (1-112) + 112 < 1 

111(1-P,2

) 

P < 

VP.1(1-4i1) 112 (1-112) 

and finally 

μl

(1-112) 

p < ti 112(1-P.1) 

A similar computation applied to (12) results in 

/p2 (1-p1 ) 

— 

P< 411

(1-11 

2

) 

so that the final constraint on p is given by 

(13) 

p <min (15) 

The maximum value p can have is denoted pmax . TSPOOND 

computes p from pmax and the time interval, T, between the group 

decision times for groups i and 1+1 as follows: 

if T > t max 

= 

(1- t T 

max 

) otherwise 

Thus the correlation coefficient linearly decays to zero at 

time t from its maximum value pmax

. 

max 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 21 

3. TSPOOND SUBROUTINE DESCRIPTIONS 

3.1 GLOSSARY OF TSPOOND COMMON STORAGE 

JOVIAL Symbol Dimension Description and Units 

ALTERN 5 Array containing the count of active, 

inactive, reject, unobserved, and total 

alternate targets over a rev span 

ASDT Actual acquisition telescope dwell time 

(sec) 

AV Actual visibility flag 

0 not actually visible 

1 actually visible 

AVOT Vote on reported and active status 

0 - no vote recorded 

1 - voted active 

2 - voted inactive 

3 - voted reject 

4 - not voted upon (unobserved) 

BLNK Item consisting of all blanks used 

mainly for output 

BTBF 1000 Input buffer for the TWONDER BIT 

information (first two files) 

BUFOUT 120 byte BCD outnut buffer 

CBERN Bernoulli variable visibility flag 

taken from previous grout' (used in 

the inter-group correlation model) 

0 - clouded 

1 - visible 

CLEART 2 Two cell array containing the count of 

clear targets with and without interdiction 

CNFLG Conflict flag indicating conflict 

status of group 

CNFLG = 0 group contains no targets 

in conflict with previous 

group's target selection 

-SECREV-B- 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 22 IfeRW-BJOVIAL Symbol Dimension 

CNFLG (Cont'd.) 

CNFLT 

CNFLG # 0 Group contains at least one 

target in conflict with 

previous group's target 

selection 

Conflict flag indicating conflict status of 

target 

CNFLT = 0 Present target not in 

conflict with previous 

group's target selection 

CNFLT 0 Present target in conflict 

with previous group's target 

selection 

DBITS 15 720 bit array whose bits, when set non-zero, 

indicate a typical sample detail output is 

desired on those corresponding rev numbers 

(e.g., when bit 35 of DBITS is set non-zero 

typical sample detail output for rev 35 is 

desired) 

DECEPT 7 (0) Number of false alarms 

(1) Not used 

(2) Number of failures to recognize 

(3) Number of false alarm primaries 

(4) Number of false alarm alternates 

(5) Number of failure to recognize primaries 

(6) Number of failure to recognize alternates 

DETFLG Boolean flag used to indicate when typical 

sample detail output has been written on 

KSPOUT 

DETFLG # 0 Write end of file on KSPOUT 

DETFLG = 0 No action taken 

DT Sum of the scope slew and settle time plus 

actual scope dwell time (sec) 

EOF Boolean flag used to check for end-of-files 

or end-of-tapes after an I/O operation 

EXTBITS Item whose first 30 bits indicate which 

extended statistics have been requested of the 

corresponding 30 summary output parameters 

Boolean flag which, when true, indicates 

typical sample detail output is desired on the 

current rev 

FDET 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 23 --SECRET1-11 

JOVIAL Symbol Dimension Description and Units 

FSUM Boolean flag which, when true, 

indicates summary output desired on 

current rev 

F78IT 

GDT1 

GN 

GNMAX 

ICOM 

21 1000 bit array whose bits, when set nonzero, indicate decimal integer output for 

those corresponding File 7 and File 8 

reset parameters 

Previous group's group decision time in 

sec (used in the inter-group visibility 

correlation model) 

Present group number 

Number of groups on the current rev 

Current rev span summary being processed 

by TSPOOND 

IGCC p - intra group visibility correlation 

coefficient, 0 < p < 1.0 

IMAGE The start address of the buffer which 

contains the converted image of the last 

card read by CARDIO 

INPUT 10 The buffer used to contain the data card 

images 

IPVIS Option flag for selection of probability 

of visibility used by TSPOOND 

IPVIS = 0 Intra/Inter group 

visibility correlation considered - probability of 

visibility from File 8 

IPVIS = 1 Intra/Inter group visibility 

correlation considered -

probability of visibility 

from target specific selection 

files of BIT 

IPVIS = 2 Intra/Inter group visibility 

correlation considered -

probability of visibility 

from function card 

IPVIS = 3 Independent (no correlation) 

using probability of 

visibility from File 8 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 24 

JOVIAL Symbol Dimension Description and Units 

IPVIS (continued) 

IRN 

ITOPG 

ITOPT 

IVO 

KBIT 

KIN 

KOL 

KON 

KOUT 

KSPOUT 

KSPTFG 

IPVIS = 4 Independent (no correlation) 

using probability of 

visibility from function card 

Initial random number seed 0 <IRN < 236 

The selected target index referenced from 

the beginning of the group 

The selected target index referenced from 

the beginning of the rev 

Decision strategy flag for determining 

target selection. At present no options 

exist for this strategy 

TWONDER BIT tape logical symbolic unit 

Symbolic unit assignment for input unit 

Symbolic unit assignment for Monte Carlo 

specific detail and summary output 

On-line printer symbolic unit 

Symbolic unit assignment for listable 

secure output tape. 

Symbolic unit assignment for TSPOOND 

users interface tape 

Flag used to control KSPOUT output 

KSPTFG * 0 KSPOUT not written 

KSPTFG = 0 Information in buffer to be 

output on KSPOUT 

LINECNT Line counter used in the formatted output 

of the Monte Carlo specific information 

(KOL Tape) 

LPIL Boolean flag used to check success of the 

last I/O operation 

MAX Item containing the maximum value of a 

particular summary output parameter on a 

rev by rev basis; used in extended 

statistics output logic 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 -SEGREfra Page 25 

JOVIAL Symbol Dimension Description and Units 

MCBUF 

MEAN 

MIN 

NALTN 

NCNFLT 

NCOM 

NGPRS 

NPRIM 

120 byte BCD output buffer; used primarily 

to buffer the Monte Carlo specific formatted output 

Item containing the mean value of a partic-r 

ular summary output parameter on a rev by 

rev basis; part of the extended statistics 

output 

Minimum value of a particular summary output parameter 

Total number of alternate targets 

accumulated over a rev span 

Total number of groups eliminated due to 

conflict within a rev span 

Total number of rev span summaries to be 

processed by TSPOOND 

Total number of groups accumulated over a 

rev span 

Total number of primary targets accumulated 

over a rev span 

NS Current sample number 

NTPRS 

NULLREV 

NVIT 

PFAL 

Total number of photographed targets on 

the TWONDER BIT accumulated over the 

present rev span 

Boolean flag used to indicate a null rev 

(no targets on a particular rev) occurring 

on the TWONDER BIT 

Total number of visual intelligence 

targets accumulated over a rev span 

Function card probability of false alarm 

(i.e., probability that a crew member 

reports a target active when it is inactive), 

O. < PFAL < 1.0 

PFALM TSPOOND working cell for probability of 

false alarm, 0.< PFALM < 1.0 
NRO APPROVED FOR 

RELEASE 1 JV*2p5 4 B30001-69 

Page 26 -SECREVDJOVIAL Symbol Dimension Description and Units 

PRCNTRL Boolean flag to control printing of Monte 

Carlo specific output 

PRCNTRL 0 0, No Monte Carlo specific 

output written 

PRCNTRL = 0, Monte Carlo specific 

output written on KOL 

PRCONFL 

PREC 

PRECOG 

Conflict matrix of target selected in 

previous group 

Probability of recognition, O. < PREC < 1.0 

TSPOOND working cell for probability of 

recognition, O. < PRECOG < 1.0 

PRIM Flag indicating whether the group being 

processed contains a primary target 

PRIM = 1 current group contains a 

primary target 

PRIM = 0 current group does not contain 

a primary target 

PRIMRY 5 Array containing the count of active, 

inactive, reject, unobserved, and total 

primary targets over a rev span 

PROBA 

PROBFA 

PROBREC 

PROBV 

Probability of activity off Reset File 8 

of the TWONDER BIT, O. < PROBA < 1.0 

Probability of false alarm off Reset File 8 

of the TWONDER BIT, O. < PROBFA < 1.0 

Probability of recognition off Reset 

File 8 of the TWONDER BIT, 0. < PROBEC < 1.0 

Probability of visibility off Reset File 8 

of the TWONDER BIT, O. < PROBV < 1.0 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 27 --SECRETIM 

JOVIAL Symbol Dimension Description and Units 

PROL Function card input parameter controlling 

which output tapes will be written 

PROL > 0 BCD interface tape (KSPOUT), 

and listable output tape 

(KOUT) will be written 

PROL < 0 KSPOUT, KOUT, and Monte Carlo 

specific output tape (KOL) 

will be written 

PV Working cell for the probability of 

visibility, 0. < PV < 1.0 

PVINP Probability of visibility input on 

TSPOOND function card, O. < PVINP < 1.0 

PVIS Working cell for the probability of 

visibility of the group being processed, 

O. < PVIS < 1.0 

PVIS1 Working cell for the previous group's 

probability of visibility, 0. < PVIS1 < 1.0 

RA Reported activity of RA = 0 reported not 

current target active 

= 1 reported 

active 

= 2 not reported 

RATIO1) 

RATIO2 

REVTAB 

REN 

RN 

Dwell time density ratios for clear votes. 

The recommended dwell time is multiplied by 

each of these ratios to form the vertices 

of the dwell time triangular density 

function for clear votes 

Name of table containing the selection file 

parameters (one rev's worth) 

Rev number of ending rev of the current 

rev span 

Current rev number 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 28 --SEC-REVDJOVIAL Symbol Dimension Description and Units 

RR1 Dwell time density ratios for reject votes. 

XI, X2, X3 represent (in sec.) the three 

vertices of the dwell time triangular 

RR2 density function for reject votes 

RR1 E 

X2 

RR2 E 13- 

)(2 

RV Reported visibility of current target 

RV = 0 reported not visible 

RV = 1 reported visible 

RV = 2 not reported 

SCOF 2 Scope on flags, set to non zero for each 

scope after first viewing by each scope, 

initialize once for each group 

SIGMA 

SILT 

SMAX 

30 Array containing the standard deviations of 

the 30 output parameters when extended 

statistics are desired 

2 Current time for scope SN (sec) 

30 Array containing the maximum of the 30 output parameters when extended statistics are 

desired 

SMIN 30 Array containing the minimum of the 30 

output parameters when extended 

statistics are desired 

SN Number of scope viewing current target 

SNN Index of scope number viewing current target 

SNN = SN-1 

STAT 30 Array containing running sums of the 30 

output parameters of the extended 

statistics output over one sample 

STATS 30 Array containing sums of the 30 output 

parameters of the extended statistics 

output over all samples 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 29 

JOVIAL Symbol Dimension Description and Units 

STOF Scope off time for viewing of current 

target (sec) 

STON Scope on time for viewing of current target 

(sec) 

TALT* Target altitude (ft X 10

-2

) 

TAON* ATS on time, seconds, machine time 

TASSNO* Scope number used 0 - not viewed by ATS 

(target specific) 1 - scope 1 used 

2 - scope 2 used 

TATSM02* Off time for MO photography of alternate 

targets, seconds, machine time 

TAWGT* ATS relative target weight (non-dimensional) 

TBAB13* Time between forward and vertical 

acquisition (sec) 

TBACD* Specifies alter option used 

0 - none 

1 - add 

2 - change 

3 - delete 

TBAHT* Vehicle altitude at time of vertical 

acquisition (nautical miles) 

TBAMS* Mission number 

TBAPR* Probability factor (%) 

TBARV* Revolution of acauisition requested on 

target card 

TBASA* Sun elevation angle (rad) 

TBASR* Slant range at time of vertical 

acquisition (naut. mi.) 

*Indicates items are passed from the selection files of the 

TWONDER BIT input tape. 

-SEC-RE-Tit 
NRO APPROVED FOR 

RELEASE 1 JULY_Z015 Bii4-B30001-69 

Page 30 --SE&REftBJOVIAL Symbol Dimension Description and Units 

TBAVY* Azimuth flag 0 - descending 

1 - ascending 

TBA16* Obliquity of vertical acquisition 

TBA23* Obliquity deletion angle (deg). A limit 

for obliquity beyond which targets are 

deleted from consideration 

TBENCHF* Flag indicating target is a bench mark 

target (1 - yes, 0 - no) 

TDDD* Target diameter (ft X 10) 

TDECIS* Latest time at which decision can be made 

to take primary target of a group or substitute an alternate (sec) 

TDWELL* Nominal ATS dwell time (sec) 

TEEE* Sun deviation angle at time TT2 (radians) 

TFLICT* Conflict matrix (or word). 24-bit array in 

which a bit is set to 1 for each photographable target in the following group 

which the target conflicts with 

TFSUM 

TGRNO* 

TIDA* 

TIDB* 

TIDX 

Flags indicating rev span summary desired 

or not 

0 - Summary desired for corresponding 

rev span 

1 - Rev span summary not desired for 

corresponding rev span 

Target group number 

First 8 characters of target's alpha 

numeric identifier 

Final 2 characters of target's alpha 

numeric identifier 

Target index within current rev 

0 - 1st target 

1 - 2nd target, etc. 

*Indicates items are passed from the selection files of the 

TWONDER BIT input tape. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 31 

JOVIAL Symbol Dimension Description and Units 

TLAT* Target latitude (radians) 

TLONG* Target longitude (radians) 

TMATSF* Mandatory ATS flag, indicates target must 

be viewed with ATS (1 - yes, 0 - no) 

TMAX The maximum time within which inter-group 

visibility correlation is considered (sec) 

TMODE* Requested photographic mode (0-9) 

TMPF* Mandatory primary flag. If set, target is 

to be taken by main optics and is assigned 

a priority of O. (1 - yes, 0 - no) 

TMSIG* Mid stereo angle (deg), the stereo angle 

at the average time between TT1 and TT3 

TN Target number within group (1 to TNMAX) 

TNASSTE* Number of ATS entries for rev 

TNBITE* Number of entries on BIT for entire rev 

TNMAX 100 Maximum number of targets within each group 

of current rev 

TNMOSTE* Number of main optics entries on BIT for 

entire rev 

TNN Target index within current group 

0 - 1st target in group 

1 - 2nd target in group, etc. 

TNP 2 Rev specific target numbers of the last 

target within current group taken by 

current scope 

TNSF* Direction of vehicle pass over target 

0 - North to South 

1 - South to North 

*Indicates items are passed from the selection files of the 

TWONDER BIT input tape. 
NRO APPROVED FOR 

RELEASE 1 J320446-B30001-69 

Page 32 -SEC-RE-MI 

Description and Units 

Obliquity at time TT1 (radians) 

Obliquity at time TT2 (radians) 

Obliquity at time TT3 (radians) 

Total number of samples requested on 

current rev span summary 

JOVIAL Symbol Dimension 

TOMEGA1* 

TOMEGA2* 

TOMEGA3* 

TONS 

TONSN 

TPRIA* 

TPRII* 

TPROBA* 

100, 2 Array containing ATS time on (both 

scopes) for each group within rev (sec) 

Active priority of target (0-99) 

Inactive priority of target (0-99) 

Probability of activity for a given 

target (%) 

TREN Ending rev number of the current 

requested rev span 

TREV* Rev number incremented at passage of 

ascending node 

TRR* Resolution requirement in inches (0-99) 

TRST Beginning rev number of the current 

requested rev span 

TSC* Scan target flag, (1 - yes, 0 - no) 

TSCC* Special category code, designating a 

target which falls in a special category 

(000-999) 

TSHAPE* Pitch weighting function (0-9) (See File 8 

Description, TWONDER User's Manual, 

Reference 3) 

TSIGMAD* Desired pitch angle (deg) 

*Indicates items are passed from the selection files of the 

TWONDER BIT input tape. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 33 

JOVIAL Symbol Dimension Description and Units 

TSMODE* Main optics selected photographic mode 

(0-9) (See File 8 Description, TWONDER 

User's Manual, Reference 3) 

TTDWELL* ATS dwell time from File 8 (sec) 

TTIME* Time of vertical acquisition (when vehicle 

is closest to target) in minutes from 

base date 

TTLV* Target location validity code (0-9) 

TTOFF* Main optics off time in seconds, machine 

time 

TTON* Main optics on time in seconds, machine 

time 

TTONS Array containing total number of samples for 

each requested rev span 

TT1* Forward acquisition time (machine time sec) 

TT2* Vertical acauisition time (machine time sec) 

TT3* Aft acquisition time (machine time sec) 

TVAP* 

TVELI* 

TVIF* 

Target type flag 0 - VIT 

1 - Primary 

2 - Alternate 

Inertial velocity vector magnitude of 

vehicle at time of vertical acquisition 

(ft/sec) 

VIT flag, designates target to be viewed 

by ATS only, non-photographable 

(1 - yes, 0 - no) 

TWA* Active target weight, non-dimensional 

TWEIGHT* Main optics relative weight of selected 

target, a measure of target worth, nondimensional 

*Indicates items are passed from the selection files of the 

TWONDER BIT input tape. 
NRO APPROVED FOR 

RELEASE1JULVW i 4-B30001-69 

Page 34 

JOVIAL Symbol Dimension Description and Units 

TWI* Inactive target weight, non-dimensional 

TWX* Weather factor (0-99) 

VDICT 100 Index for the VTAB array indicating the 

beginning entry of the voting table 

corresponding to each group within the rev. 

VEHNO Vehicle number 

VIV 15 Array containing the correlated intragroup visibility variables for each 

target within a group 

0 - clouded 

1 - visible 

VOTESA 5 Array containing number of active, inactive, 

reject, unobserved and total alternate 

target votes 

VOTESP 5 Array containing number of active, inactive, 

reject, unobserved and total primary target 

votes 

VTAB 1000 Voting table array for each target within 

each group of the rev. Contains the 

active, inactive, reject, and unobserved 

weights for each target 

VV Flag denoting visibility for current 

target 0 - clouded 

1 - visible 

WEIGHT 2 Average selected target weights with and 

without interdiction 

WRN Working random number seed 

WTOP The weight (active, inactive, reject, 

unobserved) assigned to the actual 

vote of the selected target within 

a group 

*Indicates items are passed from the selection files of the 

TWONDER BIT input tape. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 -SEGRET1-11- 

BIF-4-B30001-69 

Page 35 

JOVIAL Symbol Dimension Description and Units 

XX1 ) Dwell time density parameters for reject 

XX2 votes (sec) representing the three 

vertices of the dwell time triangular 

XX3 density function 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4--B30001-69 

Page 37 

a. z ---(-) 

1••••4 ‹C 

ce CL 

0- LaJ V) 

C-) CD

Z 1.-4 

1/) t--I .. '".

V 

Ce cl) UJ cL C-.) C LO cd = 

Z F- I- •-• UJ 

s--e = Z 00 •0 •.`.". CC I■4 

I

CC CD - 

>.

CD '0 LU ICC ce CD 

''''''' 

0- I -• 

7 0 7 Z 

41 CC 0 CL cC 

CC CI_ F- 0 LU 

C) LU 

■••••• = 

C■.) Ca 

Ce CZ 1.-4 

)... Ca. Ce 

0.. I.-4 

CO I- 

= ''D CD 

F- I-- 0- ...... ....... E ce 

= ›. LU Z = W CO CD I■1 CI 0- t2: ' ...,_ (..) 

41 CC 

CD.■.. ce Li_ a. C I- 0[1 ‹C 1- ,-.3. 

CI I■I 1. F- 

▪ 

X CD . C.) v) .......1-. 0 

Q 1JJ F- CD 10. CD CC (/) CO 

r-- LL 

F

- .....1_, 

1■4 LU CO i_ V) 

IX LU 

0- C 4. 

F- LU CD 

FCC 

C1 FO 

Fa a a = 

O I- I- N Z

F- 

..■■ = —I: a. C4 CD CL 

= Z 

a- 0- 

1■1 /1 I. CD 

(11 L.) ...I i■•• 

LLI Q (...) 

v., (...) 1-1.1 

UJ CU 

0- LLI 

• 

LU = r.. 

F- Od = 0 41 CI 

F-- CD 7 OD CC 

Z = F- CL ■-•I 0 = CC F- UJ 

TSPOOND Subrou

tine Hiera

rchy 

O 

(„, 

O 

Lam. 

Ln 0- 

O 

cc 

C

UO CD 

O 4INNIVIO 0- LU 

(REVERSEOF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 39 -SKRfftil 

3.2 TSPOOND 

3.2.1 Purpose 

TSPOOND serves as the highest level control routine for the 

Statistical Program of On Board Decisions (TSPOOND). Its primary 

function is to initialize core storage properly; in addition, it 

contains the main body of program item, array and table data declarations. TSPOOND performs no computations but merely passes execution 

control to the next TSPOOND sub-module to accomplish the TSPOOND task. 

3.2.2 Usage 

3.2.2.1 Calling Sequence 

TSPOOND is the main routine in the TSPOOND computer program and 

is initiated by input of the TSPOOND function card to the SMTC 

executive control program. 

3.2.2.2 Input 

CLANK Cell containing the current location counter; 

i.e., the first available memory location 

KOUT Symbolic listable output tape (logical tape 8) 

3.2.2.3 Output 

None 

3.2.2.4 Error/Action Messages 

None 

3.2.2.5 Subroutines Called 

MCDRIV Main driver for TSPOOND 

WEOF Tape/disk output routines 

CHECKW 
NRO APPROVED FOR 

RELEAsE 1 JaYg116-4-B30001-69 

Page 40 --SECIE-TaTSPOOND TSPOOND 

( TSPOOND 

1 

Items, arrays, tables data 

declarations 

1 

Initializes 

core to zero 

MCDRIV 

Main driver for 

computational control 

of TSPOOND 

Write EOF on 

tape KOUT 

1 

( END ) 

Figure 3-2 Main Program TSPOOND Flow Diagram 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 41 -SEORM-- 

3.3 SUBROUTINE BERN 

3.3.1 Purpose 

BERN is a Bernoulli random number generator which will output 

either a zero or a one as a function of a random number obtained from 

RDM1J. If the random number from RDM1J is less than or equal to a 

specified probability, BERN will output the number one. If the random 

number from RDM1J is greater, BERN will output zero. 

3.3.2 Usage 

3.3.2.1 Calling Sequence 

BERN (PROB) $ 

3.3.2.2 Input 

a. Calling Sequence 

Program 

Symbol Description 

PROB Input probability. A floating point 

number between zero and one 

b. Inputs through common locations 

WRN 

3.3.2.3 Output 

a. Calling Sequence 

Program 

Symbol Description 

BERN An integer number, either zero or one 

b. Outputs through common locations 

None 
NRO APPROVED FOR 

RELEASE 1JUMM-B30001-69 

Page 42 -SEC-RETtil3.3.2.4 Working Symbols 

Program 

Symbol Description 

ANS A random number between zero and one. 

3.3.2.5 Error/Action Messages 

None 

3.3.2.6 Subroutines Called 

RDM1J 

3.3.2.7 Called By 

GETV 

CORV 

VOTE 

INTER 

3.3.3 Method 

Figure 3-3 shows the flow logic for BERN. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 43 

BERN BERN 

BERN 

ROMIJ 

Obtain uniformly distributed 

random number 

NO Is the random number 

equal to or less than PROB 

YES 

•■•■•■■ilr■MINIIM■ IMM=.111■111■■■•••■■• 

1.•■•=11, •••••■■■■■ BERN = 1 •■•011■■■11 

( RETURN ) 

BERN = 0 

Figure 3-3 Subroutine BERN Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 SECRET/D Page 45 

3.4 SUBROUTINE BITRE 

3.4.1 Purpose 

The function of subroutine Bl1RE is to read into core storage 

the MO and ATS selection file(s) of the TWONDER BIT, one file (rev) 

at a time corresponding to the current rev being processed. Secondary 

functions of BITRE are to calculate the total number of groups within 

a rev and the number of targets within each group, to set up the voting 

table weights corresponding to each target, and to tabulate the scope 

on-times for the scopes in each group. 

3.4.2 Usage 

3.4.2.1 Calling Sequence 

BITRE $ 

3.4.2.2 Inputs 

a. Calling sequence inputs 

None 

b. Inputs via common locations 

BLNK 

IPVIS 

KBIT 

RN 

3.4.2.3 Output 

a. Calling sequence outputs 

None 

SECRET/ D 
NRO APPROVED FOR 

RELEASE1a17-201-$30001-69 

Page 46 -SEC-REVB-- 

b. Outputs via common locations 

BUFOUT 

EOF 

GNMAX 

KSPTFG 

LPIL 

NULLREV 

PV 

REVTAB 

TAON 

TASSNO 

TBAPR 

TGRNO 

TNMAX 

TONSN 

TPROBA 

TWA 

TWI 

VDICT 

VTAB 

3.4.2.4 Working Storage Within Routine 

INDX Target working index within rev 

NG Group counter 

NT Working cell for number of targets 

processed 

NTPG Target counter 

NTR Total number of targets on current rev 

NTT Total number of targets on current rev 

left to be processed 

PA Probability of activity 

3.4.2.5 Error/Action Messages * 

In searching the TWONDER BIT for the current rev, if an end-oftape is encountered before the rev is found, the following error 

message appears on-line and execution is halted: 

"REV XX NOT FOUND ON BIT" 

This message indicates that the current rev selection file cannot be 

located on the TWONDER BIT. Either a new BIT should be mounted and 

the TSPOOND run restarted, or the GO button should be depressed to 

continue program processing on the next requested rev. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 47 

3.4.2.6 Subroutines Called 

READ Binary read routine 

CHECKR Checks last read operation 

OCTBCD Octal to BCD conversion routine 

SKIFF Spaces a magnetic tape a number of files 

SPACEUP Spaces on-line printer up 16 lines for 

readability 

PRINTOUT Generalized BCD output routine 

TAPERR4 Read error action routine 

3.4.2.7 Called By Following Routines 

PROREV Rev processing driver 

3.4.3 Method 

BITRE reads a file (or one rev of information) from the TWONDER 

BIT into the rev table (REVTAB) buffer storage. By comparing group 

numbers of each target, the number of groups within the rev as well 

as the number of targets within each group is calculated. Next, the 

voting table weights (active, inactive, reject, unobserved weights) 

are computed and stored for each target. The active (TWA) and inactive 

(TWI) weights are extracted directly from the rev table, with the 

unobserved weight, Wunob computed as follows: 

= PV

[PA

(TWA) + (1-PA

w ) TWI] 

unob 

where PV= probability of visibility 

P

A = probability of activity 

The reject weights are set to zero. An array of indexes, VDICT, are 

logged which serve as pointers to each group's position in the voting 

table of weights. The individual scope on-times for each group 

are extracted directly from the rev table and stored at this time for 

future reference. 

-SEGRETI-B- 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

131F-4-B30001-69 

Page 48 

3.4.4 Restrictions 

BITRE can only process tapes written in the TWONDER BIT format 

(Reference 2). The tapes must be spaced to the selection file(s) and 

the revs must be processed in ascending order; i.e., BITRE does not 

search backwards on the BIT for a specified rev. 
Initialize counter on 

targets processed 

JJ = 0 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 49 

BITRE BITRE 

( BITRE ) 

Initialize 

scope-on time 

arrays 

TONSN(I,J)=0 

I 

READ 

Read a record from 

TWONDER BIT 

EOT encountered? 

IvYES 

NO 

PRINTOUT 

Output message: 

"REV XX NOT FOUND ON BIT" 

CHECKR 

Check last read operation.

> 

Figure 3-4 Subroutine BITRE Flow Diagram 
Set NULLREV flag, 

NULLREV = 1 

RETURN to 

main program to 

set up new rev 

processing 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 50 --SEC-REVDBITRE BITRE 

SPACEUP 

Space on-line printer up 

for readability 

STOP 

Figure 3-4 Subroutine BITRE Flow Diagram (Continued) 
(

Iscurrent 

record 1st record 

of rev? 

JJ = 0 

NO 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 51 --SEORE-Ta 

BITRE BITRE 

Read error 

detected? 

LPIL set? 

NO 

YES TAPERR4 

Output error 

message on-line 

YES 

Store working 

cells for current 

and total no. 

of targets 

NT = TNBITE 

NTR = NT 

Is REV no. on BIT 

equal to current NO 

rev no. 

TREV = RN? 

YES 

( 

 Is current rev 

a null rev? 

NT = 0? 

1 YES 

SKIPF 

Skip BIT to 

next file 

Set null rev flag 

NULLREV = 1 

NO 

SKIPF 

Skip BIT 

to next file 

►{ RETURN 

Figure 3-4 Subroutine BITRE Flow Diagram (Continued) 
Store total number of targets 

NTT = NT 

Move NTT target's 

worth of information 

from buffer storage 

to rev table storage 

REVTAB = REVTAB1 

Decrement 

number of targets 

NT = NT - 50 

(

Is no. of targets greater 

than 50? 

NO 

NT > 50 

NTT = 50 

YES 

SKIPF 

Skip to next 

BIT file 

Increment 

index on targets 

processed ( JJ = JJ + 50 

Are there more 

targets on current rev? YES 

NO 

NT > 0? 

NRO APPROVED FOR 

RELEASE 1 am .2415,,_ B30001-69 

Page 52 4ESREFt11. 

BITRE BITRE 

Figure 3-4 Subroutine BITRE Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 53 

BITRE BITRE 

Initialize 

rev counter cells 

KK = 0 

VOICT(SOS) = 0 

NG = 1 

NTPG = 1 

Compute current prob. of activity, 

and prob. of visibility 

PA, PV 

Compute unobserved weight 

wunob. = PV [PA V 

 [P. TWA + (1-PA) TWI] 

Store the voting table 

weights corresponding to 

each target in array 

VTAB 

4, 

Determine the index 

for the VTAB array 

indicating the beginning 

entry of VTAB corresponding 

to each group within the 

rev. Store in array 

VDICT 

Figure 3-4 Subroutine BITRE Flow Diagram (Continued) 

SECRET/D 
NRO APPROVED FOR 

RELEASE 1 JULY 4117-4-B30001-69 

Page 54 

BITRE BITRE 

Compute number of 

groups within current 

rev 

GNMAX 

Compute number of 

targets within each 

group. Store in array 

TNMAX 

Compute all 

scope on times for 

all the groups within 

the current rev. 

Store in array 

TONSN 

(RETURN ) 

Figure 3-4 Subroutine BITRE Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 55 --SECRET& 

3.5 SUBROUTINE BUFSET 

3.5.1 Purpose 

BUFSET is used to transfer values from an input buffer to fixed 

locations within an output buffer (BUFOUT) and to convert those values 

from a binary floating point to a BCD floating point format. The 

result of printing this output buffer will be a listing that displays 

the output, five BCD words per line. 

3.5.2 Usage 

3.5.2.1 Calling Sequence 

BUFSET (BUFFER) $ 

3.5.2.2 Input 

a. Calling sequence 

Program 

Symbol 

BUFFER 

Description 

The address of a location within the 

input array BTBF which contains the 

first of five words to be moved 

b. Input through common locations 

None 

3.5.2.3 Output 

a. Calling sequence 

None 

b. Output through common locations 

BUFOUT 

3.5.2.4 Working Symbols 

None 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 56 -S.EUETfB3.5.2.5 Error/Action Messages 

None 

3.5.2.6 Subroutines Called 

System subroutines: OUTERR 

OUTPUT 

3.5.2.7 Called By 

PROBIT 

3.5.3 Method 

BUFSET transfers five words at a time from the input array to the 

output buffer, constituting one record of information. The five words 

of each record are arranged in the following characters of the record: 

Word 1 - Characters 15 to 30 

Word 2 - Characters 35 to 50 

Word 3 - Characters 55 to 70 

Word 4 - Characters 75 to 90 

Word 5 - Characters 95 to 110 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 -SENETIM Page 57 

3.6 SUBROUTINE CCP 

3.6.1 Purpose 

The purpose of subroutine CCP is to read and process all command 

cards, (SUMMARY, DETAIL, EXTENDED data cards), set up the command table 

sorted by rev number, and determine which revs require output of typical 

detail statistics and rev span summary statistics. Based upon 

EXTENDED card input, CCP also determines those rev span summary output 

parameters for which extended statistics are to be computed. 

3.6.2 Usage 

3.6.2.1 Calling Sequence 

CCP $ 

3.6.2.2 Input 

a. Calling sequence inputs 

None 

b. Inputs via common locations 

EOF 

INPUT 

KIN 

KOL 

KON 

KOUT 

KSPOUT 

LPIL 

3.6.2.3 Output 

a. Calling sequence outputs 

None 
NRO APPROVED FOR 

Rq4145.66015-69 

Page 58 

b. Outputs via common locations 

DBITS 

EXTBITS 

NCOM 

TFSUM 

TREN 

TRST 

TTONS 

3.6.2.4 Working Storage Within Routine 

Name 

BITNO 

DWDS 

INSPAN 

NCOMTB 

OUTPUT 

SORTAB 

3.6.2.5 Error/Action Messages 

Description 

Contains bit number extracted from 

a word 

Number of words read by last read 

operation 

Current rev number within the rev 

span during input processing phase 

Counter on number of entries in the 

command table 

Array containing the command card 

items converted from a free field 

format 

Starting address of the table to be 

sorted 

When CCP encounters a command data card with an incorrect format, 

the following message appears on-line: 

SYSTEM DETECTED ERROR ON LAST CARD READ, INSERT CARD AND TRY 

AGAIN 

To continue program execution, the data card should be corrected and 

re-input. 

If the input data deck does not contain any SUMMARY or DETAIL 

command cards, the following message appears on-line and program 

execution is aborted: 

NO SUMMARY OR DETAIL CARDS PROCESSED, PROGRAM CANNOT CONTINUE 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 59 -SECIEftElIf either a SUMMARY or a DETAIL data card shows a requested rev 

number greater than rev 720, the following message appears on-line: 

REV NUMBER GREATER THAN 720, INSERT CARD AND TRY AGAIN 

Program execution may be continued after the data card is corrected 

and re-input. 

3.6.2.6 Subroutines Called 

CHECKN 

CHECKW JOVIAL I/O procedures 

CREAD 

CWRITE 

FFCONV Free field conversion routine 

SORT Sorts tables with parallel entries 

in ascending or descending order. 

SPACEUP Spaces on-line printer up 16 lines 

for readability 

3.6.2.7 Called By Following Routines 

MCDRIV 

3.6.3 Method 

CCP performs no computations and is primarily concerned with 

processing command card input information. These command cards 

(SUMMARY, DETAIL, EXTENDED cards) are read one card at a time and 

the rev span information thereon is placed in a contiguous table 

in core storage. In the case of DETAIL and EXTENDED card information, 

corresponding bits of the DETAIL and EXTENDED arrays are set to indicate 

(1) those revs where typical sample detail output is requested, and 

(2) those rev span summary output parameters for which extended 

statistics have been requested, respectively. After all command data 

cards have been read and processed, the rev span command table is then 

sorted by rev number to facilitate the rev by rev TSPOOND processing. 

..„,•■•••,„ 
NRO APPROVED FOR 

REaTf,E4-1413000115-69 

Page 60 

3.6.4 Restrictions 

3.6.4.1 When both SUMMARY and DETAIL command cards are present in the 

data deck, CCP expects all the SUMMARY data cards to precede the DETAIL 

cards, although the SUMMARY cards as well as the DETAIL cards may 

appear in any order within themselves. 

3.6.4.2 There must exist at least one SUMMARY or one DETAIL card in 

the data card deck setup. SUMMARY cards only or DETAIL cards only are 

acceptable data decks. 

3.6.4.3 One DETAIL or EXTENDED command data card may contain at most 

25 items. The inclusive "TO" descriptor should be used to meet this 

limitation if necessary (See Reference 1, section 2.3, Data Card Input). 
CREAD 

Read free field 

data card 

YES( card )N 

EXTENDED 

encountered? 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 --SMET1-13- BIF-4-B30001-69 

Page 61 

CCP CCP 

CCP 

Initialize row counter 

in command table 

Check last read ) 

command 

NO YES 

CWRITE CWRITE Card read 

error? Write error message online: "SYSTEM DETECTED ERROR 

ON LAST CARD READ, INSERT 

CARD AND TRY AGAIN" 

Write card image 

on KOL, KSPOUT, 

KOUT 

LPIL # 0 

CHECKR 

ND cardX10.4, 

encountered? 

YES 

FFCONV 

Convert free field 

items and store into 

array OUTPUT 

11, 

SUMMARY 

NO card YES 

encount—

ered? 

SPACEUP 

Space up on 

line printer 

1 

( STOP 

Push GO to 

continue 

YES DETAIL card 

Store summary card 

parameters as next 

entry in command table: 

TRST, TREN, TTONS , TFSUM 

Figure 3-5 Subroutine CCP Flow Diagram 

encountered? 

NO 

V 

SECRET/D 
NRO APPROVED FOR 

REI-§ffE4413\6M-69 

Page 62 -SECRET/4Y 

CCP CCP 

DETAIL card encountered 

Is next rev number' 

NO specified on DETAIL 

card inclusive to 

rev numbers in 

command table? 

s rev no. 

greater than 

720? 

YES Set up new 

entry in command 

table 

TRST, TREN, TTONS 

Set DETAIL Bit 

in DBITS array 

(

Have all 

entries on 

DETAIL card 

been 

processed? 

YES 

YES 

NO 

N 

Figure 3-5 Subroutine CCP Flow Diagram (continued) 
CWRITE 

Output message on-line: 

"REV NUMBER GREATER THAN 

720, INSERT CARD AND 

TRY AGAIN" 

Have SUMMARY 

or DETAIL cards NO 

been processed previously? 

Is II positive? 

YES 

SPACEUP 

Space up 

on-line 

printer 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 63 --SEOREffDCCP CCP 

EXTENDED card encountered 

NO 

( 

Have all 

entries on 

EXTENDED 

card been 

processed? 

NO 

ir 

Is rev no. 

greater than 

720? 

YES 

Set EXTENDED 

bit in 

EXTBITS array 

corresponding to 

current entry of 

EXTENDED card 

END card 

encountered 

CWRITE 

Output message: 

"NO SUMMARY OR DETAIL CARDS 

PROCESSED. 

PROGRAM CANNOT CONTINUE" 

SORT 

Sort the command 

table array by rev 

start numbers 

IP 

( RETURN 

Figure 3-5 Subroutine CCP Flow Diagram (continued) 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 65 -SEC-RETI-B3.7 SUBROUTINE CORV 

3.7.1 Purpose 

CORV computes the visibility of each target within a group 

taking into account that the weather of targets within the same group 

(and hence geographically close) is correlated to the extent specified 

by the input parameter, p. 

3.7.2 Usage 

3.7.2.1 Calling Sequence 

CORV (MAXTN) $ 

3.7.2.2 Inputs 

a. Calling sequence 

MAXTN The total number of targets within 

the current group 

b. Inputs via common locations 

Equation Symbol JOVIAL Symbol Description 

P PVIS Probability of visibility 

IGCC Intra-group correlation 

coefficient 

3.7.2.3 Outputs 

a. Calling sequence 

None 

b. Outputs through common locations 

CBERN 

VIV 
NRO APPROVED FOR 

REBt1444§deW-69 r

Page 66 

3.7.2.4 Working Working Storage Within Routine 

Equation Symbol JOVIAL Symbol Description 

K: KP e P (1-15) 

(2 P-- 1)2 

SQ \/ + 1 

P

c 

PC 1 + 1 / 1 

7 2 V 4K' +1 

P

1 PONE 

(P - ) 4K1+1 

PR 

p =P1 if C = 1 

p= 1-P1 if C= 0 

3.7.2.5 Error/Action Messages 

None 

3.7.2.6 Subroutines Called 

BERN Bernoulli random number generator 

SQRT System square root routine 

3.7.2.7 Called By Following Routine 

GETV 

3.7.3 Method 

The intra-group weather correlation model (see Section 2.5) 

assumes that the correlation between any two targets within a group 

is the same, with the amount of correlation given as input. The 

probabilities of visibility Pcand P1 are determined in CORV and the 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 67 

visibility of each target in the group is simulated as a function of 

these probabilities by a succession of calls to a Bernoulli random 

number generator. The computational equations for generating the 

probabilities P

c 

and P1 are shown as follows: 

K _ P P (1-P) 

(2 p - 1)2 

P

c 

P 1 

= 

= 

1 

1 

2 

(1+ 1 

+ (D 

1 

- - ) 

- 2 4K +11 

Figure 3-6 shows the computational flow of Subroutine CORV. 
(

Test for singular 

case when p = 0.5 YES 

PVIS = 0.5? 

NO 

Compute K' Set P_ and P 

P

c 

= 1/2 

= 1/2(1 + tiff') 

4 

BERN(P ) 

Bernoulli random 

number generator. 

Store number is CBERN 

(25 - 

Computeand P1

c 

1 

= 1/2(1 + AK, 1) 

= 1/2 + (5 1/2) 14K' + 1 

Initialize no. o 

targets within 

loop 

1=0 

NNAPPPIOVEDFOR 

REUggE410PNI-69 

Page 68 

CORV CORV 

(FRV(MAXIN,10) 

CBERN = 0? 

NO 

1 YES 

I P=P 

Figure 3-6 Subroutine CORV Flow Diagram 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 69 -SECRET/aCORV CORV 

I < MAXIN? 

YES 

NO 

RETURN 

BERN(p) 

Bernoulli random 

number generator 

store result into 

VIV array 

I=I+1 

Figure 3-6 Subroutine CORV Flow Diagram (Continued) 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 --SEC-REft11- Page 71 

3.8 SUBROUTINE DECIDE 

3.8.1 Purpose 

Subroutine DECIDE determines the "winning" target of a group 

(target within the group chosen for photography) according to the 

following decision strategy: 

• Simulate the vote (active, inactive, reject or unobserved) 

for each target in the group 

• Determine the magnitudes of the corresponding vote 

weights for each target in the group (vote weight refers 

to that weight associated with an active, inactive, 

reject, or unobserved vote) 

• Compare the magnitudes of all the vote weights and 

select that target corresponding to the largest vote 

weight as the "winner" 

In addition to applying the above decision strategy, DECIDE 

records the weights with and without interdiction, and the number of 

clear targets with and without interdiction, for the rev span summary 

output. 

3.8.2 Usage 

3.8.2.1 Calling sequence 

DECIDE $ 

3.8.2.2 Inputs 

a. Calling sequence inputs 

None 

b. Inputs via common locations 

AV 

GN 

IVO 

KON 

KOUT 

PRCONFL 

RA 
NRO APPROVED FOR 

I:Ufa-he-13 AgLOlarr 9 

Page 72 

RV 

TIDX 

TNMAX 

TVAP 

VDICT 

VTAB 

3.8.2.3 Output 

a. Calling sequence outputs 

None 

b. Outputs through common locations 

AVOT 

CLEART 

CNFLG 

CNFLT 

ITOPG 

ITOPT 

PRIM 

STAT 

VOTESA 

VOTESP 

WEIGHT 

WTOP 

3.82.4 Working Storage Within Routine 

JOVIAL 

Symbol Description 

DECFLG Flag, when true, indicates error message 

has previously been written 

ICOL Used to record simulated vote 

ICOL = 0 Active vote 

ICOL = 1 Inactive vote 

ICOL = 2 Reject vote 

ICOL = 3 Unobserved vote 

IDX Working target index within group 

INDEX Voting table of weights index 

TARIDX Rev specific target index of the first 

target in group 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 73 

3.8.2.5 Error/Action Messages 

IVO, a function card input parameter (see Reference 1), dictates 

the decision strategy to be applied for the selection of a "winning" 

target within a group. At the present time, only one strategy exists 

in TSPOOND. If IVO is input non-zero (indicative of an alternate 

decision strategy desired) the following error message is displayed 

on-line, and execution continues utilizing the selection strategy of 

DECIDE: 

"NO OTHER DECISION STRATEGY FOR IVO NQ 0" 

3.8.2.6 Subroutines Called 

CWRITE 

CHECKW 

System BCD output routines 

3.8.2.7 Called by Following Routines 

PROGRO Target group processor 

3.8.3 Method 

The decision algorithm, as explained in Section 3.8.1, is accomplished in DECIDE using the predetermined votes and corresponding 

vote weights of each target in the group. The active vote weights, 

WA, and inactive vote weights, WI, are extracted directly from the 

TWONDER rev table with the reject vote weights always stored as zeros. 

DECIDE computes the target specific unobserved vote weights, Wu, as 

follows: 

W

U = PV

[PA W

A 

+ (1-PA) WI

] 

where PV 

 is the probability of visibility and PA 

is the probability 

of activity. 

Figure 3-7 shows the computational flow of subroutine DECIDE. 

--SEC-RET-A- 
DECIDE 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 74 

DECIDE 

-SECRET-0- 

( DECIDE ) 

YES 

RETURN 

Figure 3-7 Subroutine DECIDE Flow Diagram 

CWRITE 

Output on-line and on-tape 

"NO OTHER DECISION STRATEGY 

FOR IVO NQ 0" 

Determine whether active, 

inactive, reject, or 

unobserved 

Store vote into ICOL(0,1,2,3) 

(

Decision strategy NO 

test 

IVO = 0 ? 

YES 

•

V 

Increment target indexes 

(rev specific and group specific) 

TARIDX = TARIDX + 1 

IDX = IDX + 1 

(

Have all targets within 

group been considered? 

NO 

IDX > TNMAX(GN) 

■1 

Initialize primary flag, conflict 

flag, target and group indexes. 

PRIM = 0 

IDX = 0 

CNFLG = 0 

TARIDX = TIDX - TNMAX 

Initialize "winning" target 

weight and index 

WTOP = -1 

ITOPG = - 
Store vote into 

AVOT(IDX) 

Tr 

Compute votes on 

primary or alternate 

Store in VOTESP, 

VOTESA 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 75 

DECIDE DECIDE 

(

‘ /

Test for type o 

target 

TVAP = 0 

(

Does current target conflict 

with previous selection? 

NO 

• 

Compute the index of 

voting table applicable to 

present target. Store in 

INDEX 

Compute the unobserved 

weight 

Wunob= PvEPAWA+(1-PA)WIl 

Increment weight w/o interdiction 

WEIGHT(1)= WEIGHT(1)+VTAB(INDEX) 

YES 

Figure 3-7 Subroutine DECIDE Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY2015 

BIF-4-B30001-69 

Page 76 

DECIDE DECIDE 

(

Is vote weight for current 

target the largest in group? 

Select primary if vote 

NO weight is identical 

VTAB(INDEX)=WTOP 

1YES 

Is present 

target primary? 

TVAP=1? 

YES 

• 

Store new maximum 

weight and target indexes 

WTOP=VTRB(INDEX) 

ITOPT=TARIDX 

ITOPG=IDX 

YES 

VTAB(INDEX) > WTOP 

irNO 

NO 

Figure 3-7 Subroutine DECIDE Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 77 

3.9 SUBROUTINE DUMPLOC 

3.9.1 Purpose 

Utilizing the system dump routine, DUMPL, DUMPLOC displays 

on-line the contents of requested areas of core in a floating point 

decimal format with a console scoop. The area of core to be displayed 

is a variable specified by inputs to DUMPLOC. 

3.9.2 Usage 

3.9.2.1 Calling Sequence 

DUMPLOC (START, STOP) $ 

3.9.2.2 Input 

a. Calling sequence 

Program 

Symbol Description 

START 

STOP 

Beginning address of requested dump 

Ending address of requested dump 

b. Input through common locations 

None 

3.9.2.3 Output 

None 

3.9.2.4 Working Symbols 

None 

3.9.2.5 Error/Action Messages 

None 

3.9.2.6 Subroutines Called 

System subroutine DUMPL 

SECRET/D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 78 

3.9.2.7 Called By 

None 

3.9.3 Method 

At present, no references to DUMPLOC are made by the TSPOOND 

environment, although the routine was used extensively during program 

checkout. However, as a debug tool for any future modifications to 

TSPOOND, DUMPLOC may prove useful. By inserting the DUMPLOC calling 

sequence at any point in the program and by depressing jump switch 3 

during execution, core contents beginning at START and ending at 

STOP will be displayed on-line whenever program execution encounters 

the DUMPLOC instruction. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 79 

3.10 SUBROUTINE EJECTPG 

3.10.1 Purpose 

Upon each reference to EJECTPG, a page eject carriage control 

character is written on the Monte Carlo specific output tape (KOL). 

3.10.2 Usage 

3.10.2.1 Calling Sequence 

EJECTPG $ 

3.10.2.2 Input 

a. Calling sequence 

None 

b. Input through common locations 

BLNK 

KOL 

3.10.2.3 Output 

None 

3.10.2.4 Working Symbols 

None 

3.10.2.5 Error/Action Messages 

None 

3.10.2.6 Subroutines Called 

System subroutines: OUTERR 

OUTPUT 

3.10.2.7 Called By 

MCDRIV 

SPANOUT 

SPECOL 
NRO APPROVED FOR 

RELEASE 1 JULY20 a Bite -4430001-69 

Page 80 

3.10.3 Method 

The formatted Monte Carlo specific output is displayed at 

approximately 40 targets per page of output. EJECTPG provides a 

convenient means of beginning a new page of output at each request. 

ti 

SECRET/ D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 81 

3.11 SUBROUTINE FUNCDRD 

3.11.1 Purpose 

FUNCDRD extracts the values of the TSPOOND function card input 

parameters from the system buffer area and stores these values in their 

corresponding working cells within TSPOOND. The TSPOOND function card 

image is then written on the output tapes KSPOUT, KOUT, and KOL by 

FUNCDRD. 

3.11.2 Usage 

3.11.2.1 Calling Sequence 

a. Calling sequence 

None 

b. Input through common locations 

VEHNO 

c. Input through system locations 

System 

Symbols 

IMAGE 

LOCPAR 

PAR 

Description 

The start address of the buffer which 

contains the converted image of the 

TSPOOND function card 

The cell which contains the start 

address of the parameters on the 

TSPOOND function card 

The cell which contains the total number 

of parameters read from the TSPOOND 

function card 

3.11.2.3 Output 

a. Calling sequence 

None 

b. Output through common locations 

KOL 

KOUT 

KSPOUT 
NRO APPROVED FOR 

RELEASE 1 JULY ()15 BIF-4-B30001-69 

Page 82 

3.11.2.4 Working Symbols 

None 

3.11.2.5 Error/Action Messages 

None 

3.11.2.6 Subroutines Called 

System subroutines: CHECKW, CWRITE 

3.11.2.7 Called By 

MCDRIV 

3.11.3 Method 

See Figure 3-8 for FUNCDRD flow logic. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4—B30001-69 

Page 83 

FUNCDRD FUNCDRD 

FUNCDRD 

Pick up the converted image 

of the TSPOOND function card; 

and store the values of the 

parameters into TSPOOND working 

storage 

Write the converted image of the 

TSPOOND function card onto tapes 

KOL, KOUT, and KSPOUT 

( RETURN ) 

Figure 3-8 Subroutine FUNCDRD Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 

( CWRITE 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 85 

3.12 SUBROUTINE GETDT 

3.12.1 Purpose 

Subroutine GETDT determines the actual scope dwell time as a 

function of the recommended scope dwell time for each target. The 

planned scope slew and settle time is summed with this actual dwell 

time to determine the time interval, DT, between the previous target's 

scope off time and the current target's scope off time. 

3.12.2 Usage 

3.12.2.1 Calling Sequence 

GETDT $ 

3.12.2.2 Inputs 

a. Calling sequence 

None 

b. Inputs via common locations 

Equation Symbol JOVIAL Symbol 

x

1

/x2 RR1 

x3/x2 RR2 

Q1 RATIO1 

Q2 RATIO2 

SCOF 

SNN 

t

(i) 

on TAON 

TIDX 

TNN 

t

on 

(i-1) 

TNP 

otR TTDWELL 

VV 

x

2 XX2 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 86 

3.12.2.3 Outputs 

a. Calling Calling Sequence 

None 

b. Outputs through common locations 

Math Symbol JOVIAL Symbol 

(St ASDT 

SST + ot DT 

3.12.2.4 Working Storage Within Routine 

Math Symbol JOVIAL Symbol Description 

r

1 

R1 That number which, when multiplied by Q, will give the 

smallest dwell time within the 

triangular density function 

r

2 R2 That number which, when multiplied by Q, will give the 

largest dwell time within the 

triangular density function 

Q QQ The most probable dwell time 

within the given triangular 

density function 

SST SST Scope slew and settle time (sec) 

3.12.2.5 Error/Action Messages 

None 

3.12.2.6 Subroutines Called 

TRI Computes the random variable representing dwell 

time, with the triangular density function as 

specified by input 

3.12.2.7 Called by Following Routine 

PROTAR Target processor 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 87 -SEC-RWB3.12.3 Method 

The TSPOOND acquisition scope simulation is explained in detail 

in Section 2.4 of this document. The actual scope dwell time and the 

time increment between target scope off times computed by GETDT along 

with the planned scope slew and settle times determine directly the 

actual target specific scope on and off times. Figure 3-9 shows 

the computational flow of GETDT. 
wiN"mml°( Check for target 

NO visibility YES 

V 

VV = 1 

Set cloudy triangular 

density parameters 

QQ = XX2 

R1 = RR1 

R2 = RR2 

Set clear triangular 

density parameters 

QQ = TTDWELL(TIDX) 

R1 = RATIO1 

R2 = RATIO2 

Set scope on flag Is present 

and current slew NO scope on? 

and settle time 41 

SCOF = 1 SCOF = 1? 

SST = 

YES 

Compute current slew and settle time 

SST = t

on

(i) - [t(i-1) + dt0-1)] 

on 

where i refers to the current 

target viewed by a particular scope, 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 88 

GETDT GETDT 

GETDT 

TRI(QQ,R1,R2) 

Compute random variable representing 

dwell time with the triangular density 

function determined by QQ, R1, R2. 

Store in ASDT 

Store time increment between 

successive target scope off times 

DT = SST + ASDT 

RETURN 

Figure 3-9 Subroutine GETDT Flow Diagram 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 89 

3.13 SUBROUTINE GETFDET 

3.13.1 Purpose 

GETFDET is a function used to determine the value of a requested 

bit in a given array. 

3.13.2 Usage 

3.13.2.1 Calling Sequence 

GETFDET (RNO, BITS) $ 

3.13.2.2 Input 

a. Calling sequence 

Program 

Symbol Description 

BITS The address of an integer array within 

which bits have been preset 

RNO The sequential number of the requested 

bit 

b. Inputs through common locations 

None 

3.13.2.3 Output 

a. Calling sequence 

Program 

Symbol Description 

GETFDET An integer word that contains either 

a zero or a one depending upon how 

the requested bit was set 

b. Outputs through common locations 

None 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 90 --SEC-RET19- 

3.13.2.4 Working Symbols 

Program 

Symbols 

13ITNO 

LL 

Description 

An integer between 0 and 47 computed from 

the input number RNO 

An integer corresponding to the word number 

within the input array BITS that contains 

the requested bit to be investigated 

3.13.2.5 Error/Action Messages 

None 

3.13.2.6 Subroutines Called 

None 

3.13.2.7 Called By 

MCDRIV 

PROBIT 

3.13.3 Method 

Compute the word number within the array, BITS, containing the 

requested bit to be investigated: 

LL = (RNO - 1)/48 

The bit number of BITS(LL) is determined directly 

BITNO (RNO - 1) - LL(48) 

Using the BIT modifier, the value of the requested bit becomes 

GETFDET = BIT(BITNO)(BITS(LL)) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 SECRET/ D Page 91 

3.14 SUBROUTINE GETV 

3.14.1 Purpose 

Based upon the input parameter flag, IPVIS, GETV determines the 

probability of visibility of each target processed, considering both 

intra-group visibility correlation (the correlation between the 

visibility of targets within the same group), and inter-group 

visibility correlation (the correlation between the visibility of targets 

in adjacent groups). GETV then simulates the specific target visibility 

as a function of the probability of visibility using a Bernoulli random 

number generator. 

3.14.2 Usage 

3.14.2.1 Calling Sequence 

GETV % 

3.14.2.2 Inputs 

a. Calling sequence 

None 

b. Inputs via common locations 

BLNK 

GN 

IPVIS 

KON 

KOUT 

PROBV 

PVINP 

TBAPR 

TDECIS 

TIDX 

TN 

TNMAX 

TNN 

VIV 

IfeREV-9- 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 92 4KREVI1 

3.14.2.3 Outputs 

a. Calling sequence 

None 

b. Outputs through common locations 

BUFOUT 

GDT1 

PVIS 

PVIS1 

VV 

3.14.2.4 Working Storage Within Routine 

None 

3.14.2.5 Error/Action Messages 

IPVIS is a TSPOOND function card input parameter taking on the 

range of values 0 < IPVIS < 4. If IPVIS falls outside of this range, 

the following error message is output both on-line and off-line and 

execution is halted: 

"IPVIS INCORRECTLY INPUT. PUSH GO TO USE FILE 8 CORRELATED" 

Upon depressing the GO button, execution continues in subroutine 

GETV using the intra-group visibility correlation model with the 

probability of visibility taken from reset File 8. 

3.14.2.6 Subroutines Called 

INTER 

CORV 

3.14.2.7 Called by Following Routine 

PROTAR 

3.14.3 Method 

The inter-group weather correlation model is simulated in 

subroutine INTER with the intra-group weather correlation, assuming 

that the correlation between any two targets is the same, being 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 93 -1-E.REVDmodeled in subroutine CORV. Sections 2.5 and 2.6 present a thorough 

discussion of the two mathematical models. Both of these routines 

are referenced by GETV during the course of determining each target's 

visibility. See Figure 3-10 for the GETV detailed flow diagram. 
\:"..... 

Test visibility input 

option flag 

IPVIS=0 or IPVIS 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 94 

GETV 

GETV 

GETV 

YES NO 

Set probability of 

visibility to reset File 8 value 

IPVIS = 1 IPVIS = 2 or 4 

PVIS = PROBV 

Set prob. of visibility 

to target specific 

value from TWONDER 

PVIS = TBAPR($TIDX$) 

4 

Set prob. of visibility 

to function card input 

value 

PVIS = PVINP 

Is first group of targets 

being processed? 

GN = 1 

4 ir 

INTER Intra-group 

Correlated or 

Independent? 

Compute the probability 

of visibility as a 

function of inter-group 

weather correlation IPVIS > 2? No, 

Yes, Correlated 

Independent 1 

BERN 

Bernoulli random 

number generator. 

Computes visibility 

of target, VV. 

Figure 3-10 Subroutine GETV Flow Diagram 
BIF-4-B30001-69 

Page 95 

GETV GETV 

RETURN 

Store parameters for 

inter-group 

correlation model 

PVIS1 = PVIS 

GDT1 = TDECIS($TIDX$) 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

r 

Figure 3-10 Subroutine GETV Flow Diagram (Continued) 

(REVERSE OF THIS PAGE LEFT BLANK) 

Store current target 

visibility flag 

VV = V1V($TNN$) 

CORV 

Computes visibility of 

all targets within group 

considering intra-group 

weather correlation 

V 

Store parameters for 

inter-group weather 

correlation model 

PVIS1 = PVIS 

GDT1 = TDECIS($TIDX$) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 97 

3.15 SUBROUTINE GROUT 

3.15.1 Purpose 

GROUT is used to set up the output buffer (BUFOUT) for writing 

the typical sample expanded detailed output. This subroutine is 

executed once for each target processed. 

3.15.2 Usage 

3.15.2.1 Calling Sequence 

GROUT $ 

3.15.2.2 Input 

a. Calling sequence 

None 

b. Input through common locations 

Program 

Symbol Units 

AA n.a. 

ASDT sec 

AV n.d. 

AVOT n.d. 

BLNK n.d. 

CNFLT n.d. 

GN n.d. 

ITOPG n.d. 

PROL n.d. 

RA n.d. 

RV n.d. 

STOF sec 

STON sec 

TALT ft x 10-2 

TAON sec 

TASSNO n.d. 

TATSMO2 sec 

TAWGT n.d. 

TBAB13 sec 

TBACD n.d. 

TBACH rad 

TBAHT naut mi 
NRO APPROVED FOR 

RELEASE 1 ii1C2VB30001-69 

Page 98 

Program 

Symbol 

TBAMS 

TBAPR 

TBARV 

TBASA 

TBASR 

TBAVF 

TBAVY 

TBA16 

TBA23 

TBENCHF 

TDDD 

TDECIS 

TDWELL 

TEEE 

TFLICT 

TGRNO 

TIDA 

TIDB 

TIDX 

TLAT 

TLONG 

TMATSF 

TMODE 

TMP F 

TMSIG 

TNASSTE 

TNBITE 

TNMAX 

TNMOSTE 

TNSF 

TOMEGA1 

TOMEGA2 

TOMEGA3 

TPRIA 

TP RI I 

TPROBA 

TREV 

TRR 

TSC 

TSCC 

TSHAPE 

TSIGMAD 

TSMODE 

TTDWELL 

TTIME 

Units 

n.d. 

percent 

n.d. 

rad 

naut mi 

in/sec 

n.d. 

rad 

deg 

n.d. 

ft x 10 

sec 

sec 

rad 

n.d. 

n.d. 

n.d. 

n.d. 

n.d. 

rad 

rad 

n.d. 

n.d. 

n.d. 

deg 

n.d. 

n.d. 

n.d. 

n.d. 

n.d. 

rad 

rad 

rad 

n.d. 

n.d. 

percent 

n.d. 

in. 

n.d. 

n.d. 

n.d. 

deg 

n.d. 

sec 

min 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 99 

Program 

Symbol Units 

TTLV n.d. 

TTOFF sec 

TTON sec 

TT1 sec 

TT2 sec 

TT3 sec 

TVAP n.d. 

TVELI ft/sec 

TVIF n.d. 

TWA n.d. 

TWEIGHT n.d. 

TWI n.d. 

TWX n.d. 

3.15.2.3 Output 

a. Calling sequence 

None 

b. Output through common locations 

BUFOUT 

LINECNT 

MCBUF 

PRCNTRL 

3.15.2.4 Working Symbols 

Program 

Symbols 

HTEMP 

II 

INTR 

Description 

A one word hollerith buffer 

An integer counter for the number of targets 

processed in each group 

An integer buffer for the conflict matrix 

NN An integer set equal to the maximum number of 

targets in each group 

TX The target index used for printing 

WBIT A seven word floating point array used as a 

buffer for conversion of data to a BCD format 
NRO APPROVED FOR 

RELEASE 1 „IDLY 2019 

BIF-4-B30001-69 

Page 100 

Description 

The present group number 

The number of the target within the group 

that was selected for photography 

Program 

Symbols 

WGN 

WITOPG 

3.15.2.5 Error/Action Messages 

None 

3.15.2.6 Subroutines Called 

PRINTOUT 

SPECOL 

3.15.2.6.1 System Subroutines 

CHECKW 

CWRITE 

OCTBCD 

3.15.2.7 Called By 

PROREV 

3.15.3 Method 

See Figure 3-11 for the flow logic. 

3.15.4 Restrictions 

None 

3.15.5 References 

None 
Is the print control flag 

(PROL) negative? 

I

N° 

NO Has the output data been 

written from each target 

in the group? 

YES 

(I CWRITE 

Write on tape KOL the 

special Monte Carlo 

information 

V 

Set the special Monte Carlo 

print flag PRCNTRL = 0 

V 

Load the buffer (BUFOUT) in preparation 

for writing BCD information (target specific) 

PRINTOUT 

Write out the six lines of BCD information 

onto tapes KSPOUT and KOL 

Load the buffer (MCBUF) 

in preparation to write 

the special Monte Carlo 

information 

YES 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 101 -SfelEffElGROUT 

( GROUT 

GROUT 

the print control flag (PROL) negative? 

1 YES 

Set the special Monte Carlo print flag PRCNTRL = ii 

SPECOL 

Write headers on tape KOL for 

special Monte Carlo output 

C RETURN ) 

Figure 3-11 Subroutine GROUT Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 103 -SEC-RH& 

3.16 SUBROUTINE INCRS 

3.16.1 Purpose 

After processing all requested samples on each rev, INCRS is 

referenced to accumulate totals on five rev span summary output 

parameters. The following parameters are accumulated: 

• Number of groups in rev span 

• Number of targets in rev span 

• Number of primary targets in rev span 

• Number of alternate targets in rev span 

• Number of visual intelligence targets in rev span 

3.16.2 Usage 

3.16.2.1 Calling Sequence 

INCRS $ 

3.16.2.2 Input 

a. Calling sequence 

None 

b. Inputs through common locations 

GNMAX 

TNBITE 

TVAP 

3.16.2.3 Output 

a. Calling sequence 

None 

b. Outputs through common locations 

NALTN 

NGPRS 

NPRIM 

NTPRS 

NVIT 

SECRET/D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 104 4EN.EVD-- 

3.16.2.4 Working Symbols 

None 

3.16.2.5 Error/Action Messages 

None 

3.16.2.6 Subroutines Called 

None 

3.16.2.7 Called By 

MCDRIV 

3.16.3 Method 

Figure 3-12 shows the flow logic for INCRS. 
INCRS 

Increment the number of targets 

and groups per rev span 

V 

VISUAL 

INTELLIGENCE Test each target in this rev to ALTERNATE 

determine the type of target 

Increment the 

total number 

of VIT's 

PRIMARY 

Increment the 

total number 

of primaries 

V 

Increment the 

total number 

of alternates 

V 

0 Has every target in this rev 

been checked for its type? 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 105 

INCRS INCRS 

YES 

( RETURN ) 

Figure 3-12 Subroutine INCRS Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 -SEGRE-TtB- Page 107 

3.17 SUBROUTINE INTER 

3.17.1 Purpose 

Subroutine INTER computes the probability of visibility for each 

group of targets considering the correlation between the visibility of 

targets in adjacent groups. The amount of correlation is determined as 

a function of the time interval between their group decision times where 

both groups are ordered chronologically. 

3.17.2 Usage 

3.17.2.1 Calling Sequence 

INTER $ 

3.17.2.2 Inputs 

a. Calling sequence 

None 

b. Inputs via common locations 

CBERN 

GDT1 

IPVIS 

PVIS1 

TDECIS 

TIDX 

TMAX 

TN 

3.17.2.3 Outputs 

a. Calling sequence 

None 

b. Outputs through common locations 

PVIS 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 108 --SECREW-B3.17.2.4 Working Storage Within Routine 

Math Symbol JOVIAL Symbol Description Units 

BETA Intermediate quantity used 

in computation of PM 

Amax 

AMAX The maximum value of 

correlation between current 

group and previous group 

PV(1) PRPVIS Previous group's probability 

of visibility 

GDT(1) PRDECIS Previous group's group sec 

decision time 

AT DGDT Time interval between current 

group's group decision time 

and previous group's group 

decision time sec 

p* PSTR Final correlation coefficient 

computed as a function of AT 

and TMAX, the maximum time 

within which inter-group 

weather correlation is 

considered 

x

1 

PRBERN 

XONE 

Bernoulli variable visibility 

flag from first target of 

previous group 

Value of visibility Bernoulli 

variable (with or without 

intra-group correlation considered whichever the case 

may be) 

Q QOQ Intermediate quantity used in 

the computations 

0 = P*

v

(1)(1-P

v

(1))P

v

(2)(1-P

v

(2)) 

3.17.2.5 Error/Action Messages 

None 

SECRET/ D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 -SEC-REVB- Page 109 

3.17.2.6 Subroutines Called 

BERN Bernoulli random number generator 

SQRT System square root routine 

3.17.2.7 Called By Following Routine 

GETV 

3.17.3 Method 

The inter-group weather correlation model (see Section 2.6) 

assumes that visibility for the present group of targets is dependent 

only upon the visibility of the previous group of targets. The 

amount of correlation is a function of both the time interval between 

their group decision times and the time, tmax, at which the inter-group 

correlation coefficient becomes 0. INTER computes the probability of 

visibility as a function of the weather correlation coefficient for 

every sample of each group (except the first group of the rev). 

= 

p 

 V r 

(1)(1_ (2)) 

, V 

P 

(2)(1-P (1)) 

V V 

where PV

(1) is the probability of visibility of the previous group's 

first target, and P (2) is the probability of visibility of the current 

V 

group's first target. The maximum value of correlation between both 

groups is 

Amax 

= min {a 1

B 4 

The correlation coefficient is then computed as 

P* - 

t

max 

 - AT 

t Amax 

max 

SECRET/0 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 110 

where AT AT is the time interval between group decision times. A quantity 

Q is computed, 

V(1) V

(1) 

Q = p

* 

P (1-P ) Pv

(2) (1-Pv

(2)) 

If the first target in the previous group was not visible, the 

probability of visibility, PV(2) becomes 

'(2) (2) ( 0 

PV = PV 

(1) 

1- PV 

and in the case where the previous group's first target is visible 

'(2) (2) 

( 

= PV (1) 

PV 

The functional flow diagram of INTER is shown as Figure 3-13. 
NOI 

Compute specified 

correlation, 0 

(1) (2) 

pv(1-pv) 

p(2)(1 _111)) 

v 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 111 --SEGREVEIINTER INTER 

( INTER 

( 1st target of group? 

TN=1? 

YES 

Store group working cells. 

PRPVIS = PVIS1 

PRDECIS = GDT1 

PRBERN = CBERN 

NO 

Is either group's 

probability of YES 

visibility equal to 0? 

PRPVIS * PVIS = 0? 

NO 

• 

Is either group's probability of visibility YES 

equal to 1.? 

PRPVIS or PVIS = 1.? 

NOI 

Is time interval between 

group decision times larger 

than maximum allowable? YES 

Is (TDECIS($TIDX$)-GDT1) 

> TMAX? 

1r 

( RETURN ) 

Figure 3-13 Subroutine INTER Flow Diagram 
(

Is previous group 

visible? 

j

rNO 

Compute new prob. 

of visibility 

(48(2) 

P v = P v ( l _ pv 

Compute new prob. o 

visibility 

(2)1 (2) 

Pv = Pv 

YES 

XONE # 0? 

I 

ir 

( RETURN ) 

Intermediate Intermediate calculation 

for prob. of visibility 

change factor. 

(1) (1) (2) (2) 

= P (1-pv)pv(1-pv) 

Compute maximum correlation 

Amax 

= min0, s) 

Compute correlation as a 

function of AT, tmax' 

and A max 

P* = ( 

t ax 

max 

- 

/p

max, 

max 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 112 --SEGRETAINTER INTER 

Figure 3-13 Subroutine INTER Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 -SEDREff8- BIF-4-B30001-69 

Page 113 

3.18 SUBROUTINE MCDRIV 

3.18.1 Purpose 

MCDRIV is the main driver for the logic associated with the execution of a given TSPOOND run. Its main function is to control the 

order of execution necessary to accomplish the following subfunctions 

of TSPOOND: 

• Initialization of logical tape units and 

other buffer storage areas. 

• Processing of function card and command 

data card input information. 

• Processing and transfer to KSPOUT of all 

TSPOOND pertinent information from first 

two files of the TWONDER BIT: 

a) ID records 

b) Ephemeris information 

c) Reset files 7 and 8. 

• Control logic associated with processing of 

rev span summaries and typical sample detail 

output requests on a single rev or rev span 

basis. 

• Computation of extended statistics on requested 

rev span summary output parameters. 

3.18.2 Usage 

3.18.2.1 Calling Sequence 

MCDRIV $ 

3.18.2.2 Input 

a. Calling sequence inputs 

None 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 114 --SECREfa 

b. Inputs via common locations 

Program Symbol Units 

BLNK 

DBITS 

EXTBITS 

IRN 

NCOM 

NULLREV 

PFAL 0 < PFAL < 1 

PREC 0 < PREC < 1 

PROBFA 0 < PROBFA < 1 

PROBREC 0 < PROBREC < 1 

PROL 

TFSUM 

TREN 

TRST 

TTONS 

XX1 sec 

XX2 sec 

XX3 sec 

3.18.2.3 Output 

a. Calling sequence outputs 

None 

b. Outputs via common locations 

Program Symbol Units 

ALTERN 

BUFOUT 

CLEART 

DECEPT 

FDET 

FSUM 

ICOM 

KBIT 

KIN 

KOL 

KON 

KOUT 

KSPOUT 

KSPTFG 

LINECNT 

NALTN 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 115 

Program Symbol Units 

NCNFLT 

NGPRS 

NPRIM 

NS 

NTPRS 

NVIT 

PFALM 

PRCNTRL 

PRCONFL 

PRECOG 

PRIMRY 

REN 

RN 

RR1 

RR2 

SIGMA 

SMAX 

SMIN 

STAT 

STATS 

TIDX 

TONS 

VOTESA 

VOTESP 

WEIGHT 

WEN 

8.18.2.4 Working Storage Within Routine 

Name Description 

AA Loop variable on extended statistics 

bits. 0 < AA < 29 

CSTTWO Constant integer 2 

DETFLG Detailed statistics flag 

0 - not desired on current rev 

1 - desired on current rev 

HOL1 - HOL15 

MAX 

MEAN 

Array containing descriptions 

associated with extended statistic 

output variables 

Maximum value of current extended 

statistics output variable 

Mean value of current extended 

statistics output variable 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 116 

MIN Minimum value of current extended 

statistics output variable 

NSAMP Number of samples taken on current 

rev span 

SIG Standard deviation of current 

extended statistics output variable 

3.18.2.5 Error/Action Messages 

None 

3.18.2.6 Subroutines Called 

CCP Command card processor routine 

CHECKW Output check-write routine 

EJECTPG Write page eject carriage control on 

output tape KOL 

FUNCDRD Processes function card parameters 

GETFDET Determines whether typical sample detail 

information has been requested for current 

rev 

INCRS Increments and sums rev span summary 

information 

OCTBCD Converts on octal number to a BCD 

format 

PRINTOUT Generalized BCD tape output routine 

PROBIT Processes the first two files from the 

TWONDER BIT 

PROREV Reads BIT for current rev selection 

information; processes all groups 

within rev and produces typical sample 

detail output for each group 

REWIND Initiates rewind of specified TO device 

SPANOUT Outputs rev span summary information 

SQRT System square root routine 

WEOF Writes end-of-file on specified IO 

device 

3.18.2.7 Called By Following Routines 

TSPOOND (main program) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 SECRET/D BIF-4-B30001-69 

Page 117 

3.18.3 Method 

MCDRIV is primarily concerned with sequencing and controlling 

the subroutines for a TSPOOND run. Figure 3-14 is a flow chart 

which illustrates the execution order of MCDRIV. As shown on the 

flow diagram, the number of samples are completed on a rev by rev 

basis rather than on a rev-span by rev-span basis. This was necessitated by core size limitations which allowed only a rev's worth of 

data to reside in core at any one time. 
NRO APPROVED FOR 

RELEASE1JULY:=5 brt.- 4-1330001-69 

Page 118 --SECRET-aMCDRIV MCDRIV 

MCDRIV 

1 

Set up logical unit 

assignments 

KIN, KON, KOL, KBIT 

KSPOUT, KOUT 

EJECTPG 

Place page eject carriage 

control character on 

output tape, KOL 

FUNCDRD 

Process function card 

parameters 

Store working variables 

WRN, RR1, RR2, PRECOG, PFALM 

CCP 

Command card processor. Reads all 

command cards, sets up command rev 

table, primes detail statistics bits 

Figure 3-14 Subroutine MCDRIV Flow Diagram 
PROBIT 

Processes 1st 2 files of TWONDER BIT. 

Checks rev span compatibility; 

stores files 7 & 8 pertinent items, 

reformats and transfers all 

information to KSPOUT, KOL, KOUT 

Initialize rev span summary cells, 

and set up current command table 

requests; RN, REN, TONS 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 SECRET/D BIF-4-B30001-69 

Page 119 

MCDRIV 

MCDRIV 

Initialize number of samples 

NS = 0 

Initialize extended statistics 

arrays; SMAX, SMIN, SIGMA, STATS 

GETFDET 

Given the current rev number, 

GETFDET determines whether 

typical sample detail information 

is requested for this rev (sets up 

FDET) 

Figure 3-14 Subroutine MCDRIV Flow Diagram (Continued) 

SECRET/D 
NROAPPROVEVEKW4-B30001-69 

RELEASE 1 JUIFY*45 120 --SEC-REVDMCDRIV 

NS=NS+1 

PRCONFL = 

PROREV 

Reads BIT for current 

rev selection information. 

Process all groups within 

rev; produce typical sample 

detail output for each group 

YES NULLREV? 

NO 

Compute running 

extended statistics 

STATS, SIGMA, SMAX, 

SMIN 

MCDRIV 

"REV NO. XX3 

" 

samplessatisfied? 

A NULL REV NS TONS 

Is number of 

YES 

INCRS 

Sum rev span 

information 

Iv 

PRINTOUT NO 

YES DETAIL FLAG 

SET? 

FDET = 1? 

Write end 

of file 

on KSPOUT 

Figure 3-14 Subroutine MCDRIV Flow Diagram (Continued) 
NULLREV? 

NO ) YES 

PRINTOUT 

Output 

extended statistics 

( 

Have all entries in 

command table been 

processed? 

ICOM > NCOM ? 

-SE C-RETI-B-- 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

MCDRIV 

Rev span complete? 

RN > REN? 

NO )YES 

1 

) 

1 YES 

( RETURN ) 

Figure 3-14 Subroutine MCDRIV Flow Diagram (Continued) 

(REVERSE OF THIS PAGE LEFT BLANK) 

BIF-4-B30001-69 

Page 121 

MCDRIV 

Compute standard deviation,SIG 

as part of extended statistics 

Ir 

SPANOUT 

Output rev span 

summary 

information 

Increment command 

table index 

ICOM = ICOM+1 

V 

Increment rev 

counter 

RN = RN+1 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 123 

3.19 SUBROUTINE PRINTOUT 

3.19.1 Purpose 

PRINTOUT is used to write requested output on the magnetic 

tapes KSPOUT, KOL, and KOUT in a BCD format of fifteen words per record. 

3.19.2 Usage 

3.19.2.1 Calling Sequence 

GOTO PRINTOUT $ 

3.19.2.2 Input 

a. Calling sequence 

None 

b. Input through common locations 

BUFOUT 

KSPTFG 

PRCNTRL 

PROL 

EOF 

LPIL 

3.19.2.3 Output 

a. Calling sequence 

None 

b. Output through common locations 

KOL 

KOUT 

KSPOUT 

3.19.2.4 Working Symbols 

None 

3.19.2.5 Error/Action Messages 

None 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 124 --SECIErfa3.19.2.6 Subroutines Called 

TAPERR2 

CHECKW 

CWRITE 

3.19.2.7 Called By 

BITRE 

GROUT 

MCDRIV 

PROBIT 

PROREV 

SPANOUT 

3.19.3 Method 

By interrogating input flags, PRINTOUT distinguishes which of 

the output tapes (KSPOUT, KOL, KOUT) should be written with the information contained in the (BUFOUT) 15 word BCD buffer. In general, the 

Monte Carlo specific output is written on tape KOL, the detailed 

typical sample output is written on tape KSPOUT, and the rev span 

summary information along with the Monte Carlo output is written on 

tape KOUT. Reference 1 contains detailed descriptions of information 

and format of output written on each of these tapes. 

See Figure 3-15 for the PRINTOUT flow logic. 

3.19.4 Restrictions 

None 

3.19.5 References 

None 
Is the KOL tape YES print flag (PROL) 

positive? 

NO 

Is the Monte YES 

Carlo print flag 

(PRCNTRO non zer 

(

Write a 15 word 

record from BUFOUT 

onto tape KOL 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 125 

PRINTOUT PRINTOUT 

( PRINTOUT ) 

1 

YES Is the KSPOUT NO 

tape print flag 

(KSPTFG) zero? 

(

CWRITE 

Write a 15 word record 

from the output buffer 

BUFOUT onto tapes 

KSPOUT and KOUT 

• 

(iI

CWRITE 

Write a 15 word record 

from BUFOUT onto tape 

KOUT 

$ 

( RETURN ) 

Figure 3-15 Subroutine PRINTOUT Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 127 

3.20 SUBROUTINE PROBIT 

3.20.1 Purpose 

PROBIT converts the binary information contained on the first two 

files of the TWONDER BIT to a BCD format and transfers this information 

onto the KSPOUT, KOUT, and KOL magnetic output tapes. Auxiliary 

functions of PROBIT are to check for TWONDER and TSPOOND compatibility 

in vehicle number and rev span. 

3.20.2 Usage 

3.20.2.1 Calling Sequence 

PROBIT $ 

3.20.2.2 Input 

a. Calling sequence 

None 

b. Inputs through common locations 

BLNK 

BTBF 

BUFOUT 

F78IT 

INPUT 

INTBUF 

IPVIS 

KBIT 

KON 

KOUT 

KSPOUT 

KSPTFG 

NCOM 

PVINP 

TREN 

TRST 

VEHNO 

3.20.2.3 Output 

a. Calling sequence 

None 
NRO APPROVED FOR 

RELEASE 1 JULY 29115_ BIF-4-B30001-69 

Page 128 

b. Outputs through common locations 

PROBA 

PROBFA 

PROBREC 

PROBV 

PV 

3.20.2.4 Working Symbols 

Program 

Symbol Description 

BGN An integer working cell 

BGN2 An integer counter 

COUNT An integer counter 

DWDS The number of words output parameter in 

the calling sequence of the system subroutine CHECKN 

EOF The end of file output parameter in the 

calling sequence of the system subroutine 

CHECKN 

JJ The sequential number of the requested bit 

in the calling sequence of GETFDET 

KK A processing pointer for the byte number 

within BUFOUT 

LL An intermediate processing pointer 

LPIL An output parameter in the calling sequence 

of the system subroutine CHECKN 

NDN An integer working cell 

NDN2 A counter for the number of lines 

printed 

SAVE A Hollerith working cell 

3.20.2.5 Error/Action Messages 

The following error and or action messages may be output by the 

procedure PROBIT: 

MESSAGE RECOVERY PROCEDURE 

SYSTEM FOUND ERROR ON An unexpected error was encountered 

LAST READ ON UNIT XX during a read operation on the BIT. 

PUSH START, TRY AGAIN Push GO to continue. PROBIT will 

attempt to read the same record again 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 129 

TWONDER FUNCTION CARD 

NOT FOUND-HIT GO 

VEHICLE NO. NOT ON 

FUNCTION CARD-HIT GO 

BIT VEHICLE NO. TOO 

LARGE HIT-GO 

VEHICLE NO. IS XXX 

DOES NOT MATCH INPUT CARD, 

CORRECT, RESTART-OR HIT GO 

TO CONTINUE 

RECOVERY PROCEDURE 

An end of file was encountered on the 

first read operation of the BIT. 

Remount the proper tape and push GO. 

The requested rev span on the input 

data cards is outside the rev span 

range available on the BIT. Either 

the wrong BIT has been mounted or 

the data cards are incorrect. 

Correct and restart. 

The word TWONDER was not found on 

the function card while searching 

the image of the third record of 

the first file of the BIT. Push GO 

to ignore. 

The vehicle number was not found on 

the TWONDER function card image 

(third record of the first file of 

the BIT). Push GO to continue. 

While searching the image of the 

third record of the first file of 

the BIT, no blanks were found 

following the vehicle number. No 

vehicle number match up can be 

performed. Push GO to continue. 

The vehicle numbers on the TSPOOND 

and the TWONDER function cards do 

not match. If the correct BIT is 

mounted push GO to continue. 

Otherwise mount the proper BIT and 

restart. 

MESSAGE 

NO RECORDS ON 1ST FILERELOAD BIT - PUSH ON 

WRONG REV SPAN ON BIT 

OR INPUT CARD-RESTART 

AFTER CORRECTION 

3.20.2.6 Subroutines Called 

BUFSET 

GETFDET 

SETF78 

PRINTOUT 

SPACEUP 

TAPERR4 

BCDOCT 

CHECKN 

CHECKR 
NRO APPROVED FOR 

RELEASE 1 JUL2_01a BIF4-B30001-69 

Page 130 .4EEREitBCHECKW 

CREAD 

CWRITE 

OCTBCD 

READ 

REWIND 

WEOF 

3.20.2.7 Called By 

MCDRIV 

3.20.3 Method 

PROBIT reads the first two files of the BIT input tape record by 

record. As each record is read, the information thereon is converted 

to BCD and written onto the magnetic tapes KSPOUT, KOUT, and KOL. The 

rev span of the BIT is compared to the rev span on the input data 

cards to determine compatibility between TWONDER and TSPOOND. The 

vehicle number on the BIT is compared to the one on the TSPOOND input 

function card as another compatibility check. 

Four cells of core are loaded from the File 8 data on the 

BIT. These are PROBA (probability of activity), PROBFA (probability 

of false alarm), PROBREC (probability of recognition), and PROBV 

(probability that target is visible). PROBIT sets PV (probability 

of visibility) equal to PROBV from File 8 if the input parameter 

flag IPVIS is zero or three; otherwise it sets PV equal to the input 

parameter PVINP. 

PROBIT returns to MCDRIV with the BIT input tape positioned at 

the beginning of the third file. 

Figure 3-16 shows the flow logic for PROBIT. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 131 

PROBIT 

PROBIT 

PROBIT ) 

Initialize 

Rewind KBIT input tape 

Set the counter that is incremented with 

each record that is read 

Set the parameter used for reading the 

number of words per record from KBIT 

TAPERR4 

(

Is rev span from input cards 

contained within rev span on BIT? 

1YES 

Write on KOUT, KOL: 

CARD SPAN IS XXX TO XXX 

BIT SPAN IS XXX TO XXX 

NO 

Print a restart error 

message on line 

STOP 1 

Figure 3-16 Subroutine PROBIT Flow Diagram 
PRINTOUT 

Writes on tapes KSPOUT, KOL, 

KOUT in BCD each record read 

from BIT 

PRINTOUT 

Writes the 2 words EPHEMERIS 

INFORMATION on KSPOUT, KOUT, KOL 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4—B30001-69 

Page 132 --SEC-REVDPROBIT PROBIT 

V 

NO Has 3rd record of BIT (TWONDER 

function card image) been read 

in yet? 

V 

YES 

( 

Read consecutive records 

from 1st file on BIT 

LPIL 

TAPERR4 

YES Does vehicle number from TWONDER 

function card match vehicle number 

from input cards? 

Print error 

message on 

line 

STOP 14 

1 

EOF 

irNO 

V 

WEOF 

RSTOUT 

Figure 3-16 Subroutine PROBIT Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 -S-EC-REffil Page 133 

KSPOUT 

Convert binary records 

read from BIT to BCD 

for printing on output 

tapes 

PROBIT PROBIT 

EOF 

3rd 

1st 2nd 

TAPERR4 Read consecutive records 

from 2nd file on BIT 

Which record has been 

read in from 2nd File 

on BIT? 

RETURN ) 

Set line 

counter to 26 

Set line 

counter to 396 

PRINTOUT 

NO 

Test line counter 

Have all lines been 

written on output tapes? 

SpnaJ pc pue puz 

1st record 

YES 

Which record has been read 

in from 2nd file on BIT? 

PRINTOUT 

Writes the 2 words File 

SEVEN on output tapes 

KSPOUT, KOUT, KOL 

Figure 3-16 Subroutine PROBIT Flow Diagram (Continued) 
Set PROBA = value from File 8 

Set PROBFA = value from File 8 

Set PROBREC = value from File 8 

Set PROBV = value from File 8 

Set PV = PVINP 

NRO APPROVED FOR 

RELEAsE 1 1W2414830001-69 

Page 134 -SEC-RE-VDPROBIT PROBIT 

YES NO 

Is IPVIS equal to 0 or 3 

PV=PROBV 

PRINTOUT 

Writes the 2 words FILE EIGHT 

on output tapes KSPOUT, KOUT, KOL 

Set line counter 

to 996 

Figure 3-16 Subroutine PROBIT Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 4ECRETID Page 135 -- 

3.21 SUBROUTINE PROGRO 

3.21.1 Purpose 

The purpose of PROGRO is to process all the targets within the 

present group, to apply the decision strategy, and to determine that 

target within the group selected for photography. 

3.21.2 Usage 

3.21.2.1 Calling Sequence 

PROGRO $ 

3.21.2.2 Inputs 

a. Calling sequence inputs 

None 

b. Inputs via common locations 

GN 

TASSNO 

TIDX 

MAX 

TONSN 

3.21.2.3 Outputs, 

a. Calling sequence outputs 

None 

b. Outputs via common locations 

SCOF 

SIGT 

SN 

SNN 

TIDX 

TN 

TNN 

TNP 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 136 4EGREW-D3.21.2.4 Working Storage Within Routine 

None 

3.21.2.5 Error/Action Messages 

None 

3.21.2.6 Subroutines Called 

PROTAR 

DECIDE 

Specific target processor. Computes 

visibility for current target, slew and 

settle and dwell times, scope on and off 

times, processes voting logic, and sets up 

voting table 

Applies decision strategy to determine 

the target within each group to be 

photographed 

3.21.2.7 Called By Following Routine 

PROREV 

3.21.3 Method 

PROGRO controls the logic necessary to simulate the main optics 

selection within the group. All targets within the group are processed with crew voting simulated and the decision strategy applied 

to determine the selection. The logic flow diagram is shown as 

Figure 3-17. 
Increment target counter 

TN = TN+1 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 SECRET/D Page 137 

PROGRO PROGRO 

PROGRO 

Initialize scope on flags; 

used to compute slew and settle time 

after initiation of viewing 

SCOF($0$) = 0 

SCOF($1$) = 

Initialize target counter 

TN = 0 

Set initial scope on times 

for current group 

SIGT ($0$) = TONSN ($ GN-1, 0 $) 

SIGT ($1$) = TONSN ($ GN-1, 1 $) 

( 

 Have all targets been 

processed for current group? 

TN . > TNMAX? 

NO , 

Increment 

target index 

within rev 

TIDX = TIDX+1 

YES 

DECIDE 

Apply decision 

strategy to 

determine "winning" 

target 

RETURN 

Figure 3-17 Subroutine PROGRO Flow Diagram 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 138 

PROGRO PROGRO 

Store scope no. 

corresponding to current 

target and scope no. index 

SN = TASSNO (STIRS) 

SNN = SN-1 

Store target number 

group index 

TNN = TN-1 

PROTAR 

Target processor. Computes 

target specific parameters 

necessary to set up voting 

table 

Scope number = 0? 

SN = 0? 

IN° 

Store last target 

within current group 

taken by current scope 

TNP($SNN$) = TIDX 

Figure 3-17 Subroutine PROGRO Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 139 -SECREVII 

3.22 SUBROUTINE PROREV 

3.22.1 Purpose 

Subroutine PROREV's primary function is to control the flow of 

logic associated with the processing of information for one complete 

rev. This is accomplished through the following steps: 

• Extract the rev selection information from 

the TWONDER BIT and store into core memory 

• Produce typical sample detail output on a 

group by group basis for the entire rev 

• Update rev span summary outputs over the 

requested multi-sample duration 

3.22.2 Usage 

3.22.2.1 Calling Sequence 

PROREV 

3.22.2.2 Inputs 

a. Calling sequence inputs 

None 

b. Inputs via common locations 

BLNK 

CNFLG 

FDET 

GNP= 

ITOPT 

NS 

NULLREV 

RN 

TFL ICT 

TIDX 

TREV 

WTOP 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 140 

3.22.2.3 Outputs, 

a. Calling sequence outputs 

None 

b. Outputs via common locations 

BUFOUT 

FDET 

GN 

KSPTFG 

NCNFLT 

PRCONFL 

3.22.2.4 Working Storage Within Routine 

BLAST Rev which was processed on the previous 

pass through PROREV 

3.22.2.5 Error/Action Messages 

The following message is an information message appearing on the 

BCD output tapes when subroutine PROREV detects a group of targets 

containing all visual intelligence targets or targets which conflict 

with the previous groups selection. No special action is taken 

when this occurs as the program proceeds to process the next group 

of targets. 

GROUP XX OF REV XX CONTAINS ALL VISUAL INTELLIGENCE 

TARGETS OR CONFLICTS 

3.22.2.6 Subroutines Called 

BITRE Reads TWONDER BIT for rev selection file(s) 

PROGRO Controls logic associated with processing 

the path selections for an entire group 

GROUT Group output routine. Displays the 

typical sample detail output broken down 

by groups 

SINC As a function of the target selected and 

the vote recorded, SINC updates the table 

containing the count of the primary and 

alternate target selections over the entire 

rev span 

SECRET/ D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 141 

PRINTOUT Outputs BCD buffer on KOL, KSPOUT, 

KOUT, output tapes 

3.22.2.7 Called By Following Routines 

MCDRIV 

3.22.3 Method 

PROREV controls the use of the subroutines necessary to simulate 

the target visibility and activity, crew voting and consequent main 

optics selections over an entire rev. Figure 3-18 shows the flow 

of logic required to accomplish this task. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 142 -SECRETIDPROREV 

( PROREV 

Initialize null rev flag 

NULLREV = 0 

Initialize group number 

GN = 0 

(

Is previous rev = present rev? 

NO 

Set equal to 

present rev 

RLAST = RN 

BITRE 

Read WONDER BIT 

for rev RN MO 

and ATS selections. 

Set up voting table, no. 

of targets, no. of groups 

1 

(

Null rev? ) NO 

NULLREV = 1? 

1YES 

( RETURN ) 

RLAST = RN? 

PROREV 

YES 

Figure 3-18 Subroutine PROREV Flow Diagram 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 143 

PROREV PROREV 

Check whether target NO 

selection was made 

WTOP > 0 

YES 

Check if all groups 

have been processed 

GN > GNMAX 

NO 

RETURN 

Figure 3-18 Subroutine PROREV Flow Diagram (Continued) 

YES 

Store conflict 

matrix of target 

selected in previous 

group as present selection 

conflict matrix 

PRCONFL = TFLICT(ITOPT) 

Reinitialize 

target index 

and typical 

sample detail 

flag 

TIDX = - 

FDET = 

PROGRO 

Process path selections 

for the entire group, GN 

Increment group counter 

GN = GN+1 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 144 

YES 

Is typical sample 

detail requested 

on current rev? 

PROREV PROREV 

( 

Check whether selection Selection eliminated 

eliminated due to * due to conflict. 

conflict or to all VITs Update no. of 

groups eliminated 

CNFLG: 0 due to conflict 

NCNFLT = NCNFLT+1 

YES 

NS = 1 

NO 

-14 

( 1st sample? 

FDET = 1 

NO 

SINC 

Update table containing 

the count of primary 

and alternate target 

selections over a 

requested rev span 

PRINTOUT 

GROUT 

Output typical 

sample output 

for group GN 

Figure 3-18 Subroutine PROREV Flow Diagram (Continued) 

Null conflict matrix 

of target selected 

in previous group 

PRCONFL = 0 

Output 

"GROUP XX OF 

REV XX CONTAINS 

ALL VISUAL INTELLIGENCE 

TARGETS OR CONFLICTS" 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 145 

3.23 SUBROUTINE PROTAR 

3.23.1 Purpose 

PROTAR is the individual target processor which computes the 

following target specific parameters: 

• Visibility of current target 

• Scope specific slew and settle, dwell times, 

and on and off times 

• Reported and actual states of target 

visibility and activity taking into account 

crew false alarms and failures to recognize 

3.23.2 Usage 

3.23.2.1 Calling Sequence 

PROTAR 0 

3.23.2.2 Inputs 

a. Calling sequence 

None 

b. Inputs via common locations 

SIGT 

SN 

SNN 

TNN 

3.23.2.3 Outputs 

a. Calling sequence 

None 

b. Outputs through common locations 

ASDT 

DT 

SIGT 

STOF 

STON 

-SECRET& 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 146 

3.23.2.4 Working Storage Within Routine 

None 

3.23.2.5 Error/Action Messages 

None 

3.23.2.6 Subroutines Called 

GETV Computes probability of visibility and 

determines target visibility considering 

both inter-group (between groups) as well 

as intra-group (within a group) visibility 

correlation 

GETDT 

VOTE 

Computes scope slew and settle times along 

with actual scope dwell time 

Simulates the reported and actual states 

of target visibility and activity 

3.23.2.7 Called By Following Routine 

PROGRO 

3.23.3 Method 

PROTAR is entered once per target and follows the order of 

computation indicated below: 

1. Subroutine GETV computes the probability of 

visibility as a function of the input parameter, 

IPVIS. IPVIS also dictates whether intra-group 

visibility correlation should be considered or 

not. The inter-group visibility correlation 

model (Section 2.6) is always simulated. 

2. Simulates target visibility within a group by 

generating, at random, a visibility flag 

corresponding to each target indicating either 

visibility or non-visibility. 

3. Calculates dwell time and scope time on and off 

for each target using the recommended slew and 

settle time from the TWONDER selection files. 

(Subroutine GETDT). 

4. Processes voting logic and determines the 

reported and actual states of visibility and 

activity (Subroutine VOTE). 
1 

Compute current scope 

time for the scope 

viewing present target 

SIGT = SIGT + DT 

4 

Set actual scope time 

on and actual scope time 

off while viewing present 

target 

STON = SIGT - ASDT 

STOF = SIGT 

GETDT 

Determine TWONDER slew and settle 

time, simulate actual scope dwell 

time, compute the time increment 

between actual scope time on and 

scope time off 

V 

VOTE 

Process voting logic, 

determine reported 

and actual states 

of simulated crew 

visibility and activity 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 ---SEGRETM- Page 147 

PROTAR 

( PROTAR ) 

PROTAR 

GETV 

Determines prob. of visibility. 

Simulates inter/intra group 

visibility correlation in determining 

visibility of all targets within 

the current group 

(

Is target not viewed 

by either scope? 

SN = 0? 

YES 

N 

., 

Set actual scope dwell time, 

actual scope time on and 

time off to zero 

ASDT = 0 

STON = 0 

STOF = 0 

V 

V 

( RETURN ) 

Figure 3-19 Subroutine PROTAR Flow Diagram 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 148 -SEGRETA 

3.24 SUBROUTINE RDM1J 

3.24.1 Purpose 

RDM1J generates a uniformly distributed pseudo-random number 

between zero and one. 

3.24.2 Usage 

3.24.2.1 Calling Sequence 

RDM1J (LZ = UU, LLL) $ 

3.24.2.2 Input 

a. Calling sequence 

Program Equation 

Symbol Symbol Description 

LZ An integer random number between 

one and 235 used to start the 

sequence. (A "seed") 

b. Inputs through common locations 

None 

3.24.2.3 Output 

a. Calling sequence 

Program Equation 

Symbol Symbol Description 

UU u

i The generated floating point 

pseudo-random number, (greater 

than 2-28 and less than 1.0) 

LLL 1

i An integer used in the algorithm 

(contains 12 octal digits) 

b. Output through common locations 

None 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 149 

3.24.2.4 Working Symbols 

Program 

Symbol Description 

CD A floating point number equal to 227 

II An integer number equal to 515 

3.24.2.5 Error/Action Messages 

None 

3.24.2.6 Subroutines Called 

None 

3.24.2.7 Called By 

BERN 

TRI 

3.24.3 Method 

To start the sequence an integer number consisting of twelve 

octal digits is loaded into LZ. Normally the "seed" number is 1 but 

it can be as large as 235. 

A new random number 1i (LLL) is generated from the previously 

generated number (LZ) by extracting the least significant portion 

of the integer product of 515 times The left most 27 bits of 

the 35 bit result are converted to a normalized floating point number 

between 2-28 and one. 

• x = (515) (11.-1 ) 

1

i = least significant 35 bits of x 

1. 1 

y =

2

8 

(Integer part of y) 

u

1 - 

2

27 

Figure 3-20 shows the flow logic for RDM1J. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 150 -SECRETt13- 

3.24.4 Restrictions 

33 

1. This routine will repeat after 2 generated 

numbers. 

3.24.5' Reference 

National Bureau of Standards Report 3370, "Generation and 

Testing of Pseudo-random Numbers" by Olga Taussky and John Todd. 
YES 

PRDUCT 

LLL = 515 * LLL 

Extract the right 

most 35 bits of LLL 

and store in LZ 

4, 

.LLL = LZ 

LZ = LZ/28 

UU = LZ/227 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 151 

RDM1J RDM1J 

RDM1J 

4 

LLL = LZ 

Ilk 

Is LZ > 0? 

K 

NO 

LLL = 1 

( RETURN ) 

Figure 3-20 Subroutine RDM1J Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 153 

3.25 SUBROUTINE SETF78 

3.25.1 Purpose 

SETF78 sets to non-zero those bits in the array F78IT that 

correspond to the locations of integer words within Reset Files 7 

and 8. 

3.25.2 Usage 

3.25.2.1 Calling Sequence 

SETF78 (ARG1, ARG2, ARG3) $ 

3.25.2.2 Input 

a. Calling sequence 

Program 

Symbol Description 

ARG1 The number of the first bit within a 

sequence that must be set non-zero 

ARG2 The number of the last bit within a 

sequence that must be set non-zero 

ARG3 The number of the word in the array 

within which the sequence of bits 

are to be set non-zero 

b. Input through common locations 

None 

3.25.2.3 Output 

a. Calling sequence 

None 

b. Output through common locations 

F78IT 

3.25.2.4 Working Symbols 

None 

--SE-RET-4 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 154 -ffeRETtll 

3.25.2.5 Error/Action Symbols 

None 

3.25.2.6 Subroutines Called 

None 

3.25.2.7 Called By 

PROBIT 

3.25.3 Method 

Reset Files 7 and 8 parameters, as contained on the TWONDER BIT, 

are converted from binary to BCD for TSPOOND output display. Two 

types of conversions are necessitated, floating point and integer. 

SETF78 indicates those parameters within Files 7 and 8 requiring 

integer BCD conversion. This is effected by setting those bits in 

the array F78IT, corresponding to the locations of the integer words 

within Files 7 and 8, to non-zero. Subsequent interrogation of the 

bits of array F78IT will identify those parameters requiring integer 

BCD conversion for output. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 SECRET/ D Page 155 

3.26 SUBROUTINE SINC 

3.26.1 Purpose. 

Subroutine SINC computes the following rev span output parameters, 

updating these parameters on a rev by rev basis: target weight with 

interdiction, number of clear targets with interdiction, number of 

active primaries and alternates, number of inactive primaries and 

alternates, number of rejected primaries and alternates, number of 

unobserved primaries and alternates, and the total number of primaries 

and alternates. 

3.26.2 Usage 

3.26.2.1 Calling Sequence 

SINC $ 

3.26.2.2 Input 

a. Calling sequence 

None 

b. Inputs through common locations 

ALTERN, AV, AVOT, CLEART, DECEPT, ITOPG, ITOPT, 

PRIM, PRIMRY, STAT, TVAP, WEIGHT, WTOP 

3.26.2.3 Output 

a. Calling sequence 

None 

b. Outputs through common locations 

ALTERN, CLEART, DECEPT, PRIMRY, STAT, WEIGHT 

3.26.2.4 Working Symbol 

Program 

Symbol 

ICOL 

Description 

A processing pointer to determine if the target 

is active, inactive, rejected or unobserved. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 156 1-METtD3.26.2.5 Error/Action Messages 

None 

3.26.2.6 Subroutines Called 

None 

3.26.2.7 Called By 

PROREV 

3.26.3 Method 

The above mentioned rev span output parameters are accumulated by 

SINC on a rev by rev basis; i.e., the total number of each rev span 

parameter accumulated over one sample of one rev is summed to the total 

upon each reference to SINC. 

See Figure 3-21 for the SINC flow logic. 
Sum the manned weight items 

WEIGHT(0) = WEIGHT(0) + WTOP 

STAT(26) = STAT(26) + WTOP 

YES s there a negative weight on this target? 

WTOP < 0? 

NO 

ir 

( RETURN 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 157 

SINC 

SINC 

SINC 

NO Is target visible? YES 

AV(ITOPG) = 1? 

SECRET/D 

Determine status of target 

ICOL = AVOT(ITOPG) 

Increment number of clear targets 

with interdiction 

CLEART(0) = CLEART(0) + 1 

STAT(28) = STAT(28) + 1.0 

NO Is target a primary? \ YES 

-----"( 

ir---_ 

TVAP(ITOPT) = 1? 

TION■111■11.■ 

Increment the alternate target 

item that corresponds with the 

target status, increment the total 

alternate targets 

ALTERN(ICOL) = ALTERN(ICOL) + 1 

STAT(ICOL + 10) = STAT(ICOL + 10) 

+ 1.0 

ALTERN(4) = ALTERN(4) + 1 

STAT(14) = STAT(14) + 1.0 

V 

Increment the primary target item 

that corresponds with the target 

status, increment the total primary 

targets 

PRIMRY(ICOL) = PRIMRY(ICOL) + 1 

STAT(ICOL) = STAT(ICOL) + 1.0 

PRIMRY(4) = PRIMRY(4) + 1 

STAT(4) = STAT(4) + 1.0 

1 

RETURN 

Figure 3-21 Subroutine SINC Flow Diagram 
PRIM = 1? 

IVES 

Increment number of target selected 

when primary is rejected 

DECEPT(1) = DECEPT(1) + 1 

( RETURN )4 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 158 

SINC SINC 

Is there a primary in this group? N 

Figure 3-21 Subroutine SINC Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 159 

3.27 SUBROUTINE SPACEUP 

3.27.1 Purpose 

SPACEUP writes 16 blank lines on the on-line printer following 

an error/action message, which effectively spaces the error/action 

message away from the printer ribbon and into readable view. 

3.27.2 Usage 

3.27.2.1 Calling Sequence 

SPACEUP $ 

3.27.2.2 Input 

None 

3.27.2.3 Output 

None 

3.27.2.4 Working Symbols 

None 

3.27.2.5 Error/Action Messages 

None 

3.27.2.6 Subroutines Called 

System subroutines: CHECKW 

WRITE 

3.27.2.7 Called By 

Mb 

BITRE 

CCP 

GETV 

PROBIT 

TAPERR2 

TAPERR4 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 SECRET/D Page 161 

3.28 SUBROUTINE SPANOUT 

3.28.1 Purpose 

SPANOUT, at the end of each requested rev span, summarizes and 

displays the summary of the statistical data generated during that 

rev span. 

3.28.2 Usage 

3.28.2.1 Calling Sequence 

SPANOUT $ 

3.28.2.2 Input 

a. Calling sequence 

None 

b. Inputs through common locations 

BLNK NVIT 

CLEART PRIMRY 

DECEPT REN 

ICOM SET77 

NALTN TONS 

NCNFLT TRST 

NGPRS VOTESP 

NPRIM WEIGHT 

NTPRS 

3.28.2.3 Output 

a. Calling sequence 

None 

b. Outputs through common locations 

BUFOUT 

KOL 

KOUT 

KSPTFG 

PROL 

SECRET/D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 162 -SEC-REMY 

3.28.2.4 Working Symbols 

Program 

Symbols Description 

BB An integer print loop counter 

CSTONE An integer constant one 

CSTTHR An integer constant three 

FNMTS Number of samples in floating point 

HACT A preset hollerith item of 16 bytes 

HALTN It II II " 16 11 

HCLTG It II " 13 11 

HDVD II II "119 It 

HFLAL It 11 " 12 II 

HFLRG 11 it " 18 11 

HINACT It 11 " 16 11 

HINT II il " 12 II 

HNOF II II u 9 u 

HOLRITH /I 11 " 80 it 

HOUTINT II II " 16 II 

HPRM ,, ,, " 16 II 

HREJ •1 it " 16 ,I 

HUNBS /I II " 16 /I 

HWGT II II 

" 11 II 

HWITH II II " 8 ,/ 

HWTHOUT 1/ II " 8 II 

NMTS An integer equal to number of samples 

PTFG A print flag used to output the rev span 

summary output border 

SKPFLG A flag dictating what sections to write out 

VPRIMRY . A floating point array of 5 locations that 

contains the average votes 

WCTMND A floating point array of 2 locations that 

contains the average number of clear targets 

WDCPFA A floating point array of 3 locations that 

contains the average number of false alarms 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 SECRET/D Page 163 

Program 

Symbols Description 

WDCPFR A floating point array of 3 locations that 

contains the average number of failures to 

recognize 

WGTMND A floating point array of 2 locations that 

contains the average number of weights 

WNCNFLT A floating point item that contains the 

average number of conflicts 

.'JNGTPAV An integer array of 5 locations that 

contains the total targets, primaries, 

alternates, VIT's, and groups 

WPRIMRY A floating point array of 5 locations that 

contains the average number of selections 

3.28.2.5 Error/Action Messages 

None 

3.28.2.6 Subroutines Called 

EJECTPG 

PRINTOUT 

3.28.2.6.1 System subroutines 

OCTBCD 

OUTERR 

OUTPUT 

3.28.2.7 Called By 

MCDRIV 

3.28.3 Method 

SPANOUT takes the rev span summary output parameters which have 

been accumulated over both the current rev span of interest and the . 

requested range of samples, and computes averages of these parameters. 

An approximation to the mean of each of these output parameters, then, 

is displayed on output tapes KOL, KOUT. A complete description of 

the rev span output parameters along with a sample of the output is 

given in Section 3.2.3 of Reference 1. 
NRO APPROVED FOR 

RELEASE 1 JULY2015 

BIF-4-B30001-69 

Page 164 -1.MRETiaFigure 3-22 shows the flow logic for SPANOUT. 

3.28.4 Restrictions 

None 

3.28.5 References 

None 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 SECRET/D Page 165 

SPANOUT SPANOUT 

SPANOUT 

Initialize print flags. 

Obtain total number of samples 

Store the input values in the 

output arrays in the order required 

for writing output within print loops 

Divide input variables by the total 

number of samples to obtain averages 

PRINTOUT 

Write the border at the 

top of the rev span output display 

PRINTOUT 

Write out the rev span 

summary title 

PRINTOUT 

Write out the total number 

of groups, targets, primaries, 

alternates, and VIT's 

• 

PRINTOUT 

Write: THE FOLLOWING DATA ARE AVERAGES 

OVER THE REV SPAN FOR XXX SAMPLES 

Figure 3-22 Subroutine SPANOUT Flow Diagram 

SECRET/D 
SPANOUTE 

( Have five YES headers been 

written? 

N 

YES Has the fourt 

header been 

written? 

NO 

• 

RETURN 

Load output buffer in preparation 

to write the first of five headers 

Write headers for each of 

five sections that follow 

PRINTOUT 

Write 2 

blank lines 

Load output buffer 

in preparation for 

writing the fifth 

header 

PRINTOUT 

Write t e border 

at the bottom of the 

rev span display 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 166 

SPANOUT SPANOUT 

PRINTOUT 

Write: NUMBER OF GROUPS ELIMINATED 

DUE TO CONFLICT = XXXX 

SPANOUTG 

Write the 

subsections beneath 

the headers 

using OUTPUT 

YES Has the first 

subsection 

been written? 

I 

1 

Load index registers to prepare 

print loop for first 

subsection 

Figure 3-22 Subroutine SPANOUT Flow Diagram (continued) 
NO 

Load index registers 

to prepare print loop 

for second subsection 

SPANOUTG 

Load index registers 

to prepare print loop 

for third subsection 

SPANOUTG 

Load output buffer in 

preparation for writing 

the third header 

SPANOUTE 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 -SEC-RH& BIF-4-B30001-69 

Page 167 

SPANOUT SPANOUT 

Has the third header YES 

been written? (

Has the second YES subsection 

been written? 

IN° 

Load output buffer in 

preparation for writing 

the second header 

SPANOUTE 

YES Has the third 

subsection 

IV been written? 

(NO 

H Load output buffer 

in preparation for 

writing the fourth 

header 

SPANOUTE 

Figure 3-22 Subroutine SPANOUT Flow Diagram (continued) 

SECRET/D (REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 169 

3.29 SUBROUTINE SPECOL 

3.29.1 Purpose 

SPECOL sets up the output buffer (MCBUF) and writes the page 

headers and column headers for each page of the special Monte Carlo 

output. If a new page of output is not being initiated, SPECOL writes 

only the first two columns (group number and target selected within 

the group) of the group specific Monte Carlo output. 

3.29.2 Usage 

3.29.2.1 Calling Sequence 

SPECOL $ 

3.29.2.2 Input 

a. Calling sequence 

None 

b. Input through common locations 

BLNK 

GN 

ITOPG 

LINECNT 

RN 

3.29.2.3 Output 

a. Calling sequence 

None 

b. Output through common locations 

KOL 

LINECNT 

MCBUF 

3.29.2.4 Working Symbols 

None 

SECRET/D 
NRO APPROVED FOR 

RELEASE 1 JUL zo a stiL 11330001-69 

Page 170 

3.29.2.5 Error/Action Messages 

None 

3.29.2.6 Subroutines Called 

EJECTPG 

3.29.2.6.1 System Subroutines 

CHECKW 

CWRITE 

OCTBCD 

3.29.2.7 Called By 

GROUT 

3.29.3 Method 

See Figure 3-23 for flow logic. 

3.29.4 Restrictions 

None 

3.29.5 References 

None 
( 

Is the number of lines written N 

on the present page of output 

greater than 40? 

EJECTPG 

6Filricarriage control 

character on output 

tapes that will cause 

the printer to eject 

a page 

IYES 

CWRITE 

On the KOL tape,write at the top 

of the page: 

DETAILED OUTPUT FOR REV NO. XXX 

CWRITE 

On the KOL tape write the headers 

at the top of each of 10 columns 

of output 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 171 

SPECOL SPECOL 

SPECOL 

(I( 

CWRITE 

On the KOL tape write the group 

number and the target number 

selected for photography within that 

group in the first and second columns 

( RETURN ) 

Figure 3-23 Subroutine SPECOL Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 173 

3.30 SUBROUTINE TAPERR2 

3.30.1 Purpose 

TAPERR2 displays an error message on the on-line printer when a 

physical end of tape is encountered in writing an output tape. 

3.30.2 Usage 

3.30.2.1 Calling Sequence 

TAPERR2 (TAP2N0 = TRY2.) $ 

3.30.2.2 Input 

a. Calling sequence 

Program 

Symbol Description 

TAP2NO The logical tape unit being written 

upon 

TRY2. The return address 

b. Input through common locations 

None 

3.30.2.3 Output 

a. Calling sequence 

None 

b. Output through common locations 

None 

3.30.2.4 Working Symbols 

Program 

Symbol Description 

ENDTP Hollerith descriptor of error message 

SECRET/ D 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 174 --SEORETIO3.30.2.5 Error/Action Messages 

The following message is displayed when the physical end of tape 

is encountered: 

"MOUNT NEW TAPE ON UNIT XX HIT GO" 

Section 3.30.3 indicates the desired operator action when this occurs. 

3.30.2.6 Subroutine Called 

SPACEUP 

OUTPUT 

3.30.2.7 Called By 

PRINTOUT 

3.30.3 Method 

Spaces on-line printer for readability 

System output routine 

When the physical end of tape is encountered, program execution 

halts after the error message has been displayed on-line. At this 

point, the TSPOOND user or machine operator should mount a new tape reel 

on the designated tape drive and depress the "GO" button to continue 

program execution. The program will proceed to rewrite the record 

which caused the halt and resume execution as normal. 

See Figure 3-24 for the flow logic. 

3.30.4 Restrictions 

None 

3.30.5 References 

None 
SPACEUP 

Print 16 blank lines 

on—line 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 175 

TAPERR2 TAPERR2 

TAPERR2 

OUTPUT 

Print Error Message: 

"MOUNT NEW TAPE ON UNIT XX HIT GO" 

Figure 3-24 Subroutine TAPERR2 Flow Diagram 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 177 

3.31 SUBROUTINE TAPERR4 

3.31.1 Purpose 

TAPERR4 is used to write an error message on the printer when a 

system error in reading a tape is detected. When this occurs, program 

execution halts awaiting the operator action requested by the error 

message. 

3.31.2 Usage 

3.31.2.1 Calling Sequence 

TAPERR4 (TAP4NO = TRY4.) $ 

3.31.2.2 Input 

a. Calling sequence 

Program 

Symbol Description 

TAP4NO The tape unit being read from 

TRY4 The return address from the calling 

program to which execution returns 

b. Inputs through common locations 

None 

3.31.2.3 Output 

a. Calling sequence 

None 

b. Outputs through common locations 

None 

3.31.2.4 Working Symbols 

Program 

Symbol_ Description 

HPSTA A Hollerith item preset to "PUSH 

START TRY AGAIN" 

HSER A Hollerith item preset to "SYSTEM 

FOUND ERROR ON LAST READ ON UNIT" 

-SECREf fB-- 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 178 

3.31.2.5 Error/Action Messages 

SYSTEM FOUND ERROR ON LAST READ ON UNIT - XX PUSH START, TRY 

AGAIN. 

3.31.2.6 Subroutines Called 

SPACEUP 

OUTPUT 

OUTERR 

SKIPR 

3.31.2.7 Called By 

BITRE 

PROBIT 

3.31.3 Method 

After the error/action message is displayed on-line, program 

execution terminates awaiting the operator action requested by the 

message. If the operator elects to attempt the read instruction again, 

the console START button should be depressed. TAPERR4, at this point, 

returns execution control back to the previously executed read 

instructions for another attempt. 

Figure 3-25 shows the TAPERR4 flow logic. 

3.31.4 Restrictions 

None 

3.31.5 References 

None 
SPACEUP 

Print 16 blank 

lines on-line 

NRO APPROVED FOR 

RELEASE 1 JULY 2015 -SECIET/D BIF-4-B30001-69 

Page 179 

TAPERR4 TAPERR4 

TAPERR4 

Figure 3-25 Subroutine TAPERR4 Flow Diagram 

SECRET/ D (REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 181 

3.32 SUBROUTINE TRI 

3.32.1 Purpose 

TRI computes a random variable, x, representing dwell time, that 

has the required triangular density function. A different triangular 

density function is used to compute x depending upon whether the 

target is clear or cloudy. 

3.32.2 Usage 

3.32.2.1 Calling Sequence 

TRI (QS, RONE, RTWO) $ 

3.32.2.2 Input 

a. Calling sequence 

Program Equation 

Symbol Symbol Units Description 

QS Q Sec The most probable dwell time 

within the given triangular 

density function 

RONE R

1 n.d. That number which, when multiplied by QS, will give the 

smallest dwell time within the 

triangular density function 

RTWO R2 n.d. That number which, when multiplied by QS, will give the 

largest dwell time within the 

triangular density function 

b. Inputs through common locations 

WRN 

3.32.2.3 Output 

a. Calling sequence 

Program Equation 

Symbol Symbol Units Description 

TRI X Sec A floating point number representing the dwell time in 

seconds 
NRO APPROVED FOR 

RELEASE1JULY2M5 

BIF-4-B30001-69 

Page 182 

b. Outputs Outputs through common locations 

None 

3.32.2.4 Working Symbols 

Program Equation 

Symbol Symbol Units Description 

RQH Sec2 An intermediate variable equal 

to Q(R2- R1) 

U0 U n.d. A random number between zero and 

one 

3.32.2.5 Error/Action Messages 

None 

3.32.2.6 Subroutines Called 

RDM1J Uniform random number generator 

SQRT System square root 

3.32.2.7 Called By 

GETDT 

3.32.3 Method 

The altitude of the triangular density function is given by 

2 h= (R2

-R1)Q 

A random number, U, between zero and one is obtained from the random 

number generator, RDM1J and is compared with 

1-Ri 

R

2

-R1 

The dwell time,X, is determined conditionally so that 

2Q(1-U) (R2-1) 

X = R2Q - 

for U> R-R 2 1 

SECRET/ D 

1-RI 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 183 

or 

X = R1 Q + 

/2 QU(1 -R1) 

for 

1 - R1 

U 

R2 - R1 

 

Figure 3-26 shows the flow logic for TRI. 

-SEDREV-B- 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 184 -SECREVDTRI TRI 

TRI 

RDMIJ 

Obtain 

random 

number U 

Compute q_ times the 

quantity Rz_-__R1 

RQH = (QS)2 (RTWO - RONE) 

( Check random number 

1 - RONE 

U > RTWO - RONE 

N 

YES 

Compute X 

TRI = (RTWO)(QS) - vi(RQH)(1-U)(RTWO-1.0 

Compute X 

MO* ••■■ el= .1.M. 

TRI = (RONE)(QS) + PRQH)(U)(1.0-RONE) 

RETURN ) 

Figure 3-26 Subroutine TRI Flow Diagram 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-830001-69 -SEC-RE-TfB- Page 185 

3.33 SUBROUTINE VOTE 

3.33.1 Purpose 

Subroutine VOTE simulates the crew reported and actual states of 

target visibility and activity given the probabilities of visibility, 

activity, false alarm, and recognition. A secondary function of VOTE 

updates for rev span output the number of false alarms and number of 

failures to recognize categorized by primary and alternate targets. 

3.33.2 Usage 

3.33.2.1 Calling Sequence 

VOTE $ 

3.33.2.2 Inputs 

a. Calling sequence 

None 

b. Inputs via common locations 

PFALM TDECIS 

PRECOG TIDX 

SIGT TNN 

SN TPROBA 

SNN TVAP 

VV 

3.33.2.3 Outputs 

a. Calling sequence 

None 

b. Outputs through common locations 

AA 

AV 

DECEPT 

RA 

RV 

STAT 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 186 ---sEGREV-11. 

3.33.2.4 Working Storage Within Routine 

PROS Temporary cell containing current probability 

of activity 

DIDX Index used as a DECEPT array pointer 

KOUNT Index used as a STAT array pointer (extended 

statistics computations) 

3.33.2.5 Error/Action Messages 

None 

3.33.2.6 Subroutines Called 

BERN Bernoulli random number generator 

3.33.2.7 Called by Following Routine 

PROTAR 

3.33.3 Method 

VOTE is entered once per target and the reported and actual states 

of target visibility and activity are used by the decision strategy for 

the selection of the "winning" target for photography within a group. 

The reported visibility, RV, actual visibility, AV, reported activity, 

RA, and actual activity, AA, are simulated by random sampling and the 

false alarm and failure to recognize states are recorded and summed as 

they are encountered. 

Figure 3-27 shows the detailed VOTE flow diagram. 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 

Page 187 

VOTE ( VOTE ) 

Is target not viewed 

NO by any scope? 

SN = 0? 

YES 

Set unobserved 

reported status 

NO RETURN 

Set failure to recognize 

activity state 

RA = 0 

Figure 3-27 

(:: RETURN ) 

Subroutine VOTE Flow Diagram 

Check for 

activity 

M = 1? 

Check for reNO cognition 

)22s 

+YES 

BERN(PRECOG)=1? 

( 

Check whether scope 

time is greater than 

group decision time 

(

Actually visible? 

AV = 1 

SIGT > TDECIS? 

+ NO 

Set reject 

reported status 

RV = 0 

RA = 2 

Set reported active 

status 

RA=1 

IVES 

Set reported visibility 

state to visible 

RV = 1 

RV = 2 

RA =2 

VOTE 

YES 

Compute actual status 

using Bernoulli random 

number generator 

PROB = TPROBA(TIDX) 

AA = BERN(PROB) 

AV = VV 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 

BIF-4-B30001-69 

Page 188 

VOTE VOTE 

NO 

Set reported activity 

state to not active 

RA = 0 

Check for false 

alarm 

BERN(PFALM) = 1? 

'44 

YES 

Set reported activity 

state to active 

RA = 1 

Increment number of 

false alarms 

DECEPT(0) = DECEPT(0) + 1 

Determine number of false alarms 

by primaries and alternates 

Increment DECEPT(3) or DECEPT(4) 

depending on whether target is a 

primary or alternate 

Sum extended statistics 

arrays, STAT, corresponding 

to primary or alternate false 

alarm 

4 

C RETURN 

Figure 3-27 Subroutine VOTE Flow Diagram (Continued) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 BIF-4-B30001-69 SECRET/ D Page 189 

VOTE VOTE 

Increment number of failures to recognize 

DECEPT(2) = DECEPT(2) + 1 

Determine number of failures to 

recognize by primaries and alternates 

Increment DECEPT(5) or DECEPT(6) 

depending on whether target is 

a primary or alternate 

Sum extended statistics 

arrays, STAT, corresponding 

to primary or alternate 

failures to recognize 

( RETURN ) 

Figure 3-27 Subroutine VOTE Flow Diagram (Continued) 

(REVERSE OF THIS PAGE LEFT BLANK) 
NRO APPROVED FOR 

RELEASE 1 JULY 2015 SECRET/ D 

BIF-4-830001-69 

Page 191 

4. REFERENCES 

1. BIF-4-B30009-68 (D), "User's Manual for TSPOOND", 15 December 1968, 

TRW Systems Group. 

2. BIF-4-B10039-68 (D), "TWONDER Binary Interface Tape Description", 

22 November 1968, TRW Systems Group. 

3. DM 38-0071 (D), "User's Manual for TWONDER (Revised)", 

24 June 1968, TRW Systems Group. 

4. BIF-4-B10009-68 (D), "TWONDER Mathematical Description", 

12 September 1968, TRW Systems Group. 

5. P. L. Mc Entire, "A Method of Generating a Correlated Set of N 

Zero-One Random Variables with a Specified Mean", 

TRW Systems, Sunnyvale. 

6. P. L. Mc Entire, "A Method of Generating Two Zero-One Random 

Variables with Specified Means and Correlation Coefficient", 

TRW Systems, Sunnyvale. 

(REVERSE OF THIS PAGE LEFT BLANK)