Subroutine CALPLT 
This subroutine manages all the I/O operations and performs the necessary calculations 
required to generate the plots. After reading the card data (two or three cards) subroutine 
READT is called to read the data file (Tape 9) created by program MAIN. The CALCOMP 
initializing routines are called next, after which a call to subroutine ESCALE calculates the 
necessary scaling factors. Subroutine EXAXIS is called next to determine the placement of 
the plot tick marks and identifying digits. The CALCOMP plot-generation subroutines are 
now called and, depending on the option defined by the IA parameter on card 2, plots of 
pitch and heave at the bow and CG location are generated as functions of time if IA = 1. 
Subroutine EAXIS 
The subroutine is analogous to the CALCOMP AXIS routine. The only exception is that 
the tick marks are not necessarily inch, and the height of the characters is defined by the 
input parameter HT. Function NDIGIT is called to determine the number of digits necessary 
to print an even increment of the plots functions on the axis. 
Subroutine ESCALE, ADJUST, and FUNCTION UNIT 
These subroutines find the scale to be used on the plot axis. Function UNIT is called 
to determine the axis increment size after which subroutine ADJUST is called to extend the 
minimum (AMIN) and maximum (AMAX) values so that they are even multiples of the axis 
increments. 
FUNCTION NDIGIT 
This function finds the number of digits necessary to print even increments of the 
function on the axis. Both the number of places in the entire number (NDIGIT) and the 
number of decimal places (ND) are determined, after which the value of each increment on 
the axis (ANUM) is calculated. 
Subroutine READT 
This subroutine reads the data file created by program MAIN. Data file records are 
read until the message end of file is encountered. Each record is read in the same format as 
it was written in MAIN. The information is printed to allow the user to inspect the created 
file. 
49 
