CFPRIME DETENT                                                          DETENT      1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*               Output Analysis Program for ETMSP (OAP)               *RIGHTE      4
C*               =======================================               *RIGHTE      5
C*                                                                     *RIGHTE     11
C*        copyright @(1993) Electric Power Research Institute          *RIGHTE     12
C*                                                                     *RIGHTE     13
C* EPRI reserves all rights in the software and associated             *RIGHTE     14
C* documentation as delivered. The software and its associated         *RIGHTE     15
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     16
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     17
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     18
C* of any changes or modifications to the software within two (2)      *RIGHTE     19
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     20
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     21
C* new designation sufficiently different from its then current        *RIGHTE     22
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     23
C* the current software as changed or modified.                        *RIGHTE     24
C*                                                                     *RIGHTE     25
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     26
C* directly from EPRI.                                                 *RIGHTE     27
C*                                                                     *RIGHTE     28
C* This program and supporting materials may be independently available*RIGHTE     29
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     30
C* distribution fee. The EPSC is a service of                          *RIGHTE     31
C*                                                                     *RIGHTE     32
C*                    Power Computing Company                          *RIGHTE     33
C*                    1930 Hi Line                                     *RIGHTE     34
C*                    Dallas, Tx 75207                                 *RIGHTE     35
C*                                                                     *RIGHTE     36
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     37
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     38
C*                                                                     *RIGHTE     39
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     40
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     41
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     42
C*    DOCUMENTATION; OR                                                *RIGHTE     43
C*                                                                     *RIGHTE     44
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     45
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     46
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     47
C*                                                                     *RIGHTE     48
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     49
C* THEREOF.                                                            *RIGHTE     50
C*                                                                     *RIGHTE     51
C***********************************************************************RIGHTE     52
        SUBROUTINE DETENT(TT1)                                          DETENT      3
C       *****************************                                   DETENT      4
CD                                                                      DETENT      5
CD          THIS ROUTINE DETERMINES THE INCREMENT OF THE X AND Y AXES   DETENT      6
CD                                                                      DETENT      7
CD          CALLING PARAMETERS :                                        DETENT      8
CD                                                                      DETENT      9
CD                         TT1 - START OF THE X-AXIS                    DETENT     10
CD                                                                      DETENT     11
C       *****************************                                   DETENT     12
*IF LAHEY                                                               DETENT     13
*ENDIF                                                                  DETENT     15
      INCLUDE 'GPINFO.INS'                                              DETENT     16
        NYDIV=INT(YDIV)                                                 DETENT     17
        XLEN=BXE-BXS                                                    DETENT     18
        YLEN=BYE-BYS                                                    DETENT     19
*IF PINDEP                                                              DETENT     20
*ENDIF                                                                  DETENT     22
C       DETENT X-AXIS                                                   DETENT     23
        X=(TT1-XSTVAL)/XDELTA-XLEN/XDIV                                 DETENT     24
        Y=0                                                             DETENT     25
        DO 10 I=1,NINT(XDIV+0.5)+1                                      DETENT     26
          DO 20 J=1,10                                                  DETENT     27
            X=X+XLEN/XDIV/10.0                                          DETENT     28
            IF(X.GT.XLEN)GOTO 25                                        DETENT     29
            IF(X.LT.0.0)GOTO 20                                         DETENT     30
*IF LAHEY                                                               DETENT     31
*ENDIF                                                                  DETENT     34
*IF PINDEP                                                              DETENT     35
*ENDIF                                                                  DETENT     37
*IF VERSAP                                                              DETENT     38
*ENDIF                                                                  DETENT     40
*IF CALCOM                                                              DETENT     41
*ENDIF                                                                  DETENT     43
*IF -LAHEY                                                              DETENT     44
            IF((J.EQ.5).OR.(J.EQ.10))THEN                               DETENT     45
*ENDIF                                                                  DETENT     46
*IF PINDEP                                                              DETENT     47
*ENDIF                                                                  DETENT     49
*IF VERSAP                                                              DETENT     50
*ENDIF                                                                  DETENT     52
*IF CALCOM                                                              DETENT     53
*ENDIF                                                                  DETENT     55
*IF LAHEY                                                               DETENT     56
*ENDIF                                                                  DETENT     88
*IF -LAHEY                                                              DETENT     89
            ELSE                                                        DETENT     90
*ENDIF                                                                  DETENT     91
*IF PINDEP                                                              DETENT     92
*ENDIF                                                                  DETENT     94
*IF VERSAP                                                              DETENT     95
*ENDIF                                                                  DETENT     97
*IF CALCOM                                                              DETENT     98
*ENDIF                                                                  DETENT    100
*IF -LAHEY                                                              DETENT    101
            ENDIF                                                       DETENT    102
*ENDIF                                                                  DETENT    103
*IF PINDEP                                                              DETENT    104
*ENDIF                                                                  DETENT    106
*IF VERSAP                                                              DETENT    107
*ENDIF                                                                  DETENT    109
*IF CALCOM                                                              DETENT    110
*ENDIF                                                                  DETENT    112
*IF -LAHEY                                                              DETENT    113
            IF((J.EQ.5).OR.(J.EQ.10))THEN                               DETENT    114
*ENDIF                                                                  DETENT    115
*IF PINDEP                                                              DETENT    116
*ENDIF                                                                  DETENT    118
*IF VERSAP                                                              DETENT    119
*ENDIF                                                                  DETENT    121
*IF CALCOM                                                              DETENT    122
*ENDIF                                                                  DETENT    124
*IF -LAHEY                                                              DETENT    125
            ELSE                                                        DETENT    126
*ENDIF                                                                  DETENT    127
*IF PINDEP                                                              DETENT    128
*ENDIF                                                                  DETENT    130
*IF VERSAP                                                              DETENT    131
*ENDIF                                                                  DETENT    133
*IF CALCOM                                                              DETENT    134
*ENDIF                                                                  DETENT    136
*IF -LAHEY                                                              DETENT    137
            ENDIF                                                       DETENT    138
*ENDIF                                                                  DETENT    139
*IF LAHEY                                                               DETENT    140
*ENDIF                                                                  DETENT    172
  20      CONTINUE                                                      DETENT    173
  10    CONTINUE                                                        DETENT    174
C       DETENT Y-AXIS                                                   DETENT    175
  25    CONTINUE                                                        DETENT    176
        X=0                                                             DETENT    177
        Y=0                                                             DETENT    178
        DO 30 I=1,NYDIV                                                 DETENT    179
          DO 40 J=1,10                                                  DETENT    180
            Y=Y+YLEN/NYDIV/10.0                                         DETENT    181
*IF LAHEY                                                               DETENT    182
*ENDIF                                                                  DETENT    184
*IF PINDEP                                                              DETENT    185
*ENDIF                                                                  DETENT    187
*IF VERSAP                                                              DETENT    188
*ENDIF                                                                  DETENT    190
*IF CALCOM                                                              DETENT    191
*ENDIF                                                                  DETENT    193
*IF -LAHEY                                                              DETENT    194
            IF(J.EQ.5.OR.J.EQ.10)THEN                                   DETENT    195
*ENDIF                                                                  DETENT    196
*IF PINDEP                                                              DETENT    197
*ENDIF                                                                  DETENT    199
*IF VERSAP                                                              DETENT    200
*ENDIF                                                                  DETENT    202
*IF CALCOM                                                              DETENT    203
*ENDIF                                                                  DETENT    205
*IF -LAHEY                                                              DETENT    206
            ELSE                                                        DETENT    207
*ENDIF                                                                  DETENT    208
*IF PINDEP                                                              DETENT    209
*ENDIF                                                                  DETENT    211
*IF VERSAP                                                              DETENT    212
*ENDIF                                                                  DETENT    214
*IF CALCOM                                                              DETENT    215
*ENDIF                                                                  DETENT    217
*IF -LAHEY                                                              DETENT    218
            ENDIF                                                       DETENT    219
*ENDIF                                                                  DETENT    220
*IF PINDEP                                                              DETENT    221
*ENDIF                                                                  DETENT    223
*IF VERSAP                                                              DETENT    224
*ENDIF                                                                  DETENT    226
*IF CALCOM                                                              DETENT    227
*ENDIF                                                                  DETENT    229
*IF LAHEY                                                               DETENT    230
*ENDIF                                                                  DETENT    262
*IF -LAHEY                                                              DETENT    263
            IF(J.EQ.5.OR.J.EQ.10)THEN                                   DETENT    264
*ENDIF                                                                  DETENT    265
*IF PINDEP                                                              DETENT    266
*ENDIF                                                                  DETENT    268
*IF VERSAP                                                              DETENT    269
*ENDIF                                                                  DETENT    271
*IF CALCOM                                                              DETENT    272
*ENDIF                                                                  DETENT    274
*IF -LAHEY                                                              DETENT    275
            ELSE                                                        DETENT    276
*ENDIF                                                                  DETENT    277
*IF PINDEP                                                              DETENT    278
*ENDIF                                                                  DETENT    280
*IF VERSAP                                                              DETENT    281
*ENDIF                                                                  DETENT    283
*IF CALCOM                                                              DETENT    284
*ENDIF                                                                  DETENT    286
*IF -LAHEY                                                              DETENT    287
            ENDIF                                                       DETENT    288
*ENDIF                                                                  DETENT    289
*IF LAHEY                                                               DETENT    290
*ENDIF                                                                  DETENT    322
  40      CONTINUE                                                      DETENT    323
  30    CONTINUE                                                        DETENT    324
        RETURN                                                          DETENT    325
        END                                                             DETENT    326
