NASA Technical Reports Server (NTRS) 19930019432: Advanced Transport Operating System (ATOPS) Flight Management/Flight Controls (FM/FC) software description

Survival, Water, Medical Field Manuals

Military Manuals

Nasa Technical Reports Server (Ntrs)

Document text

NASA Contractor Report 191457 


/ 7//V/ 


Advanced Transport Operating System (ATOPS) 
Flight Management/Flight Controls (FM/FC) 
Software Description 


David A. Wolverton 
Richard W. Dickson 
Winston C. Clinedlnst 
Christopher J. Slominski 

Computer Sciences Corporation 
Hampton, Virginia 


Prepared For 
Langley Research Center 
under Contract NASI -19038 
April 1993 


(NASA-CR-191A57) ADVANCED 
TRANSPORT uP&RATING SYSTEM (ATOPS) 
flight management/flight CONTROLS 
( FM/FC) SOFTWARE DESCRIPTION 
Report, Jan. 1989 - Feb. 1991 
(Computer Sciences Corp. ) 


3 70 p 


N9 3-2 862 1 


Unci as 

G 3/06 0171911 


NASA 

National Aeronautics and 
Space Administration 


Langley Research Center 

Hampton, Virginia 23681-0001 



TABLE OF CONTENTS 


1.0 INTRODUCTION . 

2.0 SYSTEM OVERVIEW 


2.1 


PROCESSES AND EXECUTABLE IMAGES 

HDL (I/O Handler) • * 

FMFAST (Flight Management FAST loop executive) 
FCFAST (Flight Controls FAST loop executive) . 
SLOW (Flight Management SLOW loop executive) 
DSTAR (DAS/SNAP Table Access Routine) . . . . 

VIEW (Global Section Data View Utility) . . • 


2.2 GLOBAL SECTIONS 

2.3 INSPECTING GLOBAL VARIABLES WITH VIEW 

2.4 STARTING AND STOPPING VAX FM/FC SOFTWARE 

2.5 CONDITION HANDLING 

2.5.1 EXCEPTION LOG FILES 


3 

4 

5 

6 

7 

8 
9 

10 

12 

14 

15 
17 


3.0 I/O COMMUNICATIONS . 

HDL 

HDL_MESG 

IOFLL 

INI OM 

GPSPKT 

OUT10M 


18 

19 

25 

26 

27 

28 
29 


4.0 EXECUTIVE SOFTWARE . 

FMFAST 

FCFAST 

SLOW 


31 

32 

33 

34 


5.0 FLIGHT MANAGEMENT . 
OVERVIEW 


35 

35 


5.1 FAST LOOP PROCESSING: 

CDUFST (CDU Fast Loop Processing) 

ACCPRC (Accelerometer Processing) * * * • 

GPSPRC (Global Positioning Satellite Processing) . . 

MLSEX (Microwave Landing System (MLS) Executive) . . 

RSCON (Reset Constants) 

CNTRM (Counter Module) 

CTLBLK (Control Block) 

PFILT (Pre-filter) 

XFORM (Coordinate Transformation) 

XYZIN (R-Az-El to X-Y-Z) 

CFILT (Complementary Filter) 


36 

36 

38 

39 
41 

43 

44 

46 

47 

49 

50 
52 


ii 


PRINV (Inverse Computations) 

HNAVFS (Horizontal/Vertical Navigation, Fast) [ * 
HNAVML (Horizontal/Vertical Navigation, MLS) ! ! ' 
HNAVB (Horizontal/Vertical Navigation, plus Baro) 
HNSWIT (Horizontal/Vertical Navigation Switching) 
HVGUID (Horizontal/Vertical Guidance) 

LEGSW (Leg Switching) 

GD3D (3D Guidance Initialization) . . 

AAA (Turn Vector Processing) 

DTG1 (Distance-to-go (Turn) Calculations) 

HVG2 (Distance-to-go (Straight Leg) Calculations) 
TRALCBA (Primary Lateral Guidance Computations) 

HVG6 (Primary Vertical Guidance Computations) 

TGUID (Time Guidance) 

AAT (Turn Computations) .... 

CDG (Primary Time Guidance Computations) . ’ * 

NAVIG (Simulated Airplane) 

FLYIC (Initialization) 

ENGAGE_CAS (Operate Simulator) 


54 

55 
60 
62 
65 
69 

73 

74 

75 

76 

77 

78 
81 
83 
86 
88 
90 

92 

93 


5.2 SLOW LOOP PROCESSING: .... 

CDUEXC (CDU Executive) ^ 

BLOW (Wind Computations) 

EPRLMT (Engine Pressure Ratio Limit) 

ERAD (Earth Radii Computations) 

HNAVSL (Horizontal Navigation Slow Loop) !!.*.*!* 

RADCAL (Earth Radius Calculations) 

CRBSC (Range and Bearing Calculations) 

TUNPTH (Path Defined Station Tuning) 

NXTPS (Next Path Station) 

TUNEPS (Tune Path Station) 

T1CHEX (Tuning Checks) 

TUNDM2 (Autotune DME #2) 

NXTSTA2 (Select Next Station) 

SEARCH_STA2 (Find Next Station) 

BMPSTA2 (Pick Next-in-strip) ’ * 

CHOOSE_STR2 (Select Next Longitudinal Strip) 

EXT_RGE2 (Extend Search Range) 

LOOKL2 (Select Next Strip to West) 

TUNXTK (Cross Track Station Tuning) 

XTK_MAN (Manual Tuning) 

XTK__AUTO (Auto Tuning) 

GEOM_CK (Geometry Checks) 

NXTSTA (Select Next Station) 

SEARCH_INIT (Initialize Station Search) . . .. 

SEARCH_STA (Find Next Station) 

CMP_FREQ (Check Station Tuning) 

BUMP_STA (Pick Next-strip) * * ’ ’ 

CHOOSE_STRIP (Select Next Longitudinal Strip) 

LOOK_L (Select Next Strip to West) 

EXT_RANGE (Extend Search Range) 

TUNCK (Verify Station Geometry) 

GMSG (Generate Message) 


95 
. 95 

. 96 

. 98 

. 101 
. 103 
. 109 
. 110 
. 112 
. 114 
. 115 
. 116 
. 117 
. 118 
. 119 
. 120 
. 121 
. 122 
. 123 
. 124 
. 125 
. 126 
. 127 
. 128 
. 129 
. 130 
. 131 
. 132 
. 133 
. 134 
. 135 
. 136 
. 137 


iii 


mf^G (Error Message Tables) ■ • 

So«T (Snap Output Processing) 


6 0 FLIGHT CONTROLS 

SS?(£2 Select ’"panel 1 Readout) ' ! ! 

MLOG (Mode Logic) **.*»* 

DETNT (Logical Function) 


(Roll Computer - CWS) . ■ • 

(Roll Basic - CWS Modes) . • 

‘(Roll Computer -Auto Mode > . 


RCOM 

RBASC (Roll Basic 
rcoma (Roll; comput.-_ Ruto Modes) 

DCRAB* (De-crab (Autoland) Maneuver) 


6.1 


VERCMD (Vertical Path Command, 

pal (Pitch Auto Land) • • - 

EL PFFD 1 E ( P i t c h° F or w a r d° F 1 i gh t^De c M . '• '• 

b && v^rtl^rp^ Und,- . : . 

2s Law> . ■■ 

^(iuffth “control Law,' ! '■ ■ • ; 

SSS5 ( I / o'ou t put“p r oce s s i"ng ) ' 

S discrete E In-Use Computations) ' 1 ! 

SINUSE (Sensor In-Use^Computat ions) 

«CM? (2nd°Failure Computations) . • • ; 

F2CMP2 . . 

EXITF1 . . 

EXITF2 . 

FDSTR (Failure Data Storage) • * ’ * 

TEST SENSORS 

FMTMG (Format Message) 

ESS !s a y t s?em t ?esrp £ a-l S rnter f ace, ' '• '• 


6 - 2 DASOT ^DAS 0 Recording Output, . • ; ; ; ; 

SNAP (Snap Data Storage) 


DUMPS 


. 138 
. 139 

, . 140 

. . 140 

. . 141 
. . 143 
. . 152 

. . 153 
. . 155 
. . 164 

. . 165 
. . 1*7 1 
. . 173 

. . 177 

. . 178 

. . 182 
. . 184 

. . 186 
. . 187 

. . 188 
. . 194 

. . 196 

. . 199 
. . 200 
. . 203 
. . 204 

. . 205 

. . 206 
. . 210 
. . 212 
, . . 214 

. . . 215 

. . • 215 

. . • 216 
. . . 217 

. . . 219 
. . . 220 
. . 222 
. . . 223 
. . . 224 

. . . 226 
. . . 227 

... 229 
... 230 
... 231 

... 232 
... 233 
... 236 
. . 237 



< CQ O Q 


iv 


6.3 


PREFLIGHT OVERVIEW 

PR CLBIS P ^' f i i9ht Test ’ Executive') ' ' ' 
s Bias 

(ILS Receiver Checks) 

i a ff r Altimeter Checks) 

(Rate Gyro Checks) 

(Servo Checks) ' ' * 


CTLCK 

ILSRC 

RDALT 

RGYRO 

SRVCK 


7.0 DAS/SNAP TABLE ACCESS 

■■■:: 

dasprc (DA^TabTJ °p d 1 " 9 Tables > ’ ■' : : : : 

CHECK (Ch 1 Def iniCion" 9) 

Snapdel (leap Delete) i ' lte ”' Entry) ' •' • •' 

• • • : : 

cat™ (Snap Processing) 

SNAPDUMP (Dump Snap Tables) 

OLDSNAP (R/w Snan ' 

UCASE (Convert ^ ables to Disc) . . 

convert to Upper Case) . ’ 

appendices 

Digital Systems Diagrams 

- Horizontal /Vertical 

- Microwave LanSng system*^ 6 Co ""? uta tions 

- VIEW Command Entries Proces smg . . 

System Global Variables ’ 


• 238 
. 239 
. 241 

• 242 
. 243 
. 244 

• 245 
. 246 

. 248 
. 248 
. 251 

• 252 
. 253 
. 254 
. 255 
. 256 

. 257 

259 

260 
261 
262 

263 

264 

265 
313 
337 
343 
351 



1 


Section 1.0 INTRODUCTION 

This document describes the software created for the Flight 
Management /Flight Controls (FM/FC) MicroVAX computer used on the 
Advanced Transport Operating System (ATOPS) project at the Langley 
Research Center. The software was developed by Computer Sciences 
Corporation (CSC) for NASA under contract NAS1-19038. This 
document targets the software delivery of February 27, 1991 as a 

baseline system. 

The FM/FC host computer works in tandem with another MicroVAX 
computer, referred to as the Displays computer. The document 

Advanced Transport Operating System 
Color Displays Software Description 
MicroVAX System 

should be referenced for information about Displays software. 

Throughout this document, descriptions of software modules are 
presented in a standardized format. The basic template is shown 
below. At the top of the form is a header block containing 
miscellaneous information about the module, including a one or two 
sentence synopsis used as a quick reference stating the purpose of 
the module. A detailed description follows which may be a small 
paragraph to several pages in length. Global symbol references are 
listed next. These are the common variables referenced by the 
particular module. Note that passed parameter variables are not 
shown here. Passed parameters are provided in the CALLING SEQUENCE 
portion of the header information block. 


MODULE NAME: 
FILE NAME: 
PROCESS: 

PURPOSE : 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 

DESCRIPTION: 


GLOBAL INPUTS: 


GLOBAL OUTPUTS: 



2 


Section 2.0 SYSTEM OVERVIEW 


describe th^o^ra!? con lotion of^hrFMTFcTof^" brie£ly 

vix/™fn fli 9 r ht COmpUter - The -ade? 1 ^sh t o^dTe FC fa S m m W a a r re „i°t n h 3£ 
AX/VMS operating system. Several important key words are* nof C H 
below. Detailed information about these conceDfq io -h 

-d X«3 U trsta n rt r ° dUCti0n 


Digital Command Language (DCL) 

Command files 

Processes 

Images 

Process priorities 
Global sections 

Exceptional conditions / Condition 
Condition handlers 


signaling 


3 


section 2 . 1 PROCESSES AND EXECUTABLE IMAGES 

There are seven executable . images a-ociate^ with the FH/FC 

applications^programsf^Their “names^are ^iven heiow with a brref 

description of their purposes. 


dstar 

SECTION 

VIEW 


HDL 

FMFAST 

fcfast 

SLOW 


(utilities) . . . „ 

manipulate data recording tables 
install and remove global sections 
monitor global variables 

perform Flight Management real tri = latlons 
perform SU& ^ 




for the FM/FC executable images 
The environment created Thev are the initial process 

consists of five VAX processes. ■ f J^pa^ed sub processes. The 
created from the user log . ^ rhe looin process. Any one 

utility programs run in activated from the terminal with the RUN 
of the three may be act ' n active continuously under 

command. The other f< e ss Since the FM/FC applications 
the context of their own sub h P / ^ s Priority system determines how 

ssssr &Z s sSZ^rzZ' s: 

se t of^responsibilities . ^he ^ 

name s°of “modules ShicSTaXe Ip each image are also included. 



4 


PROCESS NAME: HDL (I/O Handler) 


£ ^he^ule 12 ' this yS e«ernl! Ur ?/o t0 aUo " exte ™al i/o 

VO & also formats 


19 


EXECUTION PRIORITY: 

invoked by: dcl spamn 

GLOBAL sensed >™» 

FCCoSTi? /W1, DLNC0M R/» lr DSTDATfR ^"^ ' C10C °MtR/W], 
FCCOMfR], INPCOMrR/Wl DTCCOM[R/Wl 

OUTCOM[R/W], RECCOM[R] # M tR/W], NAVCOM [R/W] | 

DESCRIPTION: 

i» th. 

t C r a ?e d 9i0 n UP a° t n ^ «^X* &£ 

channels 9 *for D DMA i withb^t daedla ^ a> ^ ai " c°Rtext 

Sfer- V ™ Sf, V® pS!" 5^” ^ 

application software by HDL? iS f °™ atted *>r 


5 


PROCESS NAME: FMFAST (Flight Management FAST loop executive) 

PURPOSE- To perform initialization functions for the Flight 
Management (FM) foreground software and serve as the 
executive for FM supporting modules. 

EXECUTION PRIORITY: 18 


INVOKED BY: 


DCL SPAWN 


pt nRAT SECTIONS USED [ READ (R) /WRITE (W) ] : . 

AADCOM [R] , BCKCOM [R/W] , CDUCOM(R/W] , CIOCOM R/W , 

DISNAVtR/W], DLNCOM [R/W] , FCCOM[R/W], INPCOM[R/W], 
NAVCOM[R/W] , OUTCOM [R/W] , RECCOM[R/W] 

OE^RIPTWN: ess consists of those routines that P^ide 

. T... rrpate a nd interact with the aircraft flight plan. 

Th^ ability to inspect and enter information that affects the 
fliqht Plan is provided through software that controls the CDU 

dsL-2 for^by software^control°of K°5. f ~ 

^ng^tem* (MLS,' and/o^Globa^Positionin^Satellite 1 signals 
^fbe 9 use y d to augment the navigation depending upon seiectron via 

the Aircraft guidance commands for the various automatic modes of 
fliaht are also computed by the FM software. These may include 
horizontal/ vertical, and time guidance commands UP ° n Che 
pilot selected flight mode (see description of MSPLGC) . 



6 


PROCESS NAME: 


FCFAST (Flight Controls FAST loop executive) 


PURPOSE. To perform initialization functions for i-h* K 

Controls (FC) software and serve as t-h« the . Flight 
supporting modules. the executlv e for 


EXECUTION PRIORITY: 17 


INVOKED BY: 


DCL SPAWN 


GLOBAL SECTIONS USED [READ (R) /WRITE (W) ] : 

dlncomIr'w], Svf^wj; SSSSfSi ' SIS;, 

sa, SSSI&, SS£« 

DESCRIPTION: 

interface S“' H fr ° m the ™rious 

control laws selected and iccime 9 0 mode control logic and 

in flight. The prin iry co^andl isTed th ? aircraft 
include aileron command (AlirMm t0 the contro1 surfaces 

command (RUDCMD) , autothrottle' position c ° minand (D ECMD) , rudder 
stabilizer trim discretes (TRIMR, TRIMD) Thp°r!! and f (APCDG) , and 
commands, as well as the accompanvina lnoio e COIt >P uta tion of these 
covered in detail in the Flight Cont 9 rols%ec\ n fon r o7^h\Td^c i u n i n 9 en a t re 


7 


PROCESS NAME: SLOW (Flight Management SLOW loop executive) 

PURPOSE' To provide background processing for FM functions such as 
navigation, CDU operations, printing snapshot data, and 
error messages. 


EXECUTION PRIORITY: 4 


INVOKED BY : DCL SPAWN 


GLOBAL SECTIONS USED [ READ (R) /WRITE (W) ] : 

AADCOM [R] , BCKCOM [R/W] , CDUCOM(R/W], 
DISNAV [R/W] , DLNCOM [R/W] , DTCCOM[R], 
INPCOM [R] , IPLCOM [R/W] , NAVCOM[R/W], 
RECCOM [R/W] 


CIOCOM [R/W] , 
FCCOM [R/W] , 
OUTCOM [R/W] , 


DESCRIPT IlON^cut able image SLO w.EXE is activated by the HDL process 
upon system start up. This process executes continually in the 
background mode supporting those non-time-critical functions such 
as CDU processing, tuning of ranging stations such as DME (distance 
measuring equipment) or TACAN (Tactical Air Navigation) stations, 
and printing of snapshot data and error messages. 



8 


PROCESS NAME: 


DSTAR (DAS/SNAP Table Access Routine) 


PURPOSE: 


To provide an interactive method of 
recording variables and snapshot criteria 


selecting data 
and variables. 


EXECUTION PRIORITY: 4 (20 when invoked by HDL process) 


INVOKED BY: 


RUN DSTAR (for interactive use) 

Spawned by HDL at priority 20 on startup 


GLOBAL SECTIONS USED 
AADCOM [R] , 
DLNCOM [R] , 
IPLCOM (R] , 


[READ (R) /WRITE (W) J : 
BCKCOM [R] , CDUCOM [R] , 
DSTDAT [R/W] , DTCCOM [R] , 
NAVCOM [R] , OUTCOM [R] , 


CIOCOM [ R] , DISNAV [R] , 
FCCOM [R] , INPCOM [R] , 
RECCOM [ R/W] 


DESCRIPTION: 

DSTAR is an interactive process used to selprt- Hat-a a • 

variables, snapshot criteria and variables and set no J?? ordl "9 
tables for data recording, it permits In expe“menter To modffTJ, 

taWe 1 " 9 ^ 3 11St d'- SnapSh0t data specification or alter^e 
E? 1 ®’ r ?? ta recording is not actually performed by this prjcjss 
but a table is created (DASPAR) which is used by data remrdi^ 
software (OUTIO) running in a foreground process TfmfaST) tolelecl 

to the° r DATAC a b C us 0 rdin 9 p t0 fa ° t0rS s P ecifi «> output ?t 

, *4-* bus. For a detailed description of dstar 

pabilities, see the Data Recording Section of this document. 


9 


VIEW (Global Section Data View Utility) 


PROCESS NAME: 

PURPOSE: TO examine and modify variables in the ATOPS global 

sections . 


EXECUTION PRIORITY: 5 
INVOKED BY: RUN VIEW 


GLOBAL SECTIONS USED 
AADCOM [R] , 
DISNAV [R/W] , 
FCCOM [R/W] , 
OUTCOM [R/W] , 


[READ (R) /WRITE (W) ] : 

BCKCOM [R/W] , CDUCOM [R/W] 
DLNCOM [R/W] , 

INPCOM [R/W] , 

RECCOM [R/W] 


DSTDAT [R/W] , 
IPLCOM [R/W] , 


CIOCOM [R/W] , 
DTCCOM [R/W] , 
NAVCOM [R/W] , 


description: inte ractive process used to examine and modify 

Ke C rla S d/wrlte}rivilege= = associated > a ^^t 

contained in appendix D. 



10 


Section 2.2 GLOBAL SECTIONS 

through°g!obaf sec^onsl 6 ^ G^obal^sect ion^ SyStem 

into the virtual address space of Several m ^°. ry wh:LCh are mapped 
FM/FC software each global sec?Ln consists o7 imageS ; In the 

program section following the standard ^ • reloca table 

Fortran common block. The 9 FM/FC softw!7 def ^ition of the VAX 
All but two, AADCOM and DSTDAT 14 gl ° bal actions, 

files which contain one common block definition aS Th F ° r - tran inc l ude 
are needed to provide the global s erf inn inc l u de files 

compiler when compiling the Fortran mnrinio^^u 8 t0 the Fortr an 
the FM/FC software . The other^ make U P most of 

assembly language files which are ^ ■ sectlons are macro 

object file containing f ^ t0 produce a " 

variables. The following is a list of hL fT? f ° r a11 common 
note on the type of mem0 ?y locations co„\a^f * 


AADCOM 

BCKCOM 

CDUCOM 

CIOCOM 

DSTDAT 

DISNAV 

DLNCOM 

DTCCOM 

FCCOM 

INPCOM 

IPLCOM 

NAVCOM 

OUTCOM 

RECCOM 


Navigation database 
Flight Management background data 
Control Display Unit data 
CDU input/output data 
Default recording list 
Output data to Displays MicroVAX 
Data link information 
I/O memory for aircraft DATAC bus 
Flight Controls data 
Formatted DATAC Input variables 
Data link information 
Navigation data 

Formatted DATAC Output variables 
Data recording variables 


by the b VAX ift^^ty r prog^am et BLKMAc aCb The ^ort rar/ 311 inc . lude file s 

ind?vidua?var S /a n bles th : t 1^ Ct c U Creates d ° define 3£ 

global symbol definitions are necessarv°to a?i 9l °v al symbols * The 
language modules efficient access to JfnhSi n °^ VAX macro assem bly 
file COMMON. FOR exists solelv for^TKMac 1 section variabl es. The 
'Block Data' module which ThlS file is a Fortran 

template files and also contains initiaTiT*^ *7® global section 

of the global section variables BLKMar 10n sbaten Jf. nts for some 
creates an object file for sa eh ‘ BLF MAC reads this file and 

The ob?ec7 files created bv bl ° Ck . refer ^ced within. 

SECTION which is used to create ol^bSi a 7 V ^ int ° the P r ° 9 ram 
interactive program that alfow? f- 9 h ° b se ftions. SECTION is an 
delete the globll section! Gloha? • t0 create ' afresh, or 

th e !t Or s7c7l f 0 O N e wi a iT issued itlU 1 Jffif f ^reT^ s^rtlT^ 

sections which are currently in use by appU^^ns^oft^e 910 ^ 


11 


, 4- Dr-nreed with or abort the deletion. If the 

user may choose top * VAX/VMS operating system removes the 

delete is not aborted, ti table but does not free the 

sections from its g image mapped to the sections has 

exited 31 ThTs^in^^^'ec^ha^s^ global sections to private 

sections. . . _ rrp<?s to t he global sections through 

Executable img f a m0 dule MAPCOM on startup. MAPCOM 

;rs;i> th a db s 

SSSSg»-“£ Creates 0& 

filirand^PTBL.MAR used in linking each executable image. 



12 


Section 2.3 INSPECTING GLOBAL VARIABLES WITH VIEW 

the VM%L r b!r a Lc\\ E on S i Vf?n1>d t0 foTniTht an stfr dify variable = in 
utility the global sections must have hi. s0 “ ware - To use this 
using the utility SECTION The view lnsta ii e< i previously 

header lines and twenty lines fo/ the SCreen con tains two 

the diagram on the next page) The first variables (see 

version number of VIEW, thl flight svstem d J r ^ lne con tains the 
was linked, and the date of the fMoht- * de " tlfler to which VIEW 
second header line shows which Jf the four mi?*hf ne J- ation - The 
is currently being shown. The display i * til llab f e display pages 
number on the left side of the display eac * have the line 

on the display line, three additional * fiSrig variables are placed 
line number. First the format code for Vh* ^ • Sh K ° 1 wn after the 
This tells how many bytes of data ,1 ^ variable is shown, 

and how the binary values interpret £5 “V* 1 ? Selected variable, 
value of the variable. The last part of MS h°" f he line is th4 

th2°Un“ Ve latel “““ t0 identify*^ he 

a flight system. 8 P VIE^li^ediately promptT f ° account containing 
password is used to determine the y reS?/TiH «■ for a .Password. The 
grants to the various global thab VIEW 

privileges for users with no password Tho Z' l maintains default 
is gained by simply entering a carriage' % default entry into vi ew 

usees. Refer to a PP e„d ix 


13 


VIEW 

1 

2 

3 

4 

5 

6 

7 

8 
9 

10 

11 

12 

13 

14 

15 

16 

17 

18 

19 

20 


[V5 . 1 ] : FM/FC BASELINE 12-FEB-1991 
Page 1 

1.2 0 MAXF 

H . 2 0020 FCFLGS 

F . 4 -13.1027 ROLL 


->ARRAY (16) /F=F. 8/R=2/L=6 


FIGURE 2.1 



14 


Section 2.4 STARTING AND STOPPING VAX FM/FC SOFTWARE 

There are 12 files needed for a complete FM/FC software 
system. These include the seven executable images described in 
section 2.1 and the following five files used to manage the 
execution of the system. 

RUN . COM 

This command procedure is used to start the FM/FC software. 
First it checks to see if an old set of log files is open (see 
section 2.5) and closes them if necessary. The utility program 
SECTION is automatically run next to allow the user to install or 
refresh the global sections. Finally the sub processes are spawned 
and exception log files opened by calls to GO.COM. 

GO . COM 

This command procedure opens the process exception log file 
and starts the executable image. It is called once for each of the 
four FM/FC software processes. 

HALT . COM 

This command procedure is used to properly terminate the VAX 
FM/FC software. The first thing it does is close the exception log 
files and delete all but the latest three versions of each. Since 
the log files are process permanent files, the logical end-of-file 
mark is forced to the physical end-of-file. All three sub- 
processes are terminated with the DCL STOP command. Finally the 
user is given the opportunity to select automatic removal of the 
installed global sections. 

GBLNAME . DAT 

This information file is used by the utility program SECTION 
as a reference to the names of all defined global sections. This 
file is also used when creating the software system. Refer to 
appendix E for its role in the system build. 

SH0W_L0G . COM 

This command procedure is used to review the current exception 
log files while the system is active. Section 2.5 (condition 
handling) has complete information on the log files. 

Once logged into an account containing the aforementioned 
files the user may start the FM/FC software by entering "@RUN" at 
the console terminal. The user is immediately prompted by SECTION 
to choose between installing the global sections or refreshing a 
previously installed set of global sections. Finally the utility 
program DSTAR is automatically run to initialize the default data 
recording list. At this point the standard DCL '$' prompt is 
issued and the console terminal may be used for DCL commands and 
running utility programs while the FM/FC software executes. 


15 


Section 2.5 CONDITION HANDLING 

Numerous types of exceptional conditions may occur on a 
VAX/VMS system. These can be both hardware and software faults or 
traps which occur when the system detects a programming error. 
Without outside intervention, the VMS operating system takes 
predefined actions through the default system condition handler. 
User defined condition handlers may be defined "further up the 
stack" to intercept exceptions before they reach the system 
condition handler. The FM/FC software has defined a condition 
handler to perform special operations for several commonly 
occurring exceptions. 

The system operator is notified of the occurrence of 
exceptions in several ways. Each process has an exception counter 
defined in one of the global sections (HDLCNT , FMCNT , FSTCNT, 
SLWCNT) . These variables contain the total number of exceptions 
that have occurred in each process since the system was started. 
The utility program VIEW can be used to monitor the counters. For 
most exceptions an explicit notification is given at the time it 
occurs. The notification consists of a brief message sent to the 
system console terminal and a detailed description of the exception 
placed in the process's log file (FMFAST.LOG, FCFAST.LOG, HDL.LOG, 
SLOW.LOG) . To eliminate unnecessary I/O, the terminal and log file 
notification will only be made once every fifteen seconds for a 
repeated exception. A repeated exception must have both the same 
error code and originate from the same machine instruction. 

Following is a list of the exceptional conditions handled by 
the FM/FC condition handler. Any other exceptions signaled to the 
FM/FC condition handler will simply be resignaled to the default 
system condition handler after the terminal and log file 
notifications have been posted. 

(software traps from VMS math library) 

MTH$_SQUROONEG - The square root of negative value error forces the 
math - library function return value to be zero. No exception 
message is posted for this error. 

MTH$ * - All other math library exceptions also force the function 
return value to zero. Terminal and log file notification are given 
for these. 


(hardware faults) 

SS$_FLTOVF_F 

SS$ FLTDIV F - These faults are modified to simulate their 
corresponding traps since continuation of the applications software 
after the fault cannot be done. VMS resignals the FM/FC condition 
handler with the new trap. Note that the exception counter will be 
incremented twice because of this action. 



16 


ss$ RO p RAND - This fault occurs when floating point data contains 
an rilegai binary code. There is only one undefined floating point 
bit pattern: the sign bit set and all other bits clear (-0) . The 
reserved operand is changed to a value of zero and the instruction 
is restarted. 


(hardware traps) 

SS$_FLTOVF 

SS$-FLTDIV 

SS$_INTDIV 

INTOVF - These traps are reflected in the exception counters 
and posted on the terminal and in the log file. The applications 
software continues afterward with the following instruction. Note 
that the integer overflow exception currently cannot occur in the 

software since the detection is disabled by the Fortan compiler 
switch /NOCHECK. oumpner 


17 


Section 2.5.1 EXCEPTION LOG FILES 

Exception messages are saved in log files defined for each 
orocess (HDL . LOG, FMFAST.LOG, FCFAST.LOG, SLOW.LOG). Inactive log 
files may be viewed with DCL commands such as TYPE, COPY, or PRINT. 
When the FM/FC software is executing, the active set of log files 
are accessed with the SHOW_LOG.COM command procedure. There are 
three forms available for use. 

0SHOW_LOG <process_name> 

@SH0W_L0G <process_name> ALL 
@SH0W_L0G <process_name> SINCE 

The "ALL" form will display on the user's terminal all exceptions 
posted in the file, which is empty when the software system is 
started The "SINCE" form shows the user the exception messages 
costed since the last time the particular log file was referenced 
by 0SHOW LOG. The first form is equivalent to the "SINCE" f ° rm * 

Each exception message in the log file consists of a header 
with the current MicroVAX date and time, followed by the aircraft 
Greenwich Mean Time (GMT) . Next appears the VMS exception message 
followed by a traceback of the call sequence. 



18 


Section 3.0 I/O COMMUNICATIONS 

i-*om»r. In orc * er f° r FM /FC application software (FMFAST, FCFAST stow 
DSTAR, etc.) to function correctly, real-time data fromexternai 
sources must be input, and processed data must be output fn a 

HDL? hr ° nlZe d manner - Thls ls the responsibility of the process 

HDL initializes system resources to allow external T/n 

l?FAS? anS 1S sS erna HDL /0 'ai a so %° °°^ ro1 V* sub P«,ces ses 
rccAbi ana SLOW. HDL also formats I/O data to/from t-hocl 

processes. The executable image HDL. EXE is activated either in the 

context of an interactive user or the context of a subprocess of an 

interactive user which has been created using the d?L spawn 

command. Upon activation HDL raises its priority into the real- 

switching° n ^^w^l disables ^antum expiration context 

switching. HDL will then use system context to confiaure t/o 

channels for DMA with external devices (DATAC, Displays MicroVAX 

i?i? r ; Pr ° CeS S° r f in *' . etc) • The subprocesses FMFAST and FCFAST 
will be synchronized into a 50 millisecond frame by HDL using an 
interrupt from the DATAC. The DATAC will also supply a 10 
millisecond clock for synchronization of DMA I/O. This I/O data is 
formatted for use by the FM/FC application software by HDL 


19 


MODULE NAME: 
FILE NAME: 
PROCESS: 


HDL 

HDL . MAR 
HDL 


PURPOSE : St S.™ C r C J/o‘° |nd°“ tT te c r o n ntrol /0 ' the 

subprocesses FMFAST , FCFAST, and SLOW. 

CALLED BY: VMS 

calls N to^ EQUENCE: iniom? iofll, lock, MAPCOM. OUTIOM, PCK_IO 

DESCRIPTION: t ied w ith, and has been written 

This module is very internal architecture. As 

around, the ° f of %MS in particular those portions 

such, an understan g et-mrture and the internals of VMS I/O, 

reiating to virtual memory ^~ ctu t ” ^Sdology used in the 
will be required to ™ I/O This understanding may 

configuration of tt.. ^ ^cementation set (in particular 

be obtained from the standard v ' support, paying particular 

VMS Version 5, Volume and connecting To An Interrupt 

ss 

comments" 01 ^ The ^olufe^HDL Contains four functional parts. These 
include : 

I.) initialization code 
II.) Main loop processing 
HI.) Kernel mode routines used in initialization 

IV.) Connect to interrupt routines 
The following describes each: 

1.) initialization code - This code performs the following 


A. ) 


B.) 


C.) 


Assign a channel to the default terminal so 

that any error messages p 0 ri 

Also assign a channel to theJXAS ser P. nR 
which is used for pacjcet 

communication . 

Declare an exit handler which will remove all 
created subprocesses and set process p 
back to level 4. 

sot process priority 

will ? disable any quantum expiration context 
switching. 



20 


calling ^LOcT W °f ^ Set *>y 

possibility of paae fau?Mn« V • reduce the 
execution. P 9 faultin 9 during main loop 


E.) Assign a channel number to each of f ho 
following devices: acn of the 


1.) 

XAAO 

- DATAC DRV11 

2.) 

XABO 

~ IPL DRV11 

3.) 

XADO 

~ CVIU DRV11 

4.) 

KWAO 

- KWV11 


H.) 


E. ) Call MAP COM to niaD 4-/. ..u 

sections. P the squired global 

Ss“;HvS ?r“ “™ 

reference specific physical i*l p t . r ° Cess t0 
virtual addresses. pnysical locations v la 

vfrL^reris b^ft ^a^ 

-S35 Ulsters in du^"? h 

in Je r ct?o„ S 3 a belo 0 u UtineS - TheSe are disc ^ 

I ‘ ) eveSt^flL? COmm ° n 6Vent flag duster. These 

the fliahf 9 a us ? d for synchronization of 
light application processes. 

J -’ DS f T« e at la ?rI T oriIy P levlf i/T " th * P ™ 

--- - --os; 

K. ) Connect to interrupt vectors a „„ 

interruof vectors. A connect to 

four nfJii , S u executed for ea ch of the 
IT™11 and the KWVU devices. This 
establishes connect to interrupt init start 

Jt e , rrUpt , . Service ' and cancel roitinls^ 
discussed in detail in section 4> routines as 

L. ) Initialize output variables for walkina hit 

sawtooth ramp, and control mode panel outputs! 

M>) enabled mil lisecond interrupt, then 

enable 10 millisecond clock and start main 


21 


loop software. 

tt ^ Main loop processing. Main loop processing begins by 
•.•L f?r Either a 10 or 50 millisecond interrupt. Upon 
waiting for eit occurred. HDL will either execute manor 

determining , which “te«upt occvrrea^ ^ ml llise00nd interrupts , 

?espe«ively l Major and minor frame processing is described below: 


A. ) 


B.) 


Major frame - Major frame processing begins 
after a DATAC 50 millisecond attention 
interrupt. This occurs in minor frame 4 
several milliseconds before the minor frame 0 
interrupt. The minor frame counter variable 
MFRAME is set to a -1 during this interva . 

HDL will, at the beginning of a manor frame: 

1. ) Read the data necessary for 10 millisecond 

processing . 

2. ) Format 10 millisecond input data by calling 

IN10M . 

3. ) Format 10 millisecond output data by 

calling OUT10M. 

4 ) Output 262 words (112 words for effector 

data plus 150 words for data recording) in 
OUTCOM to the DATAC SIR. This includes the 
10 millisecond output data. The 

corresponding hexadecimal SIR addresses 
are from 390 to 496. This data was loaded 
in the preceding major frame by the process 
FCFAST using the subroutine OUTIO. 

5 ) Read 587 words of raw data from the DATAC 

SIR via DRV11 into DTCCOM. This includes 
hexadecimal SIR addresses IB through 266. 

6.) Format input data for _ use by fl ^£t 
application software, using IOFLL, into 

INPCOM. 

Upon completion of I/O, HDL will set event flags 64 
and 65, Enabling FMFAST and FCFAST to execute 

frame . 

Minor frame - There are five m i nor ^ rame ® 
major frame (minor frame 0 thru 4 1 . M 
frame zero begins with the first 
millisecond interrupt after the 50 *^];^ond 
attention interrupt. Each 10 m ^l lis 
interrupt will signal the beginning of the 
next minor frame. HDL will perform the 



following processing at the bpoinn^^ « 
specified minor frame: be ^nnmg of the 

1 ' > asTt ' N ° 1/0 is Performed here, 

s it was done at the beginnina of i-hl 

interval ) r f me <dUri " 9 «» 9 HFR& ° f . ‘D? 

21 three functions:' ™ S fra, " e consists »t 
the DA 0 TAC i SI 1 R SeCOnd inPUt daCa ls tead from 

bi , IN 1 10M n ! niiSeCOnd input data is formatted 

c.) Data for 10 millisecond outout i <s 
formatted by OUTIOM. tput is 

b.) 10 millisecond output data i? 

to the DATAC SIR. 1S written 

3. ) Minor frame 2 - Identical to minor frame 1. 

4. ) Minor frame 3 - This frame is the same as 

SJspLy vlTinte " ith the additio " of thl 
display VAX mterprocessor link as follows: 

t ^insfer ?<f d for the interprocessor 
, er 1S loaded into the DRV11 data 

This S oo r /°- r readin 9 by the display VAX 
This count is negated if the transfer does 

th! send the active navigation buffer For 
politfve^ bUff6r the is left 

b.) The address for the buffer to be qent 
register^ int ° th ® DRVU buffer ' s address 

C.) The transfer is initiated. 

5 ' ) min« frame 4 , " This trame is the same as 

CvJS^/o^aT fili^f tHe additi0 " <* bbd 

tel d f T r h om rt the n cvTu* ° f keyb ° ard input ard 

b.) The number of words of screen 
information to be sent to the CViu ?s 
loaded into the DRVll data register for 


23 


III.) 


IV.) 


reading by the CVIU (zero words is a 
possibility) . 

c. ) The transfer is initiated. 

d. ) Keyboard input data is unpacked by the 
routine KEYBRD. 


Kernel mode routines - These subroutines are called from 
the initialization software with the $CMKRNL system 
service. This code must run in kernel mode in orde £ 
reference the privileged registers PR$^P0BR (PO base 
register) and PR$ POLR (PO length register) . These 
registers are needid in order to calculate the virtual 
address (in SO space) of the DMA buffer s page table 
entry. This value is used in loading the Unibus adapter 

mapping registers. 

Connect to interrupt code - There is one connect to 
interrupt $QIO per device. A connect to 

has four associated parts - initialization, start, 
interrupt service, and cancel. These four par s ar 
doubly mapped both in process PO space and in ™ole 

space allowing them to run in system context The role 
of each in this application is described below. 


A.) 


B.) 


C.) 


initialization - The only function this part 
has at present is to store the system mapped 
address of the device register block. w ^ 11 ^ e 
not used at present, this could be used to 
control a device's registers from another 
device's ISR, should the need arise. 

Start - The start routine is used to load the 
Q-bus adapter mapping registers with the 
physical address of the DMA buffer. This 
loading is achieved using the system routine 
IOC$LOADUBAMAP , which uses as input tne 
virtual address of the buffer's page 
entry (computed in the kernel mode routines 
described above) . Connect to interrupt start 
routines normally run at IPL 6, but since the 
allocation and loading of mapping registers 
requires an IPL of 8, the IPL is raised at the 
beginning and then lowered back to 6 before 
exiting . 

Interrupt service routine - This code 1S 
executed when an interrupt is delivered from 
the associated device. Generally, the o y 
function this has at present is to clear the 
device's CSR and optionally set an event : 
Whether an event flag is to be set after an 



24 


interrupt is specified as an input flag to the 
connect to interrupt Sqio. Presently, the 
devices which will set an event flag are t-ho 
KWVU (event flag 4, the 10 millisecond c!oc£? 
and the DATAC DRVU (event flag 5 , the 50 
millisecond attention interrupt) . u 


u.) 


GLOBAL INPUTS 


cancel - 


This code is executed at the time of 
process termination, and is used to release 
mapping registers that had been allocated 

MODCNT 


GLOBAL OUTPUTS: (in aoUule GPSPKT.MAK,, „ dlcnt , 

send_b6f, iomait otucn? - ' - NZ ' act ~cnt, act_buf. 


25 


MODULE NAME: 
FILE NAME: 
PROCESS: 


HDL_MESG 
HDL_MESG . MAR 
HDL 


PURPOSE: Contains error messages used by HDL 


CALLED BY: Non executable 

CALLING SEQUENCE: Not called 
CALLS TO : None 


to the default terminal of the process HDL. 


GLOBAL INPUTS: N/A 

GLOBAL OUTPUTS: N/A 


In the 
output 



26 


MODULE NAME: 
FILE NAME: 
PROCESS: 


IOFLL 

IOFLL.MAR 

HDL 


PURPOSE : 


To format 50 millisecond DATAC <;tr . . 

INPCOM. SIR DMA input data into 


CALLED BY : HDL 

CALLING SEQUENCE: JSB IOFLL 
CALLS TO : None 

DESCRIPTION: 

large block input from°the DATAC 3 ^°It f i rame imme diately following a 
raw input data into a foT^ e r 6 / 01 forraatt ^ 

software. IOFLL stores formatted input^S intoTOC^ 11 ^ 1011 

IOFLL uses the following programmer defined macros: 

1 ‘ ) k^ LX - F ~ J* 111 scale ' bias, and/or bit shift a 16 

Hes^V fl *°**** 9 poi™ and e ?tore a the S Ksuft e at 

a destination pointed to by R0. result at 


2 .) 


3.) 


4.) 


5.) 


6 .) 


7.) 


SSfo,SB ^ Points t U o rC b e y ^ 

S, ' scales^and Stores 

SS?tl4 tailored for use in 

sets L thP l e nni S the s P ecified bit in R2 and, if set 

boolean e i^°cieared.° inteCl t0 by R °‘ Otherwise ^4 

clear 2 wi T f StS _ specified bit in R2 and, if 
clear, will set the boolean pointed to bv nn 
Otherwise the boolean is cleared y °* 


GLOBAL INPUTS: 


DTC_IN, MAGYAR 


GLOBAL OUTPUTS: All variables in INPCOM plus ALTATT 


(in DISNAV) 


27 


MODULE NAME: IN10M 

FILE NAME: INI OM. MAR 

PROCESS : HDL 

PURPOSE: To format 10 millisecond DATAC SIR DMA input data into 

INPCOM. 


CALLED BY : HDL 

CALLING SEQUENCE: JSB IN10M 
CALLS TO: None 

DESCRIPTION i 

IN10M is called at a 10 millisecond rate to format 10 
millisecond raw SIR input data into floating point format for use 
ky flight application software. This formatted data is written 
into INPCOM. 

IN10M uses the following programmer defined macros: 

1. ) SMPLXF - Will scale, bias, and/or bit shift a 16 

bit input integer source operand as specified, 
convert to floating point, and store the result at 
a destination pointed to by R0. 

2. ) ASMPLX - Similar to SMPLXF with the addition of a 

validity bit test preceding the conversion. Result 
is stored at the address specified in R0 . 

3. ) FILTF - In addition to converting and scaling, the 

input value is filtered. 

GLOBAL INPUTS: DTC_IN 

GLOBAL OUTPUTS: BMACIN, HDD, P, Q, R 



28 


MODULE NAME: GPSPKT 

FILE NAME: GPSPKT. MAR 

PROCESS: HDL 


PURPOSE : 


To format differential GPS data radio uplinked from the 
ground. 


CALLED BY : HDL 

CALLING SEQUENCE: JSB PCK_IO 
CALLS TO : NONE 


DESCRIPTION: 

This module receives radio uplink data containing differential 
correction values needed by the GPSSU for its differential GPS 

valu * s are received serially, checked for errors, 
formatted into the form needed for output, and loaded for output to 
DIFF The DIFF then sends this information to the GPSSU via an 
ARINC 409 channel. In addition, GPSPKT contains code to output an 
initialization stream to the Packet Terminal Node Controller (TNC) 
This sequence win be serially output to the TNC if the bottom bit 
of the variable PKT_CMD is set. 

module declares the global symbol PACKET RD LST which is 
modified by the module HDL. ~ — 


GLOBAL INPUTS: PKT_CMD, RETRY, PKT IN 

GLOBAL OUTPUTS: GPS_OUT, HDL DATA 


MODULE NAME: 
FILE NAME: 
PROCESS : 


OUTIOM 
OUTIOM . MAR 
HDL 


29 


PURPOSE: To format 10 millisecond output data from OUTCOM for DMA 

to DATAC SIR. 

CALLED BY : HDL 

CALLING SEQUENCE: JSB OUTIOM 
CALLS TO : None 

DESCRIPTION: 

OUTIOM is called at a 100 Hertz rate (10 millisecond interval) 
before each output of 10 millisecond SIR data. It is used to 
format floating point data from flight application software into 
fixed point data and store that data in DTC_OUT for output. 
Primary outputs are the aileron; elevator; rudder and throttle 
commands (AILCMD, DECMD, RUDCMD and APCDG) . 

OUTIOM uses the programmer defined macro FLOAT which will 
scale a floating point value pointed to by R0, convert it to 16-bit 
integer and store it at the destination specified in the macro 
call. Each of the primary surface commands (AILCMD, DECMD and 
RUDCMD) are output to two separate SIR memory addresses (separated 
by a fixed interval) to drive the A and B servo channels. External 
hardware compares the two outputs and completes the link to the 
servo system iff the two commands are equal. The FLOAT macro 
performs both outputs from one call if a final 'D' parameter is 
coded. The above describes all processing performed for the rudder 
and throttle commands (RUDCMD and APCDG, respectively) . 

The aileron and elevator commands are more complex in that the 
rate damping signals (P and Q, respectively) are summed with the 
basic command at the 100 Hertz rate by OUTIOM. Additionally, each 
of these commands is provided with a test mode which allows an 
operator to command the output of a specified fixed surface command 
for a specified period of time. The desired output command (KDECP) 
is specified in integer form at the output scaling, and the time 
(KDECT) is specified as the (integer) number of 10 millisecond 
iterations. To treat the simpler surface first, the vertical 
control law inner loop creates a nominal elevator command without 
pitch rate damping (DECMQ = DECMD Minus Q) at the 20 Hertz rate. 
It also computes the 16 second lagged Q output QX. QX approximates 
the pitch rate gyro bias and Q - QX the true pitch rate. In the 
present software, DECMD is only output to the B channel. The A 
channel has been fitted with hardware pitch rate complementation 
and receives DECMQ and KQ, the gain to be used for Q. (Q is not 
applied to either channel if a fixed value is to be output) . 
OUTIOM performs the following computations: 



30 


if (KDECT > 0) then 

DTC_OUT (31 ) = KDECP 
DTC_OUT (43) = KDECP 
DTC_OUT (37) = 0 
KDECT = KDECT - 1 

else 

R1 - Q ~ QX 

DECMD = DECMQ + KQ*R1 

DTC_OUT ( 31 ) = INT (102.4 *DECMD) 

DTC_OUT (43) = INT (102 . 4*DECMQ) 

DTC_OUT (37) = INT (204 . 8*KQ) 

endif 

Roll rate (P) complementation of the nominal aileron command 
(AILCMP) to produce the actual aileron command (AILCMD) is also 
performed in OUT10M. Roll rate is not debiased as pitch rate is, 
but rather passed through a 50 msec lag filter to produce PF1. 
Depending on control mode and the bits specified in LATSEL, AILCMD 
is either passed through a rate limited lag or simply complemented 
with the lagged roll rate. The following computations are 
performed. 

PF1 = KTPFL* (PF1 - P) + P 

if ((mode = CWS) and ((LATSEL and '100'X) 0)) then 

R2 = AILCMP + KP*P - AILCMD 
R1 = R2* (1 . - KTAUPF) * KAILG 
(Where KAILG = 1.0) 

If (R1 > ALRTLM) then 
R1 = ALRTLM 

elseif (R1 < -ALRTLM) then 
R1 = -ALRTLM 

endif 

R1 - limit ((Rl + AILCMD), 12.) 

AILCMD = Rl 

6 1 S6 

AILCMD = AILCMP + KP*PF1 

endif 

if (KAILT > 0) then 

DTC_OUT (29) = KDECP 

DTC_OUT (41) = KDECP 
KAILT = KAILT - 1 

6 1 S6 

DTC_OUT (29) = 102. 4* AILCMD 
DTC_OUT (41) = 102 . 4*AILCMD 

endif 

GLOBAL INPUTS: AILCMD, AILCMP, ALRTLM, APCDG, DECMQ, KAILP, 

KAILG, KAILT, KDECP, KDECT, KQ, KTAUPF, KTPFL, LATSEL, 
MODEX, P, Q, QX, RUDCMD 

GLOBAL OUTPUTS: AILCMD, DECMD, DTC_OUT, KAILT, KDECT, PF1 


31 


Section 4.0 EXECUTIVE SOFTWARE 

The four FM/FC VAX applications processes each have main 
modules which are entered directly from VMS when their respective 
executable images are started. The executable image HDL is covered 
in section 3.0 and will not be mentioned again in this section. 
The processes FMFAST, FCFAST and SLOW each have main modules which 
are described in the following pages. 

Main modules contain operations to set up and initialize items 
which effect the entire process in which they reside. They also 
serve as a caller of subroutines which perform the actual 
computations for Flight Management, Navigation, Guidance and Flight 
Controls . 



32 


MODULE NAME: 
FILE NAME: 
PROCESS: 


FMFAST 
FMFAST . FOR 
FMFAST 


PURPOSE: To serve as the executive routine for the Flight 

Management fast loop processing. 


CALLED BY: DCL SPAWN 

CALLING SEQUENCE: N/A 

CALLS TO: ACCPRC, ASSIGN, CDUFST, GPSPRC, HNAVFS, HVGUID, 

MAPCOM, MLSEX, NAVIG, TGUID 


DESCRIPTION: 

This module serves as the executive for the FM fast loop 
processing. It invokes the VMS system service SYS$CMEXEC to call 
the LOCK utility to lock the PO working set in memory. If any 
errors occur while attempting this operation, a message is 
displayed on the system console and the process stops. The next 
initialization activity is to associate to cluster #2 event flag 64 
for communication with the I/O executive. Once again, if any 
errors occur during this process, execution is terminated. MAPCOM 
is then called to link the FMFAST process to the appropriate global 
sections. The address of the current DAS time is placed in a 
variable (TM_ADR) to be used by an exception handler for the ATOPS 
flight software processes. This handler is activated via the 
LIB$ESTABLISH VMS system service. Next, SYS$ERROR and SYS$OUTPUT 
are assigned to the appropriate unit for the display of run-time 
error and informative messages. The final initialization 
activities are setting the cold start (COLDST) variable true and 
clearing the timer overflow indicator (FMOVER) . 

At this point the VMS system service SYS$WAITFR is invoked to 
wait for the setting of event flag 64 from the I/O Handler which 
indicates that data has arrived from the DATAC and foreground 
processing can begin. Once received, this flag is immediately 
cleared and the FM foreground modules are called in the following 
order: CDUFST, ACCPRC, MLSEX (if RUNM is true), GPSPRC, NAVIG, 
HNAVFS, HVGUID, and TGUID. 

The final activity of FMFAST is to read event flag 64 again. 
If it is set at this point it indicates that a timer overflow has 
occurred (since data must have arrived from the DATAC prior to 
foreground processing completion) and an overflow flag is 
incremented accordingly. In any event, processing continues by 
returning to the activities described in the previous paragraph. 

GLOBAL INPUTS: HRSS, RUNM 


GLOBAL OUTPUTS: 


COLDST, FMCNT, FMOVER 


33 


MODULE NAME: 
FILE NAME: 
PROCESS: 


FCFAST 
FCFAST . FOR 
FCFAST 


PURPOSE: To serve as the executive routine for the Flight Controls 

fast loop processing. 

CALLED BY: DCL SPAWN 

“o SEWENCE: ASSIGN, ATHCL, DASOT, DATSEL, DINUSE, DISFD, 
CALLS TO. DSPOT, ELEVP, FDSTR, F2CMP, LATCMD, LATRL, 

MAPCOM, MLOG, MSPLGC, MSPRO, PANEL, PRFLT, 
SINUSE, SNAP, SPDCMD, OUTIO, VERCMD 

DESCR ihIs°module serves as the executive for the | FC fast loop 
processing. It invokes the VMS system service SYS$CMEXEC to call 
the LOCK utility to lock the PO working set in memory. If any 
errors occur while attempting this operation, a message is 
displayed on the system console and the process s £? p ®* ” 65 

initialization activity is to associate to cluster #2 event flag 
fo^ communication with the I/O executive. Once again, if any 
errors occur during this process, execution is terminated. MAPCOM 
is then called to link the FCFAST process to the appr< opr 1 ate < Jlobal 
sections. The address of the current DAS time is ^ 

variable (TM ADR) to be used by an exception handler for the A 

flight software processes. This ^^ le g YS 1 $ g R ^ 1 3nd e SYS V $0UTPUT 
t tu^f^tablish VMS system service. Next/ SYS$ERROR ana o v 
arf assigned to the Y appropriate unit for the display of run-time 
frror and informative messages. The final initialization 

activities are setting the cold start <COLDST)^ variable true an 

dearing the timer ^^^ys^em^eTvice SYS$WAITFR is invoked to 

wait for thl setting of event flag 65 from the I/O Handler, which 
i^ic^es^tU dat? h as 0 a c rrived ei f v r^ the^DATAC and ± foreground 

clearec^and the FC foreground modules are called (conditionaily) in 
followina order: DINUSE, SINUSE, DISFD, DATSEL, MSPLGC, MLOG, 

LATCMD, VERCMD, SPDCMD, LATRL, ELEVP, ATHCL, PRFLT, FDSTR, F2CMP, 

PANEL, MSPRO, DSPOT, DASOT, SNAP and OUTIO. __ ain 

The final activity of FCFAST is to read event flag 65 again. 
If it is set at this point it indicates that a timer overflow has 

; r „ J£ 

GLOBAL INPUTS: FCOVER, FLYFLG, FSTCNT, HOLDM, MAXF, MFRAME, 

MSWIT, RUNM, TIME, TOGIOO, WDTV 

GLOBAL OUTPUTS: COLDST, FCCNT, FCOVER, FSTCNT, MAXF, TIME, 

TOGIOO, WDTV 



34 


MODULE NAME: 
FILE NAME: 


SLOW 

SLOW. FOR 


PURPOSE: To serve as the executive routine for the ft • *«- 

Management slow loop processing. the Fll 9 ht 

CALLED BY: DCL SPAWN 

CALLING SEQUENCE: N/A 

CALLS TO: ASSIGN, BLOW, CDUEXC, EPRLMT 

HNAVSL, LOCK, MAPCOM, SNAPOUT 


ERAD, GMSG, 


DESCRIPTION: 

loop proc e m s°s d "ng e ^oVsUrt " “lal°ls ^OcT M SlOW 

sections for communication witl^the foreor^L a P proprl ste global 

and FCFAST) , The address of the current m ?i£°" SS ? S <FMFAST 
variable (TM ADR) to be ikph er y\ DAS time 1S Placed in a 

flight software processes This hanrtfa 0 " ■ handle ! r for the ATOPS 
LIBSESTABLISH VMS P system service »ert syssL® =V e ‘ a Che 
are assigned to the appropriate init for the d ? YSSoUT PUT 

error and informative messages ?L ?ina? P 
activities are the sett- inn nf , n . initialization 

(CDU INIT) and the assigning of the o^board^ • initializa tion flag 
test panel to the appropriate il " , }ard . hne Printer and system 

flight software faitS^mesJaaes^tSe n^? f0r . displa ^ of 

tables and snapshot data. 5 ' Printing of data recording 


that is exec” te^ 6 continuou sly ^n t i 1*" the* ^ S / S a . sequence of code 
code consists of a series o? calls tn K^ SySte ™ 18 halted - This 

in the following order: CDUEXC E^D^rt^w S °JJ^ are routines 

SNAPOUT (if I/O not active an H S ERAD, BLOW, EPRLMT, HNAVSL, 

GMSG (if I/O not active and dat??. ^S^or 

(COLDS?* anS* u4toti V1 the ^xcepTi on* comtiV'lSLWMH 1 '* S J art ,. fla9 
previously, processing continues by returning tn the l ■ Sta ^ ed 
described in the preceding paragraph. 9 to the activities 


GLOBAL INPUTS: HRSS, IOACT, RPTR, SPTR, WRDCNT 

GLOBAL OUTPUTS: CDU_INIT, COLDST, SLWCNT 


35 


Section 5.0 FLIGHT MANAGEMENT 

FLIGHT MANAGEMENT OVERVIEW 

The Flight Management routines provide for navigation, 
guidance and the ability to create and interact with the aircraft 
flight plan. The ability to inspect and enter information that 
affects the flight plan is provided through software that controls 
the CDU (Control Display Unit) and MSP (Mode Select Panel) . The 
look-up and usage of the system data base (Bulk Data) is done via 
the CDU. This software is described in the Advanced Transport 
Operating System (ATOPS) Control Display Unit Software Description, 
NASA Contractor Report 189606. 

The MSP controls the selection of the various modes of 
automatic guidance and — depending on the selected mode-- can 
control the position of the aircraft directly using the MSP knobs 
for airspeed, altitude, flight path angle and track angle. 
Navigation and guidance software is described in this section. The 
MSP interface software resides in the Flight Controls process and 
is described in that section of this document. 



36 


5.1 FAST LOOP PROCESSING: 


MODULE NAME: 
FILE NAME: 
PROCESS : 


CDUFST (CDU Fast Loop Processing) 
CDUFST . FOR y 
FMFAST 


PURPOSE ; 


Serve as executive for the fast loop CDU processing. 


CALLED BY: FMFAST 

CALLING SEQUENCE: CALL CDUFST 
CALLS TO : GET_REAL 

DESCRIPTION: 

software 3 i ^ r t'^ dU proce^s t, ^LOw] te /rfd C t h e >e f light** systems 9 real-time 

corresponding 7 to r lm^endent i CDu n functions n ^° f ^ io ^ 

tp< Th ® first section controls Navigation Display update reguests 
The variable GDTIME contains the time of the la^ 5£ eStS ; 

to d th by the fl . ight mana 9ement computer. This variable is compared 
*2™ h curren t system time, and if they differ by at least six 
seconds, an update request is made. Some CDU modules force a 
display update by storing a zero in GDTIME. An update reguest 
consists of setting the flag SEND_BUF to cause the I/O handler 

The°art, a? tran s m;Lt the guidance buffers to the display computer 
?£! t /n v, ^P date request flag MAPUPD is set on two frames after 

are complete Z€CpiBat tC> assure the guidance buffer transmissions 

. . Th ® map background of the Navigation Display is centered on 
Particuler reference points when it is placed in 'Plan m j , 

CDUFST stores the latitude and longitude of a reference noint wMnh 

l?an et rh rn ' lned by Current CDU modes - If there is an active fUght 

?heri ^ e n ma , P center win be the current destination waypoint If 
k ly A provislonal flight plan available, the reference 
fhiSa becomes the last waypoint on the flight plan, if neither of 

airf ield^i f atlSf y; eC1, the map center becomes the origin 
3 f lf selec f ed > or the current position of the aircraft 

variable* 1 SETC^T P ia ^ has been enabled, the sequence control 

variable SETGD is set to '2' to start the determination of the 

available guidance modes of the new flight plan. The code waits 
one complete real-time frame before setting the mode flags to 

t i 16 d ® mode/re - mode operations occurring while modifying a 
flight Plan do not occur in one real-time frame. After the wait, 

anCe T 393 arS S6t aS f °H° ws - '2D' guidance will b4 
allowed as long as the new flight plan contains two or more 

waypoints. If '2D' guidance is possible and each waypoint has an 
a i^? Ciat A d a l t i ltude constraint, '3D' guidance will be allowed. 

4D guidance is allowed when '3D' guidance has been verified, a 
speed constraint exists for each waypoint, and Reference Time of 

Arrival (RTA) has been assigned to one of the flight plan 
waypoints. ^ 


37 


The last section of CDUFST determines when a TOPMS run has 
completed. Once a TOPMS run has been initiated, the CDU portion 
will be forced to reset if the aircraft has accelerated to 64 knots 
and subsequently decelerated to below 20 knots. The run is also 
canceled if the aircraft wheel squat switch becomes false or the 
displays computer signals termination through the discrete word 
DISPST. 

GLOBAL INPUTS: ACTCNT, AIRPTS, CTRF, DISPST, GDTIME, GS, GUID2D, 

GUID3D, GUID4D, LAT, LATCEN, LON, LONCEN, MAPUPD, MODCNT, 
NAV64K, PMODE, RTA_PTR, SEND_BUF, SETGD, SOAT, SQUAT, 
TIME, TKFLEN, TOINDX, TOWD, TOWPT, TOWS, TST3D, TST4D, 
WPT_ACT, WPT_MOD 

GLOBAL OUTPUTS: GDTIME, GUID4D, LATCEN, LONCEN, MAPUPD, SEND_BUF , 

SETGD, SOAT, TKFLEN, TOINDX, TOWD, TOWS 



38 


MODULE NAME: ACCPRC (Accelerometer Processing) 

FILE NAME: ACCPRC. FOR 

PROCESS : FMFAST 

PURPOSE: To compute and debias the body mounted accelerometer 

inputs. 

CALLED BY : FMFAST 

CALLING SEQUENCE: CALL ACCPRC 
CALLS TO: SCOSD, MXV 

DESCRIPTION: 

This module computes the body to flight path vector rotation 
matrix (LMB) as follows: 

LMB (1,1) = CTHET*CDTK 

LMB (1,2) = SROLL* STHET *CDTK - CROLL*SDTK 
LMB (1,3) = CROLL*STHET*CDTK + SROLL*SDTK 

LMB (2,1) = CTHET*SDTK 

LMB (2, 2) ■ SROLL*STHET*SDTK + CROLL*CDTK 
LMB (2, 3) = CROLL*STHET*SDTK - SROLL*CDTK 

LMB (3,1) = STHET 

LMB (3, 2) = -SROLL*CTHET 

LMB (3, 3) = -CROLL*CTHET 

Where: SDTK = sin (DFTANG) , STHET = sin (PITCH), 

SROLL = sin (ROLL), etc. 

It then sums the bias terms (BIASBA) computed by MLSEX with 
the accelerometer input vector (BMACIN) to produce the debiased 
accelerations in the body axis (BMACC) , and rotates BMACC into the 
inertial vector (via a call to MXV) to produce ACCB. This vector 
is conditionally unpacked into XTKACC, ATKACC and HDD by other 
procedures (ELEVP, HNAVFS) . 

GLOBAL INPUTS: BIASBA, BMACIN, DFTANG, PITCH, ROLL 

ACCB, BMACC, CROLL, CTHET, SROLL, STHET 


GLOBAL OUTPUTS: 


39 


MODULE NAME: GPSPRC (Global Positioning Satellite Processing) 

FILE NAME: GPSPRC. FOR 

PROCESS: FMFAST 

PURPOSE: To compute GPS derived X, Y and Z position, and analogs 

of the glideslope and localizer deviation variables to be 
used for display and for the land control laws. 

CALLED BY: FMFAST 

CALLING SEQUENCE: CALL GPSPRC 
CALLS TO: MXV, SCOSD, SQRT 

DESCRIPTION r 

GPSPRC begins by examining the GPS status words (GRSSTx) , the 
GPSVLD discrete (set by IOFLL based on the input data validity 
bits) and the Horizontal Dilution of Precision figure (GPHDOP - 
input from the GPSSU by IOFLL) . This information is used to set 
the GPS Navigation Valid (GPNAW) and GPS select index (GPSSEL: 
0-bad, 1-poor, 2-good), used by the navigation algorithms, as well 
as the Satellites in view (SATINVW) and GPS receiver mode (GPSMOD) 
words, displayed for operator information. If GPNAW is true and 
other criteria are met, the GPS Land Valid (GPLNDV) is also set. 
If GPLNDV is true and GPS land is selected (GPLND true) , a bit is 
set in FCFLGS to cause 'GPS ON' to be displayed on the Nav Display 

unit. . . 

If GPNAW is false, the IRS North and East velocities are 

integrated into Hybrid Latitude and Longitude to keep these data 
current. Differences are then computed between the hybrid LAT, LON 
and ALT and the equivalent IDD and MLS quantities. Deltas are also 
computed between absolute GPS and IDD Lat and Lon. This data is 
for monitoring purposes only. 

If GPLND is selected, GPLNDV is true, LAND mode requirements 
are met and MLSMOD is false, then Hybrid LAT, LON and ALT are also 
differenced with MLS Azimuth or ILS Localizer antenna site LAT, LON 
and ALT. The resultant deltas are converted to runway coordinate 
X, Y, Z and passed through a second order filter to produce 

equivalents of the MLS XHAT, YHAT and ZHAT. This vector is then 
used to produce GPS derived equivalent values of the ILS glideslope 
(GPSBTA) and localizer (GPSETA) . Hybrid VN, VE, and HDOT are also 
rotated into the runway axes to produce equivalents of the MLS 
velocities, XDH, YDH and ZDH. Either an ILS or MLS type approach 
and landing may then be made, depending on the setting of the MLS 
configuration word (MCONF) . 

GLOBAL INPUTS: AIRPTS, ALTCOR, ANTLAT, ANTLON, COLDST, COSRH, 

CROLL, CTHET, DIFMOD, DLATFT, DLONFT , FLYFLG, GPHDOP, 

GPLND, GPNAV, GPS LAT, GPSLON, GPVDOP, GPSVLD, GRSST1, 

GRSST2, GSA, GUID2D, HDGTRU, HYBALT, HYBHDT , HYBLAT, 

HYBLON, I CM, IDDLAT, IDDLON, ILSZON, LANDR, LANDE, LMB, 
MCONF, MINSATH, MLSALT, MLSLAT, MLSLON, MLSMOD, MXHDOP, 
RUN, RWYHDG, RYELEV, SINRH, SROLL, STHET, TANGSA, VEINS, 
VNINS, WGSMSL, WPT_ACT, 



40 

GLOBAL 


OUTPUTS: DLALTM, DLLATA, DLLATM, 

DLTLAT, DLTLON, FCFLGS, GPBTAV, 
GPSBTA, GPSETA, GPSMOD, GPSSEL, 
LMB, SATINVW, XGPIP, XDH, XHAT, 
ZHAT 


DLLONA, DLLONM, DLTALT , 
GPINIT, GPLNDV, GPNAW, 
HGP IP, HYBLAT, HYBLON, 
YDH, YHAT, YPROF, ZDH, 


41 


MODULE NAME: MLSEX (Microwave Landing System (MLS) Executive) 

FILE NAME: MLSEX. FOR 

PROCESS: FMFAST 

PURPOSE: To calculate the aircraft position and velocities in the 

MLS coordinate system. 

CALLED BY : FMFAST 

CALLING SEQUENCE: CALL MLSEX 

CALLS TO: CFILT, CNTRM, CTLBLK, PFILT, PRINV, RSCON, UNPK, 

XFORM, XYZIN 

DESCRIPTION: 

Module MLSEX contains the computational routines which provide 
the MLS derived inputs to the Navigation, Display and Flight 
Control systems. It consists of a short executive portion and a 
series of subroutines called conditionally from the executive. All 
processing is under control of the MLS Configuration word (MCONF) , 
which is normally set via the VIEW utility. Among other things, 
this word determines whether MLS calculations are to be made and, 
if so, whether the real or simulated input data is to be used. The 
configuration control parameters are identified and described in 
Appendix C, as well as in NAVCOM.INC. 

MLSEX first checks for initialization conditions. If the MLS 
Compute discrete (MLSC) is false, or the Flight Controls IC button 
has been pressed or the MLS configuration word has been changed 
(MCONF not equal PMCONF) , The first pass flag (FPF) is set to force 
re-initialization when computations are next begun. The MLS valid 
discrete (MLSVAL) is then cleared and UNPK is called to unpack the 
upper six bits of the configuration word into the associated 
booleans . (The next two bits of MCONF affect only the usage of MLS 
parameters by other modules, and are unpacked in procedure MLOG 
when MLS mode is selected) . The MSB of the configuration word is 
then checked. If clear, or if LABFLG is true and ILSZON is false 
(simulation in the EASILY lab generates erroneous signals when 
outside of normal coverage) , MLSC and MLSVAL are cleared and 
processing ends. Otherwise, processing continues by checking the 
FPF flag. 

If FPF is true, subroutine RSCON is called to set up the 
airport and receiving antenna parameters according to the selection 
words RWYSEL and ANTSEL. MLSEX next calls each of the remaining 
subroutines in the order described below: 


CNTRM - 

Operate 

the validity counters; 

CTLBLK - 

Compute 

(CFRUN) 

the Complementary Filter Run counter 
and the solution validity (MLSVAL) ; 

PFILT - 

Operate 

the MLS signal prefilters; 

XFORM - 

Compute 

receive 

the rotation matrix LMB and rotate the 
antenna vector into the runway axis; 



42 


XYZIN - 
CFILT - 
PRINV - 

CFILT and PRINV 
GLOBAL INPUTS: 
GLOBAL OUTPUTS: 


Compute XYZ position from R, Az & Ell; 

Operate the XYZ Complementary Filter; 

Compute the predicted R, Az & Ell inputs for the 
next pass. e 

are only called when CFRUN is non-zero. 

CFRUN, IC, ILSZON, LABFLG, MCONF , MLSC 

BMAFLG, EL2F, MLSC, MLSVAL, RLMLS , SIMILS, VGSFLG 


MODULE NAME: 
FILE NAME: 
PROCESS: 


RSCON (Reset Constants) 

MLSEX . FOR 

FMFAST 


43 


PURPOSE: To set up the airport and receiving antenna parameters 

according to the selection words RWYSEL and ANTSEL. 

CALLED BY: MLSEX, HNAVFS 

CALLING SEQUENCE: CALL RSCON 
CALLS TO : SCOSD 

DESCRIPTION: 

RSCON is called by MLSEX on the first pass after MLSC becomes 
true, and by HNAVFS when MLSMOD is set true. This latter call is 
o take care of the case when Global Positioning Satellite 
navigation is selected into MLS coverage and some GPS autoland 
parameters might have been set up prior to selection of MLS mode. 
RSCON loads an entry of the RWYDEF array into the RWY_DEF vector 
according to the RWYSEL index, and loads an entry of the ANT_OFF 
array into the ANT_POS vector according to the ANTSEL index. 
RWYSEL values of 1 and 2 select definitions for runways at Wallops 
Island and Atlantic City, respectively, with a third entry 
reserved. ANTSEL values of 0, 1 and 2 select the tail, roof and 

chin antennas, respectively. The ANT_POS vector describes the 
position of the selected aircraft receiving antenna relative to the 
aircraft center of gravity, and the RWY_DEF vector describes the 
location of the Range and ELI transmitter antennas and the 
glidepath intercept point (GPIP) relative to the MLS Azimuth 
antenna (MLS origin), and the Lat, Lon, elevation and phase center 
bearing (AZ BRG) of the Azimuth antenna. 

RSCON also calls SCOSD to compute the sine and cosine of 

AZ_BRG ( SINAZB, COSAZB) . 

GLOBAL INPUTS: ANTSEL, RWYDEF, RWYSEL 

COSAZB, MCONF , RWY_DEF, SINAZB 


GLOBAL OUTPUTS: 



44 


MODULE NAME: 
FILE NAME: 
PROCESS: 


CNTRM (Counter Module) 

MLSEX.FOR 

FMFAST 


PURPOSE: To maintain a history of the MLS data validities anH t-ho 

complementary filter position limit exceedances. th 


CALLED BY : MLSEX 

CALLING SEQUENCE: CALL CNTRM 
CALLS TO: None 


DESCRIPTION: 

This module maintains a 128- cycle historv of rho „ a n j 

'xcT £ 

confistl oH F i 2 I-Eu' bU* strrSg A M B ?oig a wo?5” yS ‘ Thfasso^Td 
counter (MLSSVC, CFXCC) is updated only when the state 

cviif ity TH blt dif / 6rS fr ° m the ^ate of the history Mt for that 
?he previous 0 ?^ thUS indicates the num *>« of valid cycles out 
If the FPF or ICMLS flao is sot- an n 

Glared 65 a (FPF r ?a et t0 H their initial va ' lues and the ICHLS riag^s 
processing ‘^u^ V" 

Hlte^Ls ™ .tt r (CF r™ the "“Pl^entary 

(OTLERR) are computed as (MLSRAW - MLSS_PRED) . OTLIR 'v is 6 se^true 
set to 0UTLIR - LIM ' ~ a "“ MhSLSV is 

(MLSSVC^is^fpd^Vd*. 1 ^ Th^counte^valEe^s^then ctecfked" to seethe 
operate discretes, it MLSLSV is true, the foiTowfng rs pesfoLeS? 

o The appropriate bit in MLSS_HIST is set and, 
if previously clear, MLSSVC is incremented; 

o If MLSSVC is equal to 1 or 58, the 
corresponding IC_PF flag is set, indicating 
that some prefilter initialization must be 
performed. If equal to 58, the PF IC flag is 
also set, indicating that the prefilter for 
this signal has been fully initialized; 

° th ® validity count is >= 115, the PF CVAL 

ag is set to indicate that the corresponding 

XYZIN)^ 1S USable for P osi tion computation (see 


45 


If MLSLSV is false the appropriate bit in MLSS_HIST is cleared and, 
i t i # MLSSVC is decremented. 

If approp^ ^ valid (} ^ lsval is set by CTLBLK when CFRUN reaches 
200) , the following is performed: 


The prefilter validity (PF_CVAL) and PF_IC 
f2.ags are cleared when the associated counter 
becomes less than 18. 


The complementary filter exceedance counters 
and histories are updated. 


o 


If CF LIM XC is true (a limit has been 
exceeded) , the appropriate history is updated. 
If CF XC C then exceeds 70, CFXCV is set 
false, “which will subsequently cause MLSVAL to 
be lost. 


If CF LIM XC is false, the counter and history 
are updated. No further action is necessary, 
as CFXCV is set true during initialization, 
and can only be set false when MLSVAL is true 
and CF LIM_XC is also true. 


if MLSVAL is false, the PF CVAL flag is cleared when its 
associated counter becomes less than 100, the PF_IC flag is cleared 
co a nr i the I C PF flag is set at a count of zero. 

Finally, the history pointers (indices) are updated m 
preparation for the next iteration. 


GLOBAL INPUTS: CFRUN, MLSRAW, MLSSV, MLSVAL 


GLOBAL OUTPUTS: CFRUN, EX, OTLERR 



46 


MODULE NAME: 
FILE NAME: 
PROCESS : 


CTLBLK (Control Block) 

MLSEX . FOR 

FMFAST 


PURPOSE : 


To compute the CFILT Run 
Valid flag (MLSVAL) . 


counter (CFRUN) and the MLS 


CALLED BY : MLSEX 

CALLING SEQUENCE: CALL CTLBLK 
CALLS TO : VMG 


DESCRIPTION: 

initiaiization^of C the J MI^ Co^^e^n^itary W re( «ence, 

flMT" <CFRUN> ' and settlng o* the MLr valid discrete 

is cieai^cr^the'^^ML^flag 38 ! set^^the^ MLS 16 ^ 6 ^ ^ “ - Set ' 
FAIL2(9), set by F2CMP if any signai required bv ml' ■ f lag 

is cleared, and the procedure iViS S m • m f hli| 
processing continues by settinq the fr rnnn^uvl 1S clear ' 

discrete initially equal to the "Ld' of th^ i-h Valld (CF - CVAL ) 

valid flags (CFXCV) , the PF count fc ^ ree exce ^dance count 

(PF CVAL) and the 'NOT' of FAIL2 ( 9 ) 1 Th f ** 9 £ . f . or . Range and Azimuth 
(ALTREF) is initialized to zero ^ If T CF fA^i Lt V de reference index 
false (the aircraft is in the air) at tr \ s true and GRD is 

If the MLS 'X' position is greater than x HRSW^n^^ J s follows: 
ELI is primary and only; else HMn ifn - (part of RWY_DEF) , 

the default reference If ^ 

cleared, 

(IRS ^validity flags ^ii^the^RS AttitV"^- v* 1 Referenc e € Systlm 
or either IRSNav Vaiid u£w> or irs^* ^ (IATTV) is false ' 

as. a 

CF_CVAL is cleared. incremented - If this counter reaches 5, 

200. th4 CFRUN counter's # che'c)ce^ 1 Yf CFRUN^O^ 13 leSS tha " 
(causing the complementary filter \n h a CFR ^ , ICCF 1S set true 
less then 200, cVRuFis ILremen^eH K V^tiaiized) . if CFRUN is 

vector (EX) is less than 210 feet Once 6 CFRUN ^ b^rn ° f th6 e f ror 
200, MLSVAL is set true CFRUN becomes equal to 

to o . l i t c yg?£ ? ieared 

to force a complete reinitialization of thlsoiution SSt 

"SK, 

GLOBAL OUTPUTS: CFRUN, FAIL2, MLSVAL 


47 


MODULE NAME: 
FILE NAME: 
PROCESS: 


PFILT (Pre-filter) 
MLSEX . FOR 
FMFAST 


purpose: To prefilter the MLS input parameters. 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


MLSEX 
CALL PFILT 
None 


DESC ”efilter module us es alpha-heta^fUte^ to^ref liter the 

MLS in P ut . p . a ^ am ®cMLS flag 9 to determine initialization processing. 
OR'ed with the IC ” LS o f \ ag p ^spective prefilter is IC'd by setting 
If the result is true, the respec P and the next predicted value 

both the filtered °^tP u t val ( HAJ w) and the respective 

K and TaST (SEE 

cycle 8 on ly) ° are ^uT^^ estate (MLSS_DHAT) is 
3130 ^^initialization is to be performed, processing continues 

as follows: f .,, pr incut (TEMP) is the difference 

If MLSLSV is true, fl ^er input l v ' alue s. If MLSLSV is 

between the measured and predi Ts the difference between 

false and MLSVAL is true filter ^put^is^t^ ^ the 

me S asure d an values a're "selectively replaced by predictions derived 

Si f S52.nSS n 4SSi?SS u Sy when the input si9 " al 

” lid I«« is false , 

SS'-inKllil.S oT;L\T. fl The “olTowinu 9 e q uations are then 
evaluated: 

e HAT — MLSS P + ALPHA TEMP 

M rqo DHAT = MLSS _ DHAT + BETA TEMP 

- ”_HAT + MLSS_DHAT DELTAT 

Where: ALPHA and BETA are functions of the 

filter time constants. 

Finally, if MLSVAL ist^rue i \ * ^ he Measured value. 

?wr?rfvlnfs at the 1 pr a e filt-er lags from 

m?e? once that filter i^^^Vafue^ for OT Initialization and 

" erratlC - 



48 


GLOBAL 

GLOBAL 


INPUTS: MLSRAW, MLSSV, MLSVAL 

OUTPUTS : None 


49 


MODULE NAME: XFORM (Coordinate Transformation) 

FILE NAME: MLSEX.FOR 

PROCESS: FMFAST 

PURPOSE: To compute the MLS rotation matrix LMB. 

CALLED BY : MLSEX 

CALLING SEQUENCE: CALL XFORM 
CALLS TO: MXV, SCOSD 


DESCRIPTION I 

This module computes the 3X3 transformation matrix necessary 
to expand an aircraft body axis vector on the MLS coordinate frame. 
It tlso computes the vector ANT_VBC used by xyzin and PRINV, which 
translates the X, Y, Z position from the aircraft antenna position 
to the aircraft ceiter of gravity. The following equations are 

evaluated: 


1 

C0 Ca 

S<|> 

S0 Ca - 

1 

[LMB] = 1 

-C0 Sa 

-s<(> 

S0 Sa - 

1 

1 

S0 


— S(J) C0 


C<1> Ca C* S0 Ca + S<j> Sa I 

I 

C<1> Ca -C<|> S0 Sa + S<|> Ca I 
-C<|> C0 I 


Where: C0 = cosine (PITCH) , S<]) = sine (ROLL), etc; 

a = True Heading - Azimuth bearing + 180 

{ANT_VEC } = [LMB] (ANT_POS) 

Where : (ANT POS) is the X,Y,Z position of 

the MLS receiving antenna relative 
to the aircraft center of gravity 
(C.G. ) . 

GLOBAL INPUTS: AZ_BRG, CROLL, CTHET, HDGTRU , SROLL, STHET 

GLOBAL OUTPUTS : LMB 


50 


MODULE NAME: 
FILE NAME: 
PROCESS: 


XYZIN (R-Az-El to X-Y-Z) 

MLSEX . FOR 

FMFAST 


PURPOSE : 


To compute the position of the aircraft 
coordinate frame. 


in the MLS 


CALLED BY : MLSEX 

CALLING SEQUENCE: CALL XYZIN 
CALLS TO: SCOSD, SQRT, TAN 


DESCRIPTION: 

the°switch n ALTREF° ne ° f th * •» Ending on 


ALTREF 


0) range, azimuth and radio altitude data 

1) range, azimuth and elevation 1 data 


XYZIN begins calculations when both ranae and 

hav , e run « least 58 iterations ^IC true) eveS 
though the solution is not used until 115 iterations (PP evil 
true) This permits the use of a semi-iterative method 

transL^dTo 1 t S he fir a?rc C r a af C t Ul C^G ed the .^ving antenna, then 
evaluated: 


— - * — / cucu 

The following equations are 


Raz - R + Xdme cos(Az) - Ydme sin(Az) 
Ya = -Raz sin(Az) 

Xa = sqrt ( Raz' - Ya 2 - Za 2 ) . 


Where : 


R and Az are the prefiltered range 
and azimuth signals; 


Xdme and Ydme are the position of 
the DME relative to the Az antenna; 

Raz is computed range to the MLS 
azimuth antenna; 

Xa and Ya are the X and Y position 
of the receiving antenna in the MLS 
coordinate system. 


51 


If ALTREF is equal to zero, the following equation is calculated: 

Za = Hrad - Htdc - ANT_VEC<3) 

Where: Hrad is pitch corrected radio altitude; 

Htdc is the correction to Hrad to 
produce C.G. altitude above the MLS 
plane; 

ANT_VEC (3) is the displacement of 
the receiving antenna above the C.G; 

Za is the Z coordinate of the 
receiving antenna. 


Otherwise, 

A 

Za = tan (ELI) SQRT ( ( Xa - Xell ) 2 + ( Ya - Yell ) 2 ) + Zellg 

A 

Where: ELI is the prefiltered Ell signal; 

Xell, Yell, Zellg are the XYZ 
coordinates of the Ell antenna 
relative to the Azimuth antenna; 


Za is the Z coordinate of the 
receiving antenna. 


(all cases) 

{ POS_CG } 


{ ANT VEC } + 


I xa I 
I Ya | 
I Za I 


GLOBAL INPUTS: EL1_DEP, H_TDC , PITCH, 

Y DME, X_EL1, Y_EL1 , Z_EL1G 


RADALT, ROMLS, 


X DME, 


GLOBAL OUTPUTS: 


None 


52 


MODULE NAME: 
FILE NAME: 
PROCESS : 


CFILT (Complementary Filter) 

MLSEX . FOR 

FMFAST 


PURPOSE: To operate the MLS complementary filter. 

CALLED BY : MLSEX 

CALLING SEQUENCE: CALL CFILT 
CALLS TO: MXV, VXM 

DESCRIPTION: 

The CFILT subroutine initializes and operates the mi q i-hir-n 

specified' Pl belowf ^The ^^MLS 

T'rZ 1 * 5 n n f posltlons ' Wlth a complementary correction term 
X Thf thS P° sltlon output of XYZIN (POS CG) . 

Tne filter is operated whenever CFRUN is non'zprn Tn n „f 

g£rVe n n B ^ cr £? s 

computed in "module llcm are rotaSd ?ntf “e^ML^ coordSate ?« CC 

cross track and along track accelerations are rotated into the 

(VerticaT if error, 

coordinate frame). already m the proper 

Filter initialization occurs when ICCF is set true bv ptt rt y 
During initialization, position output is set to p Z«rr' 
acceleration biases are zeroed, and vertical velocity (VELM?7 ?m 
IS set to HDOT. XDH (VELHAT(l)) and YDH 

^‘SSlaSLTS tile and 

Ks ^ c ~? stjs^is^ 

computing the residual term, EX* iteration, and 

{ Xtp } = { POSHAT ) + dt ({ VELHAT } + { ACCHAT } dt / 2.) 

< EX } = { POS_CG } - { Xtp } 

element whlch^ceede^ the Sit* “o^ul^^epfa /ecor 5*3 

l?l£7rl° iS5 C 128 S< lte 1 rrion f s MLSVAL ” 

(ACCHAT) I ff ° nS are in USe ' the acceleration estimate 

The k' computed by summing ACC with the bias vector BIASIR 

The bias vector is then updated by adding proportions of the 
present and previous values of EX: 

( EXBA } = DK (3) { EX } 


53 


{ BIASIR } = { BIASIR } - Cl { EXBA } + C2 { EXBAL } 

{ EXBAL } = { EXBA } 

If BM accelerations are in use, the bias has already been 
applied by ACCIN, so ACCHAT is simply set equal to ACC. The bias 
vector (BIASBA) is then updated by first rotating EX into the body 
axis, then summing as above: 

{ EXBA } = DK(3) { EX } [ LMB ] 

{ BIASBA } = { BIASBA } - Cl { EXBA } + C2 { EXBAL } 

{ EXBAL } = { EXBA } 

Processing concludes by computing the velocity (VELHAT) and 
position (POSHAT) estimates: 

A 

{ XDDtp } = { ACCHAT } + DK(2) { EX } 

A 

{ VELHAT } = { VELHAT } + Cl { XDDtp} - C2 { XDDLST } 

A 

{ XDDLST } = { XDDtp } 

A 

{ XDtp } - { VELHAT } + DK{1) ( EX } 

A 

{ POSHAT } = { POSHAT } + Cl { XDtp } - C2 { XDLST } 

A 

{ XDLST } = { XDtp } 


GLOBAL INPUTS: ACCHAT, ATKINS, BIASBA, BMAFLG, BMACC, CFRUN, 

COSAZB, GSINS, HDDINS, HDOT, LMB, NAV64K, POSHAT, SINAZB, 
VE, VEINS, VELHAT, VGS_FLG, VN, VNINS, XTKINS 

GLOBAL OUTPUTS: ACCHAT, BIASBA, EX, POSHAT, VELHAT 


54 


MODULE NAME 
FILE NAME: 
PROCESS : 


PRINV (Inverse Computations) 

MLSEX . FOR 

FMFAST 


PURPOSE: To compute predicted values of the next MLS signal 

inputs. 


CALLED BY : MLSEX 

CALLING SEQUENCE: CALL PRINV 
CALLS TO: MXV, VXM 


DESCRIPTION: 

PRINV computes predicted values for the next set of MLS 
measurements based on the present position estimate (POSHAT) , 
velocity estimate (VELHAT) and the antenna configuration of the 
selected runway. These predictions are used in outlier 
computations, and to selectively edit the signal inputs to PFILT 
whenever the measured signals are determined to be invalid. 

First POSHAT is updated by the distance traveled during the 
next iteration, then transformed to the receiving antenna location 
(Xa, Ya, Za) by summing with the ANT_VEC output of module XFORM. 
Slant range to the DME antenna is next computed using the 
Pythagorean theorem. 

Rp = sqrt ( (Xa - Xdme) 2 + (Ya - Ydme) 2 + Za 2 ) - ROMLS 

Note that the difference in elevation between the DME and Azimuth 
antennas is assumed to be insignificant. 

The angle transmitters (Az, ELI) define a conical angle. Thus 
Azimuth is computed as follows, using the four quadrant arctan. 

Az p = atan2 ( -YAH , sqrt (Xa 2 + Ya 2 ) ) 

ELI is computed using the small angle arctan: 


ELlp = atan 


Za - Zell 

sqrt ( (Xa - Xell) 2 + (Ya - Yell) 2 ) 


ELI DEP 


GLOBAL INPUTS: EL1_DEP, POSHAT, ROMLS, VELHAT, X DME, X ELI, 

Y_DME, Y_EL1, Z EL1G ~ ~ 


GLOBAL OUTPUTS: 


None 


55 


MODULE NAME: HNAVFS (Horizontal/Vertical Navigation, Fast) 

FILE NAME: HNAVFS. FOR 

PROCESS: FMFAST 

PURPOSE: To provide fast loop signal selection and integrations 

for navigation. 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


FMFAST 
CALL HNAVFS 
ANGL, ATAN2D, 
RSCON, SCOSD, 


COSD, HNAVB , 
SIND, SQRT 


HNAVML , HNSWIT, 


DESCRIPTION^ ical navi tion routine (HNAVFS), together 

with its sub-procedures HNAVB, HNAVML and HNSWIT, computes and/or 
selects the position, veiocity and acceleration data used by the 
auidance and display procedures. A simplified overview of t 
naiidStion system is depicted in figure 5-1. HNAVFS also maintains 
flags and mode words to indicate which source is in use for 

navigation^ sin^ by performing initialisation as required. 

initialized°OFF f and, "iTcmS?* |°s«ue NAWLG. NAV64K LLINIT 

SSSi d TD aX tue/^e^ve^ical^omponent is 

subtracted to form TASGS. 


TAS, 


(GS < 64 kts) 


TASGS = 


sqrt (TASFPS* - HDOT ? ) / KTOFPS, (GS >= 64 kts) 


niinrc in used for the Air Data mode and also by the 

airplane^ lag "(FLYFLCU and* ceSafn bitf in^he^LS configuration 
word (MCONF) are examined to determine the appropna e sour 

velocity be engaged if neither FLYFLG nor 

INAW (inertial Navigation unit valid) is Jhe ““ d y- 

SEi -tor^assigned 

ACCB otherwise it continues to be input from HDDINS. , rnMPASS) 

case; true heading (HDGTRU) is t.) ^“^^“extefnal procedure 
corrected for local variation (MAGVAR) , and ^ n * ru £ hea ding 
SCOSD is called to compute the sine and 
(SINTH, COSTH) . 



56 




HN AVFS 


•» jr m 

HNAVB 

C44 

* w m 

JZ72 

'* * W * 


} 


ERAD 


r . HNAVMLK> ALT 


51 


r FAST LOOP 

* S. ~ * *r 

SLOW LOOP 


11 


HNAVSL 



TUN PTH 


TUNXTK 


NAVIGATION 


1 , 

PATH 

DATA BASE 


DEFINITION 


FM/FC VAX 



FIGURE 5-1 : RELATIONSHIP BETWEEN HNAVFS AND THE REST OF THE SYSTEM 











57 


Air Data Mode will be selected if INAW is false and the Air 
Data input is valid (ADVAL = true) . The directional velocities are 
then calculated as: 

EWVAVE = TASGS SINTKA 
NSVAVE = TASGS COSTKA. 


On the first pass for Air Data Mode, DVN and DVE are initialized as 
the difference between the directional velocities and the previous 
estimated IDD velocities: 


DVN = IDDVN - NSVAVE 
DVE = IDDVE - EWVAVE. 

Radio Mode is selected by default if there is no valid 
airspeed input. No initialization is performed except for the mode 
flags FLRM (ON) and FLADM (OFF) . 

The Simulated Airplane is engaged if FLYFLG is true. The 
Simulator (procedure NAVIG) provides its own true heading (SMUHDG) , 
true airspeed and cross track acceleration (IDDXTK) , but no along 
track acceleration. 

Inertial Mode, naturally, uses IRS derived velocity and 
acceleration data. Input variable initialization for some modes is 
summarized below: 


VARIABLE 

SIMULATOR (FLYFLG) 

SOURCE 
INERTIAL ( 

HDGTRU 

SMUHDG 

THDG 

NSVAVE 

TASGS COSTH 

VNINS 

EWVAVE 

TASGS SINTH 

VEINS 

IDDATK 

ZERO 

ATKINS 

IDDXTK 

(set by NAVIG) 

XTKINS 

HDD 

(set by NAVIG) 

HDDINS 


AIR DATA (ADVAL) 


MAGHDG + MAGVAR 
TASGS COSTH 
TASGS SINTH 
ZERO (or ACCB(l) ) 
ZERO (or ACCB (2 ) ) 
HDDINS (or ACCB (3) ) 


For both simulated airplane and INS modes, INSVAL is set true 
and FLADM is set false. For all modes, the sine and cosine of 
HDGTRU (SINTH, COSTH) is computed once the source of HDGTRU has 
been determined. For INS mode, additional code exists to extract 
VN/VE from GSINS and COSTH/SINTH if the velocity data valid (VELVLD 
- set by IOFLL) is false (it was originally thought it might be at 
low ground speeds) and bit 6 of MCONF is set, or to extract 
IDDATK/ IDDXTK from ACCB if the acceleration data valid (ACCVLD) is 
false (it is, at low ground speeds), but these options have not 
been required and probably should be removed. Also, on the first 
pass for INS mode, or following a change in the selected IRS unit 
(indicated by the unit field in IRSST1), DVN and DVE are 
initialized as the difference between the directional velocities 
and the previous estimated IDD velocities: 


DVN 

DVE 


IDDVN - NSVAVE 
IDDVE - EWVAVE. 


58 


Next, the conditions for the Microwave Landing System (MLS) 
mode are evaluated. The MLS data valid flag, MLSVLD is 
initialized as MLSVAL • RUNM. (MLS computations are not performed 
not in RUN mode.) MLS mode is selected by depressing the MLS 
bezel button on the navigation display unit. Code in the Displays 
MicroVAX sets the sign bit of the DISPST word for one iteration 
when the bezel button is depressed. This word is transmitted from 
the Displays to the FM/FC MicroVAX via the DATAC, and is used to 
set the MLS_ENABL Boolean if MLSVLD is true and MLSMOD is false or 
clear it if MLSMOD is true. If the simulator is engaged or if MLS 
has not been selected, the mode flag (MLSMOD) is set false 
Otherwise, MLSMOD is set true if MLSVLD and MLS ENABL are both 
true. If MLSVLD is false, MLSMOD and MLS_ENABL are both set false. 

Sub-procedure HNAVB is called next to calculate the Radio Nav 
( IDD) position and velocity data. These are based on the 
previously selected raw velocities (NSVAVE, EWVAVE) , Earth radii of 
curvature (RMP, RNP - computed by procedure ERAD in SLOW) , and 
either radio navigation data computed by HNAVSL in the SLOW process 
or the MLS data computed in procedure HNAVML . (See HNAVB and 

HNAVML discussion below.) 

If MLSVLD is true, sub-procedure HNAVML is called to calculate 
position and velocity data based on the MLS solution. Yet a third 
set of data is available from the Global Positioning Satellite 
(GPS) system, with validity checks and selection logic performed by 
the external procedure GPSPRC. A count (NAVCTR) is kept of 
iterations where good radio navigation (R-nav) data is available. 
("Good" R-nav data is here defined as a position computation 
performed with a circular error of less than 0.3 NM) . When NAVCTR 
reaches 5000, the navigation valid flag (NAWLD) is set. (NAVCTR 
continues to increment to a maximum value of 6000) . If R-nav data 
is absent, NAVCTR is decremented and NAWLD is cleared when NAVCTR 
becomes less than 2000. These switch points were chosen as a first 
approximation and may not be optimum. NAWLD is also forced true if 
either MLS or GPS is valid and selected (bad idea!). 

Finally, sub-procedure HNSWIT is called to * evaluate the 
operator selection flags and the system validity flags and select 
one of the potential data sources for navigation. HNSWIT performs 
separate selection logic and maintains separate mode words for 
lateral and vertical navigation. In addition, an easy— on is 
performed to minimize transients when a mode switch occurs See 
the description of HNSWIT for details. 

Once all the required data have been selected, the sines and 
cosines of latitude and longitude are derived through calls to the 
system SIN and COS functions and groundspeed in knots (GS) and in 
feet per second (GSFPS) are derived from the North (VN) and East 
(VE) velocities. Then, if the groundspeed equals or exceeds 64 
knots, or if both MLSMOD and NAVFLG (GS > 4) are set, the track 
angle (TK) , the sine and cosine of track angle (SINTKA, COSTKA) and 
the flight path angle (GAMMA) are calculated from HDCF, VN, VE and 
GS. Functionally, 


SINTKA = VE / GS 



COSTKA = VN / GS 
TK = atan2 (VE, VN) 

GAMMA = (HDCF / GSFPS) (180 / pi) 


59 


Otherwise, the track angle, and the sine and cosine of the track 
angle, are set equal to the true heading, and sine and cosine of 
true heading (as they were set during initial mode determination) 
and GAMMA is set to zero. 

Unconditionally, the drift angle and magnetic track angle are 
calculated through calls to external procedure ANGL. Then, if the 
groundspeed is below 4 knots, both the navigation mode flag 
(NAVFLG) and the 64 knot flag (NAV64K) are set false, and the 
ground speed references (GS and GSFPS) are limited to a minimum of 
one knot and the corresponding value in feet per second, 
respectively. This limit protects against subsequent division by 
zero. If the groundspeed exceeds four knots, NAVFLG is set true. 
At 64 knots, NAV64K is set true and the Lat/Lon initialization 
flag, LLINIT, is also set true to indicate that the latitude and 
longitude variables have been initialized. 

GLOBAL INPUTS: ACCB, ACCVLD, ADVAL, ATKINS, COLDST, COMPASS, 

DISPST , DPE, DPN, EWVAVE, FLADM, FLYFLG, GPLND, GPNAV, 
GPNAW, GSINS, HDCF, HDOT, HDDINS, IC, INAW, IRSST1, 
LAT, LON, MAG VAR, MCONF, MLSMOD, MLSSLI, MLSVAL, NAV64K, 
NAVCTR, RUNM, SMUHDG, TAS, THDG, VE, VEINS, VELVLD, VN, 
VNINS, XTKINS 

GLOBAL OUTPUTS: CLAT, CLON, COSTH, DFTANG, DVE, DVN, FLADM, FLRM, 

GAMMA, GS, GSFPS, GSFPS2, HDD, HDGTRU, IDDATK, IDDXTK, 
LLINIT, MLSMOD, MLSVLD, NAV64K, NAVCTR, NAWLD, NAVFLG, 
NCUVAL, SINTH, SLAT, SLON, TASFPS, TASGS, TK, TKMAG 


60 


MODULE NAME: HNAVML (Horizontal /Vert ical Navigation, MLS) 

FILE NAME: HNAVFS . FOR 

PROCESS : FMFAST 

PURPOSE: To provide Navigation position and velocities from the 

Microwave Landing System (MLS) solution. 

CALLED BY: HNAVFS 

CALLING SEQUENCE: CALL HNAVML 
CALLS TO: COSD, SIND 

DESCRIPTION: . . 

This routine calculates navigation velocities and position 
based on MLS data inputs. It is called only when the MLS solution 
is valid. Processing begins by computing local copies of the 
lengths of a degree of latitude (DLTFT) and longitude (DLNFT) and 
the radii of curvature, LRM and LRL. It evaluates the same 
equations as are used by procedure ERAD, but bases them on average 
latitude (LATA) between the aircraft (LAT) and the MLS azimuth site 
(LAT MLS) and the WGS-84 altitude of the MLS plane at the EL-1 site 
(ZOMLS + WGSMSL) . It then rotates the MLS X and Y velocities (in 
fps) to North and East velocities (in knots), as follows: 

MLSVN = - (VELHAT X cos (AZ_BRG) + VELHAT 2 sin (AZ_BRG) ) / KTOFPS 
MLSVE = -(VELHAT, sin (AZ_BRG) - VELHAT 2 COS (AZ_BRG) ) / KTOFPS 

Delta latitude and longitude are then computed based on MLS X 
and Y position and DLTFT / DLNFT: 

DLAT = - (POSHAT ! COS (AZ_BRG) + POSHAT 2 sin (AZ_BRG) ) / DLTFT 
DLON = - (POSHAT j sin (AZ_BRG) - P0SHAT 2 cos (AZ_BRG) ) / DLNFT 

The MLS latitude and longitude estimate are computed by 
summing DLAT and DLON with the location of the MLS Azimuth antenna. 

ML SLAT = LAT_MLS + DLAT 
MLS LON = LON_MLS + DLON 

Finally, the Earth curvature (ZDIF) between the aircraft and 
the MLS ELI site is computed and used to convert MLS Z and Z-dot 
(relative to the MLS plane) to altitude and altitude rate relative 
to the Earth. 


T1 = (POSHAT ( 1 ) - X_EL1 ) 2 
T2 = (POSHAT (2) - Y_EL1 ) 2 
TEMP = (T1 + T2) / (LRM + LRN) * NMTFT 

”TEMP" is filtered into ZDIF using a one second time constant, 
producing both a smoothed altitude correction and an estimate of 
the altitude rate error, ZDIFD . 

ZDIFD = TEMP - ZDIF 

ZDIF = TEMP - KT1SEC * ZDIFD 



61 


MLSALT and MLSHDT are then computed as follows: 

MLSALT = POSHATj + ZOMLS + ZDIF 
MLSHDT « VELHAT 3 + ZDIFD . 


These MLS derived outputs are used for comparison purposes, 
and are conditionally output for navigation purposes by procedure 

HNSWIT. 


GLOBAL INPUTS: COSAZB, 

VELHAT, WGSMSL, 


LAT, LAT_MLS, LON_MLS, POSHAT, SINAZB, 
X ELI, Y~EL1, ZHAT, ZDIF, ZOMLS 


GLOBAL OUTPUTS: MLSALT, MLSLAT, MLSLON, ZDIF 


62 


MODULE NAME: 


FILE NAME: 
PROCESS: 

PURPOSE : 


HNAVB (Horizontal/Vertical 
Baro) 

HNAVFS . FOR 
FMFAST 


Navigation, plus 


To provide Radio Navigation positions and velocities and 
altitud^rate 17 Sm0 ° thed ' Bar o~corrected altitude and 

CALLED BY : HNAVFS 

CALLING SEQUENCE: CALL HNAVB 
CALLS TO : SQRT 

DESCRIPTION: 

nnc-v This Procedure inputs the navigation position errors (DPN 
DPE) computed by slow loop navigation (HNAVSL) or by the MLS 
navigation module (HNAVML) within this compilation unit the Farth 

and^nmT^' calculated b y procedure ERAD in the SLOW process 

and computes the corrected positions and velocities usinrr a 

order filter. Although the names (IDDxxx) imply Inertial Dual-Dme 
velocities integrated into dual DME corrected positions) 
the North and East velocity references may be either inertial air 
th^D^ >° ne (Radio- only mode) as selected by HNAVFS. Similarly 
the position reference may be based on DME' s or on ILS or MLS 

lK?p in K?P\ ldS aS se ^ ected b V HNAVSL or HNAVML. The filter gains 

S?/Lof ? y o H T SL ' „ a n nd adjUSt the filter time c °nstant 

( at/ LON, VN/VE) to 20, 30 or 50 seconds according to the selected 

velocity and position references. See the documentation for HNAVSL 

for details. The altitude filter is a third order filter driven bv 

vertical acceleration (HDD) and baro altitude (HBARO) The time 

constant is fixed at 20 seconds. It has nothing todo withDME's 

. r. PABS1 1S true (indicating that position information is 

are 1 both 6 tru^ H ?w VML) and if ^LSMOD is true or MLSSLI and MLSVLD 
are both true, the radio navigation gains and error terms are 

replaced by terms calculated from the MLS position estimates 
computed by procedure HNAVML. position estimates 

DPN = (MLS LA T - IDDLAT) * DTOR * RMP 
DPE = (MLSLON - IDDLON) * DTOR * RNP 


Where : 


oMD LA 3KTri MLSL0N i. 1S the P osi tion calculated by HNAVML; 

^ a f 6 the North and East radii of curvature 

(in NM) calculated by ERAD; and 

DTOR is the degree to radian conversion factor. 

If MLSVLD is false, PASS1 is cleared. If PASS1 was true on 

being r fntegrat^fVurther and DPB 316 ^oed ™ 

greater SSSf o* 

both true, DVN and DVE are integrated from DPN and DPE to correct 
for position errors determined in the slow loop. They are then 
summed with the velocities NSVAVE and EWVAVE (computed in mainline 


63 


code during initial mode d®t«minat These velocities are 

East velocity estimates c00rdinaCes and integrated to form t 

tnen converted to earth u ^ (IDDLAT) and lon gitude (IDDLON) . 

inertially der ^. are evaluated: 

following equations are evai 


KIP DPN) / RMP 


dvn = DVN + K2P DPN 
IDDLAT ^ IDdS? + (^VN DTS + 
dve = DVE + K2P DPE 

sss. : sss : oU DT s ♦ 


Where: 


KIP, K2P are the gains selected hy r«»«. 
DTS is a conversion factor 

per 50 mse t iteration and 
RMP, RNP are radii as aescix 


KMf r rave 

If the JUMP flag (used for tes ^ equal 1 S in magnitude and 

introduced -ss tract error (XTK, . 

The° JUMP flag is then cleared. 

JSSSS : IDDLON t sin (TK) X« / S2K 
In the event that the above of MLSMOD^and 

W^oS* DVE ' ’VrV " and the 

SS? ^io?° 

Sua velocity, not the integration of vei^ is false (indicating 

Lat / Lon^ not 6 y et S i^^ f t ^into^ °^DLAT* ^nd" IDDLON / Also" in 
toq latitude and longitude are se *. nr mvH) is zeroed and, it 

S&r ^^-re^^Lid to HB.0 and 
respectively^ settlor , of 

and opontim.0 directly ^ wwiG. are ^puted through a series 
^ S e°rtica C l ' ^ 

Sill, Is thTsum of HDDOI and XKV times 



64 


. ,ALT) is c °mputed 

c-ectioT b t y o a S yi "? h a e ^“^SSS 

! new Vrt /e^iT tt "SJ?" 

that *5SS tfriS !^ S t FT and the ^rent value V of FBARC^V" 9 the 
Pe? secondf ^ ° £ *» to In^rfesTo 


GL ° BAi INP dto, : ovk^^^-pst o^ FT DL0NFT , dpE; DpN/ 
RMP/ RNP, SQUAT, XTK ' MLSSLI / MLSVLD, NAVFLG, 


GLOBAL OUTPUTS : 

IDDALT, 


ALT, DPE, DPN, 
IDDLAT, IDDLON, 


DVE, 

MLSC, 


DVN, HBECTR, 

mlsmod 


hddot, hdot. 



65 


MODULE NAME: HNSWIT (Horizontal/Vertical Navigation 

Switching) 

FILE NAME: HNAVFS.FOR 

PROCESS: FMFAST 

PURPOSE: To select and easy-on the navigation position, velocity 

and acceleration outputs. 

CALLED BY: HNAVFS 

CALLING SEQUENCE: CALL HNSWIT 
CALLS TO : SQRT 

DESCRIPTION: 

This procedure evaluates the selected navigation mode (IXX, 
IDD, GPS, or MLS) and selects the appropriate source data for 
output as VN, VE, HDCF, LAT, LON and ALTCOR. The selected mode is 
indicated by NAVMOD for LAT/LON and NWMOD for altitude. Values 
are: 0 = IXX, 1 = IDD (NAVMOD only), 2 = GPS, 3 = MLS. An easy-on 

is provided for the velocity switch and also for the altitude 
switch on NWMOD. No easy-on is provided for the LAT/LON switch, 
as this is handled by the lateral control law. 

Processing begins by setting the PVM_ENABL switch, which 
determines whether MLS or GPS altitude is to be used. Basically, 
IDDALT and HDOT will be the selected output except on final 
approach, when MLS or GPS derived altitude may be selected to 
ensure that 3D guidance will guide the aircraft onto the 
glideslope. 

PVM ENABL = LOCE • (GSENG + (VERPTH • (PFPA <= -2.))) 

IDDALT and HDOT are then preselected for output and processing 
continues by checking the modes in priority sequence. If MLSMOD is 
true, MLS derived position and velocity outputs will be used. A 
check is made for first pass conditions. If NAVMOD is not equal to 
3, some other mode was active on the previous pass. DELVN and 
DELVE, used in the velocity easy-on, are set to the difference 
between the previous output velocities and the MLS derived 
velocities and NAVMOD is set to 3. 

DELVN = VN - MLSVN 
DELVE = VE - MLSVE 

The outputs of the MLS complementary filter (POSHAT, VELHAT 
and ACCHAT) are then loaded into the specific item names (XHAT . . . 
ZDDH) using the overlay vector PVHAT, where PVHAT(l) is 
equivalenced to XHAT. The effect is: 

[ POSHAT ] [ VELHAT ] [ ACCHAT ] 

I I 1 

V V V 

[ XHAT, YHAT, ZHAT ] [ XDH, YDH, ZDH ] ( XDDH, YDDH, ZDDH ] 

The along-track (VGSDOT) and across-track (XTACC) acceleration 



66 


outputs are then computed as follows: 


GSFPS = sqrt ( XDH 2 + YDH 2 ) 

VGSDOT = ( XDH XDDH + YDH YDDH ) / GSFPS 

XTACC = ( YDH XDDH - XDH YDDH ) / GSFPS 


“LSW and MLSVE are then loaded into SELVN and SELVF 
respectively . These intermediate variables are used in the easv^A 
logic, ultimately appearing as VN and VE. MLSLAT and MLSLON^ro 
next set into LAT and LON and the vertical guidance mode loaic is 
executed. If MLSSV(4) and PVM_ENABL are both true MLSALT s 1h 
MLSHDT are loaded into the intermediate variables SELPH and^ELVH 
respectively, to ultimately appear as ALTCOR and HDCF MLSSvm 

iet 1Ca ^% th H at the MLS ° ME is in P reci sion mode (which' guaranties 
S5S£nn * t accul ; ac l’> and PVM ENABL is discussed above If 

” is S s n efto eq 3 al C ° 3 ' DELVH and DELPH "• initialised a^d 


DELVH = HDCF - MLSHDT 
DELPH = ALTCOR - MLSALT 


If the conditions for a NWMOD of 3 are not satisfied i-h« 

is r not t n OU a PUtS ara HD a T and IDDALT, for a NWMOD of 0. If 
1S J n 2 t a reversion from either MLS or GPS is indicated nPTVH 
and DELPH are initialized and NWMOD is set to 0. ’ VH 


DELVH = HDCF - HDOT 
DELPH = ALTCOR - IDDALT 


If MLSMOD is false, then the mode is GPS or IDD In eit-h^r 

respectively 7 If^PNAV^ t*** loa ?. e(i . from IDDATK and IDDXTK, 
K^f PSCt i Ve Z y L If GPNAV 1S tr ne, indicating that GPS navigation has 

bl t' ,™ lected on the CDU ' hvblat and HYBLON will be used for LAT 
and LON Use of GPS velocities depends on the validity che^I 
performed by GPSPRC. If GPSSEL is 0 (indicating bad status he 

JtL^wiir t mIiN'Tn I J S H v a H n w VEINS ' ^ l0aded lnt “ SELVN and SEL^ 
Otherwise, HYBVN and HYBVE are used. If NAVMOD was not previously 

GPSSEL, then DELVN andD^LVE are'iniSa 3 !^:^ 11 ' 33 lndicated ^ 


If GPSSEL = 0, 

DELVN = VN - VNINS 
DELVE = VE - VEINS 
Else 

DELVN = VN - HYBVN 
DELVE = VE - HYBVE 


T e ' N „ AVM0D is set to 2 and a check is made for use of 
vertical guidance. If GPLNDV (indicating that GPS vertical 

hyra?? 0 ^ 18 su . f ^ lcient for autoland) and PVM ENABL are both true 
HYBALT is set into SELPH. If NWMOD was not previously 2 DELPH V* 

h i-h LTC0 ^ minUS HYBALT ' and NWMOD is set to 2. HDOT'continues 
to be the selected altitude rate reference. tmues 


67 


If neither MLS nor GPS guidance is selected, the position 
reference is IDDLAT, IDDLON and IDDALT, but a check still needs to 
be made for the velocity reference. If radio navigation updates 
are not available for a period of time, a large position error can 
accrue. The process of correcting this position error can 
introduce significant velocity error. The NAWLD flag maintained 
by HNAVFS indicates that R-nav updates are available and the 
solution has converged sufficiently that the IDD velocities are 
accurate. Also, if a change in NAVMOD occurred on this pass, the 
delta velocities are initialized: 

if NAWLD then 
SELVN = IDDVN 
SELVE = IDDVE 
if NAVMOD * 1 then 

DELVN = VN - IDDVN 

DELVE = VE - IDDVE 

NAVMOD = 1 
endif 
else 

SELVN = NSVAVE 
SELVE = EWVAVE 
if NAVMOD * 0 then 

DELVN = VN - NSVAVE 

DELVE = VE - EWVAVE 

NAVMOD = 0 
endif 
endif 

NWMOD is also checked to see if a reversion to mode 0 
occurred on this pass, and the delta altitude and altitude rate is 
initialized if necessary: 

if NWMOD # 0 then 

DELVH = HDCF - HDOT 
DELPH = ALTCOR - IDDALT 
NWMOD = 0 
endif 

Finally, a check is made to see if a change of NAVMOD occurred 
on this iteration (NAVMOD * PNVMOD) , and the lateral velocity easy- 
on timer (TDWAIT) is initialized to 1.0 if so. Then if TDWAIT is 
greater than zero it is decremented by .005 (1 / 10 seconds times 
20 Hertz), and TDWAIT times DELVN and DELVE is summed with SELVN 
and SELVE to produce the output velocities VN and VE. Otherwise 
SELVN and SELVE are simply loaded into VN and VE and TDWAIT is 
zeroed. 

Identical processing is then performed for NWMOD, with 
HDWAIT, DELVH and DELPH controlling the easy-on of SELVH and SELPH. 

GLOBAL INPUTS: ALTCOR, GPLNDV, GPNAV, GPSSEL, GSENG, HDCF, HDD, 

HDOT, HYBALT, HYBLAT, HYBLON, HYBVE , HYBVN, IDDALT, 



68 


GLOBAL 


IDDATK, IDDLAT, IDDLON, IDDXTK, INSVAL, JUMP, KIP K2P 
LATINS, LLINIT, LOCE, LONINS, MCONF, MLSALT, MLSLAt' 
MLSLON, MLSMOD, MLSSLI, MLSSV, MLSVLD, NAVMOD, NWMOD* 
PFPA, POSHAT, RUNM, VE, VEINS, VERPTH, VN, VNINS 

OUTPUTS: ALTCOR, GSFPS, HDCF, LAT, LON, PVHAT, VE, VGSDOT 

VN, XDDH, XDH, XHAT, XTACC, YDDH, YDH, YHAT, ZDDH, ZDh' 
ZHAT ' 


69 


MODULE NAME: HVGUID (Horizontal/Vertical Guidance) 

FILE NAME: HVGUID. FOR 

PROCESS: FMFAST 

PURPOSE: To provide the horizontal/vertical path errors and the 

speed commands for automatic aircraft guidance in 
2D/3D/4D modes. 


CALLED BY : FMFAST 

CALLING SEQUENCE: CALL HVGUID 

CALLS TO: AAA, DTG1, GD3D, HVG2, HVG6, LEGSW, 

UVC, VDP 


TRALCBA, 


DESCRIPTION: . . . . 

The Horizontal/Vertical guidance equations, implemented m 
procedure HVGUID and its attendant subprocedures, compute the 
deviations between the 2, 3, or 4D path defined by the path 
definition equations and the present aircraft speed and position 
computed by the navigation equations. Its primary outputs are: 
crosstrack error (XTK) , desired track (DSRTK) and track error (TKE) 
used by the lateral steering equations, and altitude error (HER) , 
desired altitude rate (HDTC) and flight path angle (PFPA) used by 
the vertical steering equations. The desired speed on the path 
(SDC) and the required along track acceleration (SDD) used by 
TIMPTH (4D) and speed modes are also computed here, although it 
would be more logical to compute them in TGUID . A detailed 
theoretical discussion of the algorithms implemented will be found 
in Appendix B, Horizontal / Vertical Guidance Computations. The 
discussion here will concentrate on implementation methodology. 

Processing begins by checking for initialization conditions. 
If COLDST is set, indicating the first few iterations after power 
up, a few statements are executed which are, in fact, superfluous. 
Subsequently, the '2D guidance possible' flag (GUID2D) is checked. 
If it is false, control passes to the bottom of the HVGUID 
subroutine where certain lateral axis flags and variables are 
zeroed, and subroutine GD3D is called to initialize variables for 
the vertical axis. In every case, the last step is to set the 


present value of GUID2D into GD2DP . . . 

If GUID2D is true, a check is made to see if ground speed is 
less than 64 knots (NAV64K = false) or if GUID2D was false on the 
previous pass (GD2DP = false) . If either case prevails, further 
initialization is performed. The 2D guidance pointer (PTR2D) is 
limited to a minimum of two (any waypoint but the first may be 
selected as the 'to' waypoint), and the 4D guidance pointer (PTR4D) 
and the 'to waypoint' pointer (TOWPT) are set equal to PTR2D . The 
HVG first pass flag (HVGPl) is then cleared, which will cause some 
additional initialization to occur on the next iteration. Next, 
the unit normal vector (U12C) is loaded from the _ guidance buffer 
(WPT ACT.NMV) . This needs to be done here as it will not otherwise 
be d"one on a straight leg segment until PTR2D is updated. The 
lateral guidance variables are then initialized and GD3D is called 
to initialize the vertical guidance outputs. (Note: LATSTR should 
not be set here as it is no longer computed in this module) . 



70 


As soon as NAV64K and GD2DP are both true (this will be the 
next iteration, assuming the path was entered or modified in 
flight), normal guidance processing begins by computing the 
aircraft position unit vector (PO) . 


i*b = 


SLAT 

-SLON * CLAT 
CLON * CLAT 


Where: SLAT = sin (Latitude) , CLON = cos (Longitude) , etc. 

The abeam point unit vector is then computed by subtracting the 
component of PO which is perpendicular to the path segment (i.e, 
parallel to the path normal vector) from PO as follows: 

TME*VeC - rt) - (rt) • NMV) * Nftv 

TMPVEC will be loaded into POP by subroutine HVG2 when on a 
straight leg. POP locates the point on the great circle path abeam 
of present aircraft position. It is equal to PO if the A/C is on 
the path. 

When in a turn, both POP and U12C will be recomputed in 
subroutine AAA for turn guidance, but they are needed here in every 
event to compute the westward pointing vector, MHAT. 


ft ■ 


0 

TMPVEC (3) 
-TMPVEC (2) 


MHAT is used in subroutine TRALCBA to compute the desired track. 

Next the HVG first pass flag (HVGP1) is checked. If set, the 
'in a DME-arc turn' flag (DMA) is cleared (LEGSW will set the PDMA 
flag equal to it) and LEGSW is called to do the normal path segment 
initialization. The leg distance to go (DTOGO) is then set equal 
to DTG (computed by LEGSW) and HVGP1 is set true, indicating 
initialization complete. HVGUID then exits, leaving the 
calculation of the actual guidance variables to the next pass. 
Note that this sequence requires three iterations after GUID2D is 
set to produce guidance inputs to the steering command modules, 
which causes problems there. With reorganization it should be 
possible to produce usable outputs on the very first iteration, 
thus allowing the removal of 'fix-it' code in LATCMD and VERCMD . 

The remaining processing varies according to whether the path 
segment is a curved (TURN = true) or straight leg. Note that the 
'in turn' (TURN) and '2nd half of turn' (TEND) flags serve a dual 
purpose. When transitioning from one straight path segment to 
another, TURN and TEND are set on consecutive iterations, then 
cleared on the third to mechanize the 2/3/4 -D pointer update 
logic. When actually guiding around a turn, TURN is set when 
entering the turn, TEND is set and PTR4D is updated when halfway 


71 


through the turn, and both are cleared and PTR2D is updated when 
the end of the turn is reached. In the special case of exiting 
from a DME-arc turn (which has a waypoint on each end as opposed to 
one in the middle) , TURN is set again on the very next iteration to 
mechanize the transition to the next straight leg. If GUID3D is 
true, PTR3D is updated at least 300 feet before entering the turn 
(by subroutine HVG6) . The actual distance depends on the degree 
(if any) of flight path angle change between the path segments. If 
GUID3D is false, PTR3D is synchronized to PTR4D by subroutine GD3D. 

If TURN is false the following processing occurs: 

Distance to go on a straight leg (DTG) is checked against the 
distance from the next waypoint back to the tangent point (DTT, the 
beginning of a (non-DME) turn), or simply to zero if approaching a 
DME turn. If DTG is less than DTT or if DTG is less than the 
distance that will be traveled in the next iteration (GSFPS * 
DELTAT) and if PTR2D is less than the total number of waypoints on 
the path (ACTCNT) , TURN is set. This will initiate a path segment 
update by causing the 'TURN is true' logic to be exercised below. 
However if PTR2D equals ACTCNT, we have reached the end of the 
path. GUID- 2D, 3D and 4D are cleared and PTR2D is reset to 1 (a 
hint* to other modules that path end has been reached). If it is 
not time to set TURN, HVG2 is called to compute DTG and DTOGO and 
TRALCBA is called to compute the lateral guidance errors and the 
speed commands . 


If TURN is true the following processing occurs: 

If PDMA is false, subroutine AAA is called to calculate the 
vectors required for turn guidance and the 'turn angle made good 
(AMG) . (Note: PDMA is the value of DMA on the previous leg, set 

by LEGSW during path leg initialization. If it is true with TURN 
true, we are in the process of doing the second pointer update at 
the end of a DME turn, which has nothing to do with 'turn' 
guidance. MAGTA and AMG will both be zero in this case) . If TEND 
is false, AMG is checked to see if it is time to set it. If AMG is 
greater than or equal to 1/2 the magnitude of the turn angle 
(MAGTA) , TEND is set, distance made good (DMG, used by time (4D) 
quidance) is increased by the center-to-center distance from the 
previous waypoint to the center of this turn (WPT_ACT .CCD) and 
PTR4D is incremented. If PTR4D then equals HLD_PTR, we are at the 
last waypoint of a holding pattern. If EXHOLD is false, we want to 
repeat it, so PTR4D is decremented by four and PTR3D is set equal 
to PTR4D. As a holding pattern is flown with a constant altitude 
and speed, but the initial inbound leg to the holding pattern may 
have varied both, the ground speed in the 'from' waypoint 
(WPT ACT(PTR4D-1) .GS) is set equal to that in the 'to' waypoint and 
the flight path angle in the 'to' waypoint (WPT_ACT (PTR3D) . FPA) is 
set to zero. Regardless of the state of TEND, DTG1 is next called 
to compute distance to go (DTOGO - see the discussion under DTG1) 
and TRALCBA is called to compute the lateral guidance and speed 
commands . 



72 


If TEND was initially true (already in the second half of the 
turn or second step of a leg update sequence) , then AMG is checked 
again. If AMG is less than MAGTA, we are still in the turn and 
DTGl and TRALCBA are called as above. Otherwise, PTR2D ?* 
incremented. If PTR2D now equals HLD_PTR and EXHOLD is false 
PTR2D is decremented by four as was done above for PTR4D U12C is 
then loaded from the guidance buffer. (Note: the above sequence 

^■ < ?iK inS • W i? en J r ^ peating r, a holdin 9 pattern which is not 
P ™iv t0 the in b ound leg- U12C should be loaded before backinq 
up PTR2D) . LEGSW is then called to initialize the inva?ian? 
parameters for the next leg, and the flag D0HVG6 is cleared to 
block HVG6 for one iteration (see below) . 

HV GUID processing completes by calling HVG6 if 3D processina 
is possible (GUID3D and D0HVG6 true with PDMA false) . (The D0HVG6 
flag was added to prevent a spurious altitude error on exitina a 
DMA turn.) HVG6 computes the vertical guidance parameters HER 
HDTG and PFPA, and updates PTR3D. D0HVG6 is set on return If 
GUID3D is false, GD3D is called to maintain the vertical guidan« 
variables in the IC state and keep PTR3D synchronized with PTR4D . 

GLOBAL INPUTS: ACTCNT, AMG, CLAT, CLON, COLDST, DMG, DTG 

EXHOLD, GSFPS, GUID2D, GUID3D, NAV64K, PTR2D, PTR4D 
SLAT, SLON, TEND, TURN, WPT ACT ' 


GLOBAL OUTPUTS: ALCBA, ALCFLG, DMG, 

GUID4D, LATSTR, PTR2D, PTR3D, 
TURN, WPT_ACT, XTK 


DTOGO, GUID2D, GUID3D, 
PTR4D, TEND, TKE, TOWPT, 


MODULE NAME: 
FILE NAME: 
PROCESS : 


LEGSW (Leg Switching) 

HVGUID . FOR 

FMFAST 


73 


PURPOSE: Set up invariant parameters for the next leg of the path. 

CALLED BY: HVGUID 

CALLING SEQUENCE: CALL LEGSW 
CALLS TO : ANGL 

DESCRIPTION 1 

The TURN and TEND flags are cleared (completing the leg update 
sequence) , ALCFLG and ALCBA are cleared (if required on the next 
leg, they will be recomputed by TRALCBA) and the angle-made-good 
(AMG) is cleared. Parameters are then loaded from the guidance 
buffer entry pointed to by PTR2D as described below: 

If DMA is false, turn angle (TA) is set to WPT_ACT(i) .ANGLE 
and DTG is set to the distance from the end of the previous turn to 
the next waypoint ( WPT_ACT(i) .PPD - WPT_ACT(i - 1) .DTT ) . If DMA 
is true, these parameters refer to the DME turn being exiting, not 
an upcoming turn, and TA and DTG are set to zero. The sign 
(SIGNTA) and magnitude (MAGTA) of TA are then computed, PDMA is set 
to DMA and the DMA flag is loaded from WPT_ACT(i) .DMA. The radius 
of turn (RTN) is then loaded from WPT_ACT ( i ) . RAD and the half-arc 
distance (A02) is loaded from WPT ACT(i) .ARC2. 

GLOBAL INPUTS: PTR2D, WPT_ACT 

ALCBA, ALCFLG, AMG, DTG, RTN, TEND, TURN 


GLOBAL OUTPUTS: 



74 


MODULE NAME: GD3D (3D Guidance Initialization) 

FILE NAME: HVGUID.FOR 

PROCESS : FMFAST 

PURPOSE: Initialize 3D guidance variables. 

CALLED BY: HVGUID 

CALLING SEQUENCE: CALL GD3D 
CALLS TO : None 

DESCRIPTION: 

GD3D is called when GUID3D, GD2DP, or HVGP1 is false. It sets 
VERSTR, PFPA, HER, and DMG to zero, sets HDTC to present vertical 
speed (HDCF) , synchronizes PTR3D to PTR4D and sets the nominal leg 
flight path angle (FPA) to WPT_ACT.FPA (this is only significant on 
the last call before setting HVGP1) . FPA and HDTC will be required 
by HVG6 to ensure a smooth transition in vertical guidance should 
GUID3D become true, and PFPA is referenced by external modules 
without reference to the state of GUID3D. VERSTR should not be set 
here as it is no longer computed by HVGUID. 

GLOBAL INPUTS: HDCF, PTR4D, WPT_ACT 

GLOBAL OUTPUTS: DMG, FPA, HDTC, HER, PFPA, PTR3D, VERSTR 


75 


MODULE NAME: 
FILE NAME: 
PROCESS : 


AAA (Turn Vector Processing) 

HVGUID . FOR 

FMFAST 


PURPOSE : 


Compute the unit normal and abeam point vectors used for 
guidance when in a turn . 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


HVGUID 
CALL AAA 

ATAN2D, UVC, VCP, VDP 


DESCRIPTION: . • _ turn is simply the center of the 

T * 16 'Ao e ^ m fnartLrf from WPT ACT TCV. (This must be done every 
turn, so POP Mainline processing continues to compute POP as 

iteration as HVGUID mainx p ... unit vector normal to 

for straight segment processing) . U12C, the unit ^t or norma 

direction : 

Ul^C = ( ( (P~0 - POP) - ( ( <P0 - POP) * POP) * POP) ) * SIGNTA 


Where: SIGNTA is positive for a right turn. 

UVC is then called to ensure that the result is a unit vector 
The angle made good (AMG) is calculated as follows: 

AMG = atan(sin(A), cos (A) ) 

sin (A) = (Ul^C X NMV) • P6P 
Where: cos (A) = UttC • Nftv 


NftV is the unit vector normal to the inbound leg. 

Finally, AMG is corrected according ^to ^^^t^/ainitude^ and the 
turn direction to make sure that it remains 

degrees (the maximum permissible turn ^gnitudeK * f s * de 

aircraft is sufficiently off .course as r os on the J turn 

angle^being ‘ ‘SM? 5“^ -G if set eguai to 

MAGTA, causing immediate update to the next pa g 

rtn, wpt_act, xtk 


GLOBAL INPUTS: 
GLOBAL OUTPUTS: 


AMG 


# 


76 


MODULE NAME: 
FILE NAME: 
PROCESS : 


DTG1 (Distance-to-go 

HVGUID . FOR 

FMFAST 


(Turn) Calculations) 


PURPOSE: Calculate the abeam distance, DTOGO 

position in and type of turn. * 


according to 


CALLED BY: HVGUID 

CALLING SEQUENCE: CALL DTG1 
CALLS TO : None 


DESCRIPTION: 

When i Tl D^ 1 - C erc t turn the it d is t li^v°the i? T ? G0> when ln a turn - 
(CCD) minus the arc distance made^ood^AMsf around the turn 

it is the distance from the beginning tT th e centeToT^heT 5 ' 
(A02) minus the arc distance made good when in the f i^r ^ Ur ? 
the turn, and the distance to the center of the next turn ^?rn ? 
the next waypoint is added) when in the second half of Tturn 

GLOBAL INPUTS: AMG, PTR2D, RTN, TEND, WPT_ACT 


GLOBAL OUTPUTS : DTOGO 


77 


MODULE NAME: HVG2 (Distance-to-go (Straight Leg) Calculations) 

FILE NAME: HVGUID.FOR 

PROCESS: FMFAST 

PURPOSE: Compute DTG and DTOGO when on a straight leg. 

CALLED BY: HVGUID 

CALLING SEQUENCE: CALL HVG2 
CALLS TO: ATAN2, VCP, VDP 

DESCRIPTION: , , ^ 

HVG2 is called when on a straight leg. It loads the abeam 
point vector (POP) from TMPVEC (computed by HVGUID mainline code) 
and computes two measures of 'distance to go* . DTG is the distance 
from the abeam point to the next waypoint (WPV) , computed as: 

DTG = Re * atan(sin(A), cos (A) ) 

Where: Re is the local Earth radius in feet (RADFT) 

sin (A) * (POP X W^V) . U12C 
COS (A) = pOp . w£v 

and 

POP is the abeam point vector 
W Pv is waypoint vector of the to waypoint 
U1^2C is the unit normal vector (= WPT_ACT.NMV 
when on a straight leg) 

If the 'to' waypoint is the inbound waypoint of a DME-arc 
turn, or if there is no turn at the next waypoint, then DTOGO = 
DTG. Otherwise, DTOGO is the distance to the center of the next 
turn, computed as: 

DTOGO = DTG - DTT + A02 

Where: DTT is the distance from the next waypoint back 

to the tangent point of the turn; 

AO 2 is one half the distance around the turn. 

A02 is loaded from the guidance buffers by LEGSW. 

GLOBAL INPUTS: RADFT, WPT_ACT 

DTG, DTOGO 


GLOBAL OUTPUTS: 



78 


MODULE NAME: TRALCBA (Primary Lateral Guidance Computations) 

FILE NAME: HVGUID.FOR ' 

PROCESS : FMFAST 

PURPOSE: Calculate NOMBA, XTK, DSRTK and TKE . Ground speed mode 

SDC and SDD are also calculated here. 

CALLED BY: HVGUID 

CALLING SEQUENCE: CALL TRALCBA 

CALLS TO: ANGL, ATAN2, ATAN2D, SCOSD, SIND, VCP, VDP 

DESCRIPTION: 

The nominal bank angle (NOMBA) required to compensate for 

lateral acceleration around a turn is computed as: 

NOMBA = arctan (GSFPS 2 / (g * RTN) ) 

Where: g is the nominal acceleration due to gravity 

RTN is the radius of the turn in feet 

and If g * RTN is < GSFPS 2 , NOMBA is set 
to 45 degrees. 

Then RALC, the distance before the turn to apply the nominal bank 
angle in order to minimize tracking error, is calculated as 

RALC = GSFPS * NOMBA / 4 

Where: 4 degrees per second is the 

lateral control law roll rate 
limit in auto mode. 

If ALCFLG (the flag controlling application of NOMBA to the 
control law) is true, the exit angle (ALCXA) , or number of degrees 
before the end of turn to remove NOMBA is calculated as 

ALCXA = RTOD * RALC / RTN 

Where: RTOD is the radian to degree 

conversion constant 

Then, if the angle made good (AMG) is greater than or equal to 
the magnitude of the turn angle minus the exit angle, ALCFLG is set 
false and ALCBA (the signed bank angle command applied) is zeroed. 
Otherwise, ALCBA is set to NOMBA times the sign of the turn angle. 

If ALCFLG is false and the half-arc distance of the turn (A02) 
is greater than RALC (if the turn angle is large enough to require 
ALCBA) , then RALC is compared to the distance to the start of the 
turn. If the turn is a DME-arc turn, this is simply distance to go 
(DTG) . Otherwise it is DTG minus the distance to the tangent point 
(DTT) . If this distance is less than RALC, ALCFLG is set true. 

The remaining code is bypassed during the second update at the 



79 


end of a DME-arc t«n (if MM» 

XTK = Re * atan (sin (A) / cos (A)) 

Where: Re is the, local^ radius of the -th (RADFT) 
sin (A) = PO * V} 20 

cos (A) = PO * P° P 

PO is the airplane position vector 

P ; P is the abeam point vector (points to the center 
of turn if i- n a turn) 

0 * 12c is the unit normal vector. XTK is measured 
parallel to U12C 

XTK is positive when to the right of the path. 

\ ytk as calculated above is the 
. i. 1ir n (TURN is true) / XTK a . rorrected by adding 

--o Produce the 

distance to the path: 

XTK = XTK ♦ RTN * SIGNTA 

The desired trach (DSRTK) is then caicuiated as foiiows: 

DSRTK . atan (sin (A) ^ cos (AH , 

Where : sin (A, - (OKC X,M) • ROP 

COS (A) = U12C • M A 

A 

M points West from POP 

j as the actual minus the 

--SSS 05 ” is called t0 calculate 

The remaining code = computes ■J^i‘, u e tfi^ c t ciS^W»S 

the nominal ground speed <SDC) an modes as well as t 

for time guidance («) a™ g ^ b( , dlsp iayed on line iu o^ ^ 
ground speed error ( (TOWPT) which always P n i t i a lly, 

CDU. ^e 'to waypoint t ^ lterB(t ls also computed. ^Ini^ 
next waypoint ahe DTOTL is computed as waypoint 

TOWPT is set “^"“"to-center distance (C “> « c turn,' ^PTR4D 

- - 



80 


TOWPT is incremented and dtott h „ • 

po!sZ r e n - i?S by iT r t i3t ?™ around 

f° C r d S. r «SS th ^ irSt 

speed at the 'to' waypoint ( rif m- SDD computed as the desir^A 
waypount all over the ^enfer-to-center'df^ Speed at «» Wrim 

^«?‘ g „“,s5s s sr , e s 

TwoIp!, dc ' — ** 

GLOBAL INPUTS: Airrrr 

PTR4D ' ™>?T, RALC, Wr^'TO^PT S PS ' GSFPS2 - 
UT STKE,' TKE^TOWPT^XTk' C ™ E ' GSE ' DSRTK ' DT0TI -, SDC, SDD, 


81 


MODULE NAME: 
FILE NAME: 
PROCESS: 


HVG6 (Primary Vertical Guidance Computations) 

HVGUID.FOR 

FMFAST 


PURPOSE: Calculate the vertical guidance parameters. 

CALLED BY: HVGUID 

CALLING SEQUENCE: CALL HVG6 
CALLS TO: None 

DESCR tte I local index (I) is set to PTR3D + 1. If I is then equal 
to HLD PTR and EXHOLD is false (indicating that holding pattern 
rpnpat is selected) I is reset to PTR4D (which was ad 3 usted in 

= o^^ri'n theTth 

anoip for the next segment on the path (FPAN) is sec rro 
WPT ACT (I) .FPA. If PTR3D is equal to ACTCNT, FPAN IS set to zero, 
as end-of-path will cause a reversion to altitude hold mode. 

The distance before the waypoint to initiate the 
update (HDIS) is then calculated as the difference between the 
present and next segment flight path angles times the ground speed 
squared all over 2. 


HDIS = abs (FPA - FPAN) * GSFPS 2 / 2. 

This is the distance required to make an asymptotic capture of the 
next vertical path segment at an average vertical acceleration of 
2 fos per second. A nominal minimum advance distance of 300 feet 
tsVsir C °U the distance to go to the end of the ^leg 

S G0, Thfs ^arta" so DI oc=ur T s R3 if P?R3D is less than PTR4D, (which 
should never occur, but has been known to happen during a path 
update) . 

Next, the commanded altitude at the abeam point (HC) is 
calculated as the altitude at the 'to' waypoint minus the di stance 
to the end of the path segment times the flight path angle 
segment in radians. 

HC = WPT_ACT (TOWPT) .ALT - DTOGO * WPT_ACT (TOWPT) . FPA * DTOR 
The pointer TOWPT is used here as it always points to the 

waypoint^^Altitude error 

lHDCR) h \s P calculated as the ground sp ®® d ^ ^CTKE? ^This valul 

/-xmmonH hhtp Th© rctt 0 lirnit imposBd is 2.0 fB6t p 
se«nS Wirt a lag of 125 sec. HER and HDTC are t he inputs to the 
^RCMD procedure used to compute the vertical steering command. 



82 


h,-,hh!Sk P1 6< J flight P ath an 9le (PFPA) is computed as hutc 
divided by ground speed in feet per second (GSFPS) times the rad?In 
to degree conversion factor (RTOD) . PFPA is (mav h^i 
the GAMMA wedges on the Primary Flight DisDlav anH t0 drive 

compute the flight path angie error’for dTspTay on the CDU^ 6 ' 1 to 

GLOBAL INPUTS: ACTCNT, ALTCOR, CTKE, DTOGO, EXHOLD, FPA GSFPS 

GSFPS2, HDTC, HLD_PTR, PTR3D, PTR4D, WPTACT ' ' 

GLOBAL OUTPUTS: FPA, HDTC, HER, PFPA, PTR3D 


83 


MODULE NAME: TGUID (Time Guidance) 

FILE NAME: TGUID. FOR 

PROCESS: FMFAST 

PURPOSE: To compute the speed command for the time path (4D) mode. 

CALLED BY : FMFAST 

CALLING SEQUENCE: CALL TGUID 
CALLS TO: AAT, CDG 

DESCRIPTION: 

TGUID and its subroutines AAT and CDG, together with some code 
in the HVGUID procedure, compute the longitudinal acceleration 
command (SCMD) for the time guidance mode. HVGUID computes the 
nominal ground speed (SDC) for the aircraft at its present 
position, the average acceleration along the present path leg 
(SDD) , the distance made good (DMG) along the path and DTOTL, which 
is DMG plus the length of the present leg minus the distance to go 
to the next waypoint. TGUID computes the position of the timebox 
on the path and differences that with the aircraft position to find 
the separation distance (SEPR) which is used (together with SDC, 
SDD and present ground speed) to compute the acceleration required 
to drive SEPR to zero. 

Processing begins by checking for time guidance possible. If 
GUID4D is false or if NAV64K is false (the airplane must still be 
on the ground) , SEPR is set to zero, the time guidance first pass 
flag (TGPl ) is cleared and processing terminates. Otherwise, HER 
and XTK are checked for non-zero values to ensure that HVGUID has 
completed its initialization. If this check passes, TGPl is 
checked and, if false, initialization is performed. 

During initialization the 4D turn flags are cleared, the 
'distance made good' for the time box (DMG1 ) and for the airplane 
(DMG) are zeroed and the time box 4D reference pointer (PTR4D1) is 
initialized to 2. The guidance buffer is then searched for an 
entry having an arrival time (ETA) greater than the present time. 
PTR4D1 , PWVADR and TBOXPTR are initialized to point to this entry 
and TOWPTPTR is set equal to the aircraft 4D pointer set by HVGUID 
(PTR4D) . (Note: the 'velocity pointer' (PWVADR) serves no useful 

purpose in this implementation, but is a carry over from the 
original code where it was useful. TBOXPTR and TOWPTPTR are only 
used during the initialization process) . If the airplane is ahead 
of the timebox (TOWPTPTR is greater than TBOXPTR), DMG is increased 
by the center to center distance (CCD) of the leg indicated by 
TBOXPTR and TBOXPTR is incremented. If the timebox is ahead of the 
airplane, DMG1 is increased by the CCD indicated by TOWPTPTR and 
TOWPTPTR is incremented. This is continued until TBOXPTR equals 
TOWPTPTR. TGPl is then set and the average path acceleration in 
fps/sec ( SDDC) is calculated by differencing the speed in the 
waypoints at the beginning and end of the leg the timebox is 
presently on (as indicated by PWVADR) , divided by the nominal time 
for the leg. 


84 


SDDC 


KTOFPS * (WPT_ACT (PWVADR) .GS - WPT_ACT (PWVADR-1 ) . GS) 
WPT ACT (PTR4D1 ) . TIME 


The initial timebox velocity in fps (SDCC) is then computed as the 
speed at the 'to' waypoint minus SDDC times the desired time to 
this waypoint. 


TOTIME = WPT_ACT (TBOXPTR) .ETA 

SDCC = KTOFPS * WPT_ACT (PWVADR) .GS - SDDC * (TOTIME - TIME) 

The distance from the timebox to the 'to' waypoint is then 
calculated in one of two ways, depending on whether the initial 
velocity is positive or negative: 

for SDCC < zero: 


SC = (SDCC/SDDC + TOTIME - TIME) * KTOFPS * WPT_ACT (PWVADR) . GS/ 2. 

I.e, the time for SDCC to become positive plus the time to the 
waypoint, all times the average speed on the path. The timebox 
remains frozen at the beginning of the path until SDCC becomes 
positive. 

for SDCC >= zero: 


SC = (TOTIME - TIME) * (KTOFPS * WPT_ACT (PWVADR) . GS + SDCC) / 2. 

If the 'to' waypoint is not the start of a DME arc turn, SC is 
adjusted by adding the distance to the tangent point and 
subtracting the half arc distance to the midpoint of the turn (if 
3ny) . (This is apparently done to facilitate calculation of 
timebox position in a turn. Since the drawing of the timebox 
itself is handled entirely by the displays computer in the present 
implementation, this code could be simplified considerably) . 

SC = SC + WPT_ACT (PTR4D1) . DTT - WPT_ACT (PTR4D1) . ARC2 

If the 'from' waypoint is the inbound waypoint of a DME turn, the 
box is in the second half of the turn. TURN1 and TEND1 are set, 
the magnitude of the turn angle (MAGTA1) is set from WPT ACT(PTR4D1 

- 1) .ANGLE, the turn radius (RT) is set from WPT_ACT (PTR4D1) .RAD 
and the arc-distance made good (ADMG) is set to WPT ACT(PTR4D1) .CCD 

- SC. Subroutine AAT is then called to complete turn processing, 
CDG is called to compute the speed command and processing 
terminates until the next pass. In all other cases, MAGTA1 is set 
from WPT_ACT (PTR4D1) .ANGLE. Then, if SC is less than the distance 
to the tangent point, TURN1 is set and ADMG and RT are set as 
above. (Two lines, depending on the state of TEND1 , are coded but 
since TEND1 was cleared at the beginning and has not been set, only 
the line that sets RT from WPT_ACT (PTR4D1) .RAD is meaningful) . AAT 
is then called to perform the turn processing and CDG is called (at 


85 


the end of this procedure) to compute the speed command. 

On subsequent passes, processing begins by integrating SDDC 
into SDCC If SDCC is then positive, DELTAT * SDCC is subtracted 

SC If the timebox is not presently in a turn (TUBN1 is 
false > the end of the straight leg is checked for. This is 
indicated when SC becomes less than zero or less than the distance 
to the tangent point. If, when this occurs, PTR4D1 is equal to the 
number *of waypoints on the path (ACTCNT) , the end of the path has 
h reached so GUID4D is cleared, PTR4D1 is set to 1 and 

Messing terminates. Otherwise, if this is the start of a ME 
arc turn ^the DMA flag is set in the 'to' waypoint buffer) , SDDC, 
SDCC and SC are reset as given: 


SDDC = 


KTOFPS * (WPT_ACT (PWVADR) . GS - WPT_ACT (PWVADR-1 ) . GS) 
WPT ACT (PTR4D1) .TIME 


SDCC = KTOFPS * WPT_ACT (PWVADR) .GS - SDDC * (TOTIME - TIME) 

SC = WPT_ACT (PTR4D1+1) .CCD 
Where: PWVADR is set to PTR4D1 + 1. 

if the DMA flag is set in the 'from' waypoint, this must be the 
second update at the end of a DME turn, so MAGTA1 is set to zero, 
otherwise, MAGTA1 is set to WPT_ACT(PTMD1) .ANGLE. RT is set to 
WPT ACT {PTR4D1 ) .RAD, the arc-distance made good is zeroed, TURN1 is 
set and AAT and CDG are called. 

GLOBAL INPUTS: ACTCNT, DMG, GUID4D, HER, NAV64K, PTR4D1 , SC, 

GLOBAL ^ dcc , ten[)1 , TI m E , TURN1 , WPT_ACT, XTK 

GLOBAL OUTPUTS: ADMG, DMG, GUID4D, PTR4D1 , SC, SDCC, SEPR, TENDl, 

TOTIME, TURN1 



86 


MODULE NAME: AAT (Turn Computations) 

FILE NAME: TGUID.FOR 

PROCESS: FMFAST 

PURPOSE: To perform timebox calculations when in a turn. 

CALLED BY: TGUID 

CALLING SEQUENCE: CALL AAT 
CALLS TO : None 


DESCRIPTION: 

velocitr n (^ na int r 0 OC ^ in «®rr^ ?1 ; ,t * ° £ inte 9 rati "9 the time box 
(SDCC) into the arc distance made good (ADMG) then 

computing the angle made good (AMG1) as ADMG divided by the turn 

radius (RT) times the radian to degree conversion factor If the 

al ready m the second half of the turn (TEND1 is true) 

?hf h 1S ma< ? e !° r end of turn: if AMG1 is e^al to or qreater 

fa^e t enH ma9nitUd ® ° f the . turn (MAGTA1) , TURN1 and TEND1 Ire set 
false and processing terminates. Otherwise, a check is madl for 

TENDi a \s Wa Iet°true Ind 2 th^? 1 t0 ° r greater than MAGTA1, 

nn f: o , ® se . t . t rue and the timebox distance-made-good (DMG1 ) is 

updated by the leg center to center distance (CCD) if dmpi i c 
nMri aircraft distance made good (DMG) , DMG is reduced bv 

dEg is t? 13 S6t C ,° 2ero ' Otherwise DMG1 is reduced by and 
G is set to zero. (This is done to maintain DMG and DMG1 at rha 
minimum values required to correctly compute the senar^n 

incremented “ S iT^TRiD? “ Iri P utat ional accuracy.) PTR4D1 is then 

false, e the d time f box R hi “ust^leted^a "ctcjft “iiS 

set'tTp^Dl 1 - 8 r' Ms effe H Ct V rePMt tha P«tern, pt^?™! 
_ c . PT , 1 ' 1 4 - (This needs to be checked. The timebox should 

probably skip a holding pattern altogether, or at best rlplalit 
PTR4D1? 06 " The ' VelOClty pointer ' (PWVADR) is then set equal to 

. * f J _ not •'■ n a DME_ arc turn, the timebox acceleration velorit-v 

iTdnnl ° e (SDDC/ SDCC ' SC) are then reset aa given (this 

is done in mainline code for a DME turn) : y ' 


SDDC = 

SDCC = 
SC 


KTOFPS^* (WPT_ACT (PWVADR) . GS - WPT_ACT (PWVADR-1) . GS) 

WPT_ACT (PTR4D1) .TIME 
KTOFPS * WPT_ACT (PWVADR-1) .GS 
WPT_ACT (PTR4D1) .CCD 


If the new 'to' waypoint is not the entry to a DME-arc turn SC i<, 
corrected by adding the distance to the tangent P o7nt (DTT) and 
subtracting the half arc distance at the next turn (MC2) 


87 


GLOBAL 

INPUTS: 

WPT_ACT 

ADMG, 

DMG, 

EXHOLD, 

HLD_ 

_PTR, PTR4D1, 

SDCC, TEND1, 

GLOBAL 

OUTPUTS : 

ADMG, 

DMG, 

PTR4D1 , 

SC, 

SDCC, TEND1, 

TURN1 



88 


MODULE NAME: CDG (Primary, Time Guidance Computations) 

FILE NAME: TGUID . FOR 

PROCESS: FMFAST 

PURPOSE: To compute the acceleration command (SCMD) for time 

guidance . 

CALLED BY: TGUID 

CALLING SEQUENCE: CALL CDG 
CALLS TO : None 

DESCRIPTION l 

The timebox distance to go (SC) is set into DTOGOl . If the 
'to' waypoint is not a DME-arc turn, DTOGOl is then corrected by 
subtracting the distance to the tangent point and adding the half- 
arc distance to the midpoint of the next turn (if any) . The 
timebox equivalent of the aircraft total distance made good (DTOTL) 
is then computed in the variable SEPR by first setting SEPR to the 
time box distance made good (DMG1 ) plus the center-to-center 
distance (CCD) to the guidance buffer entry pointed to by PTR4D1 . 
If this waypoint is the entry to a DME-arc turn and TURN1 is true 
with TEND1 false, the timebox is in the first half of that turn, 
and this entry is behind us. In that case SEPR is increased by the 
arc-distance made good in the turn (ADMG) . In all other cases, 

entry is still ahead of the timebox and SEPR is decreased by 
DTOGOl . The seperation distance between the aircraft and the 
timebox (SEPR) is then computed as 'SEPR' minus DTOTL. Obviously 
some names should be changed here to avoid confusing the innocent . 

The time error is then computed as the negative of SEPR 
divided by the average of the timebox and the aircraft speed, with 
a negative timebox velocity ignored: 

TIMERR = -SEPR / ( (SDC + max(0., SDCC) ) / 2) 

Where: SDC is the nominal speed on the path; 

SDCC is the time box velocity (limited 
to positive values) ; 

The time path acceleration command (SCMD) is then computed as the 
sum of the nominal path acceleration (SDD) + .0025 * SEPR, limited 
to one percent of the nominal velocity, plus 0.1 times the 
difference between SDC and the present groundspeed: 

SCMD = SLIM ((SDD + .0025 SEPR), .01 SDC) +0.1 (SDC - GSFPS) 

SCMD is then attenuated as the maximum CAS or MACH is approached, 
or set to -.25 if either maximum is exceeded. (This code is not 
necessary, as overspeed protection is applied elsewhere, nor is it 
completely correct as coded) . Finally, the resultant SCMD is 
limited to a maximum of +/-1.0 fps/sec. Note: The above equation 

is erroneous in that the nominal timebox acceleration (SDDC) should 
be used vice SDD. 


89 

GLOBAL INPUTS : ADMG, CAS/ DTOTL/ GSFPS/ MACH, SC, SDC, SDCC, 

SDD, TURN 1 , TEND1 , WPT_ACT 

GLOBAL OUTPUTS: SCMD, SEPR, TIMERR 



90 


MODULE NAME: 
FILE NAME: 
PROCESS: 


NAVIG (Simulated Airplane) 

NAVI G. FOR 

FMFAST 


PURPOSE : 


J , ho P t>^ 1 v, + gi ^ UnCi check ° u t of several dynamic functions of 
the Flight Management /Flight Controls software. 


CALLED BY : FMFAST 

CALLING SEQUENCE: CALL NAVIG 

CALLS TO: ENGAGE_CAS , FLYIC 


DESCRIPTION: 

NAVIG is the 
simulated airplane. 


executive program for the point mass model 
operation is controlled via the utilitv 

1 ^ n ^ L a J i . » 


It' S 


«?■* Setti ^ " bitS in the sira ulation control word 
ar^enumerated 0 below ; lnitlated by SetU " 9 dlffe ~ nt bits 


o Bit 0 - Initialize airplane 
o Bit 1 - Fly airplane @ 200 knots 
o Bit 2 - Fly Calibrated Air Speed or 4D path 
o Bit 3 - Not used 
o Bit 4 - Hold airplane 
o Bit 5 - Not used 
o Bit 6 - Not used 

o Bit 7 - Force VOR2 = CVOR2 for navigation testing 
(HNAVSL) y 

o Bit 8 - Force DME2 = CDME2 for navigation testina 
(HNAVSL) y 

o Bit 9 - Force s DME3 = CDME3 for navigation testing 
o Bit 10-12 - Not used 

o Bit 13 - Index to APDAT (Sim initialization data) 
o Bit 14 - index to APDAT (Sim initialization data) 

0 15 Set up Sim initialization values per bits 13, 14 


Upon entry, the 1C and RUN discretes are checked to see if a 
change in Flight Controls operate mode was selected If ic and 
LABFLG are both true, SIMFLG is set to HEX 001 reinitialization? 

RUNM are b ° th true ' SIMFLG is set to 0. SIMFLG is th In 
checked for a negative value (Bit 15 set) . if so, bits 13 and 14 

are used as an index into the APDAT matrix to set up the 1C values 
for the airplane, and SIMFLG is set to HEX 0011. 

i-ho ° ° f ?™ FLG set ' wh ich signifies initialization of 

tne airplane, an initialization counter (FLYICF) is set to -32 if 
it was zero. For the next 32 iterations, the counter is 
incremented, subroutine FLYIC is called to perform initialization, 
ai £ spe . ed (CAS) 1S se t to 2 knots, the Ground-speed- 

eSgaGE ^ AS 3 ?.' r?i r i"oH n f S f . lag { " AVFLG) is cleared and subroutine 
™ A ??~ CAS f ed t° set up the remaining variables required for 

operation of the flight software. (This is a no-op since 

FLYFLcT CAS does " othin 9 until the hold and ic bits are cleared from 
FLYFLG) . On the 32nd iteration, bit 0 of SIMFLG is cleared 


91 


(allowing further processing to proceed) and the guidance possible 

fla9S ifanf one d oftt? ML?. SSfr than bit 0), that control the 
simulated airplane is set the following occurs: 

o FLYFLG and AUTOE are set true signifying that the simulated 
airplane is now in operation. 

O If the hold bit is set, CAS is set to 2 knots and NAVFLG is 
turned off . 

° rls t: b\t h °<bit ' % i is °set / I^so/caTTs ^omputld ^ rom^he 
longitudinal (S’. “thertile^AS 

!fstt l to a constant 2M knots, or the value stored in 
SIMCAS. 

Procedure ENGAGE_CAS is then called to set up all other required 
variables . 

GLOBAL INPUTS: ATCMD, CAS, GSFPS, IC, LABFLG, RUN, RUNM, SIMCAS, 

SIMFLG 

GLOBAL OUTPUTS:^ C sf M kG F , L ' , S F IMHDG f^LAT , ^MlSn, s££ot 



92 


MODULE NAME: 
FILE NAME: 
PROCESS : 


FLYIC (Initialization) 

NAVIG. FOR 

FMFAST 


PURPOSE : 


To perform basic 
airplane. 


initialization for the 


simulated 


CALLED BY : NAVIG 

CALLING SEQUENCE: CALL FLYIC 
CALLS TO : None 


DESCRIPTION: 

This procedure initializes the value of t-ho f aef n 
zero ^nd Magnet ic^vari at ion T 

SMMAGV. (FLYFLG set orevpnfc; t-hoeo i ?. t0 value stored in 

or ERAD, respectively, but TAS also needl^f be C sThere^t™^ 
properly with the present version of HNAVFS) The ini-ort +-° w ^ rk 
simulated airplane heading (SMUHDG) is initialized to rh» f° r 

zlro ln T h ef™ T^T< S r, imUl ? 10n ro11 ce-SE^Es#, is's n t 

are turned oH auto engage' T auVe^L G ?i D3D ' GUID «> 

guidance pointer (PTR2D) is^set to 1. urned off and the 2D 

GLOBAL INPUTS: SIMALT, SIMHDG, SIMLAT, SIMLON, SMMAGV 

GLOBAL OUTPUTS.^ ££< IDDLAT ' 



MODULE NAME: 
FILE NAME: 
PROCESS : 


ENGAGE_CAS (Operate Simulator) 

NAVIG . FOR 

FMFAST 


93 


PURPOSE: To set the simulated state variables for the simulated 

airplane into the global locations for the flight 
software . 

CALLED BY: NAVIG 

CALLING SEQUENCE: CALL ENGAGE_CAS 
CALLS TO: ANGL, TAN 

DESCRIPTION : 

If the hold or initialize bits are set in SIMFLG, an immediate 
return is made to NAVIG. Otherwise the following variables are 
computed: 

o The simulated roll command (PHISYM) is computed as 

PHISYM = .0625* (BACMD - PHISYM) + PHISYM (.77 sec lag) 

PHISYM is then stored into the bank angle (ROLL) ; 

o TAS is set equal to CAS and MACH is forced to 0.2; 

o The heading for the simulated airplane (SMUHDG) is computed 
as 

SMUHDG = ANGL (SMUHDG + (0.5 * TMP1 / TMP2) ) 

Where: TMP1 = 1.91 * PHISYM 

TMP2 - MAX (CAS, 100) 

SMUHDG is set into HDGTRU by HNAVFS; 

o The cross track acceleration (IDDXTK) is computed as 

IDDXTK = IDDXTK + DELTAT * (GRAV0*tan (PHISYM) - IDDXTK); 

o The vertical acceleration (HDDOT) is set to the vertical 
acceleration command (VACMD) ; 

o The HDOT complementary filter output (HDCF) is computed as 
HDCF = HDCF + DELTAT * VACMD; 
o The inertial altitude (ALT) is computed as 
ALT = ALT + DELTAT * HDCF. 

NAVIG specific code in HNAVSL performs the additional 
adjustments necessary to use these outputs in lieu of data input by 
IOFLL. 



94 

GLOBAL 

GLOBAL 


INPUTS: ALT, BACMD , CAS, HDCF , IDDXTK, PHISYM, SIMFLG, 

SMUHDG, VACMD 

OUTPUTS: ALT, HDCF, HDDOT, IDDXTK, MACH, PHISYM, ROLL, 

SMUHDG, TAS 



95 


5.2 SLOW LOOP PROCESSING: 


MODULE NAME: CDUEXC (CDU Executive) 

FILE NAME: CDUEXC. FOR 

PROCESS: SLOW 

PURPOSE: Executive for the Control Display Unit Slow loop 

procedures . 

CALLED BY : SLOW 

CALLING SEQUENCE: CALL CDUEXC 


DESCRIPTION : 

A detailed description of CDUEXC and the attendant subroutines 
involved in CDU processing is found in the document 

NASA Contractor Report 189606 


Advanced Transport Operating System (ATOPS) 
Control Display Unit Software Description 


96 


MODULE NAME: 
FILE NAME: 
PROCESS : 


BLOW (Wind Computations) 

BLOW. FOR 

SLOW 


PURPOSE: Calculate wind speed and direction 

CALLED BY: SLOW 

CALLING SEQUENCE: CALL BLOW 

CALLS TO: SQRT, ATAN2, SCOSD 


DESCRIPTION: 

equations' arenas follows : Wi " d SPeSd m0delS COmputed ' The 

EQUATION 1: 


OLDWD = atan2 (X, Y) 
OLDWS = sqrt (X 2 + Y 2 ) 


Where: X 

Y 
VE 
VN 
SINTH 
COSTH 
TASGS 


SINTH * TASGS - VE 

COSTH * TASGS - VN 

velocity east in knots 

velocity north in knots 

sin of true heading 

cos of true heading 

true airspeed corrected for gamma 


Equation 1 is from the original C-4000 software 
accurate when flying straight and level, but indicate 
winds when the aircraft is maneuvering. 


It appears 
erroneous 


EQUATION 2: 


DFVWD = atan2 (X, Y) 
DFVWS = sqrt (X 2 + Y 2 ) 


Where 


X 
Y 

ASPD 

S 

C 

TMPA 


S * ASPD - VE 
C * ASPD - VN 
TAS * CTHET 

Sin (HDGTRU-TMPA*SROLL) 

COS (HDGTRU-TMPA*SROLL) 

ALFAV or ALW - 1, depending on 
the setting of Bit 0 of MCONF 


aX d dr ^^n^* > °'l e ^^^ dl ®° n ^ab er it de appears r °free le o^^ the^erroneous 
te«ed i 1 n n the a r ir n . 9 maneuverin 9- but has never been adequately 

select^one 9 2 3 ' via VIEW > allows the operator to 

select one of the 2 wind models or just accept the trr 

computations. The selected values (1: OLD, 2: DFV, 3:^3) are set 


97 


into WS and WD. 


GLOBAL INPUTS: 

IRSWS, 

WNDMOD 


ALFAV, ALW, COSTH, CTHET , HDGTRU, HRAD, IRSWD, 
MCONF , NAV64K, SINTH, SROLL, TAS, TASGS, VE, VN, 


GLOBAL OUTPUTS: 


DFVWD, DFVWS, OLDWD, OLDWS, WD, WS 


98 


MODULE NAME: 
FILE NAME: 
PROCESS : 


EPRLMT (Engine Pressure Ratio Limit) 
EPRLMT . FOR 1 
SLOW 


PURPOSE : 


To calculate the maximum 
the Boeing 737 aircraft 


engine pressure ratio (EPR) for 
jet engine. 


CALLED BY : SLOW 

CALLING SEQUENCE: CALL EPRLMT 
CALLS TO : None 


DESCRIPTION: 

EPRLMT produces maximum Engine Pressure RaHn / rD D> ■> • 
climb (MCLEPR) , cruise wcrrpri « 5 ? Ratio (EPR) limits for 

'' -ruise (mckepr) , and continuous thrust mrTRPo\ 

Depending upon the setting of EPRFLG (pilot selected vi* * 

one of these is selected as the maximum EPR (mxrpr\ CDU ) / 

for use by the auto throttle co“a» JcLI ’ dlSplaV and 
The program is organized in two looirai * 

bleed-air on, and for engine bleed-air ?ff if tiZhl'r 5 or . en ^ ne 

lower Ipr limits! . 6 q The 1 ca 1 c uTa tior^* c^ns ide r ^he S e f f e c t S o f ^ t at ^ 

~ m at^ns f „°ere th^o" ^ " 

are documented In the equations below ® n91ne and 

barometrical): itudef 6 13 firSt Calculated as a function of 
AF = ALT / 145499.6 

STAT_PRES = 29.92 (1.0 - AF (S.258 - AF (11.9 - 12.16 AF) ) ) 
enginef, 3 the 1 following equatiOTs'^retlluited?' 1 “ ° n f ° r either 

MXEPRT = 1.94 - .00628 TAT 


if (ALT > 30000) then 

AF = (ALT - 30000.) / 5000. 

endif MXEPRT = MXEPRT " AF (-025 + .00039 TAT) 


MXEPRP = 3.514 - .0535 STAT PRES 


Where : 


MCLEPR 


MXEPRT is max EPR as a 
MXEPRP is max EPR as a 


function of temperature; 
function of pressure. 


MCTEPR - MCREPR = min (MXEPRP, MXEPRT, 2.35) 


99 


if (1500. < ALT < 30000.) 
if (ALT > 18500.) then 
MCTEPR = MCLEPR 
else 

if (TAT < 17.5) then 
MXEPRT = 2.03 - 


then 


.00545 TAT 


else 

MXEPRT = 2.08 

endif 


.008375 TAT 


MXEPRP = 3.56 - .0547 STAT_PRES 

MCTEPR = min (MXEPRP , MXEPRT, 2.35) 
endif 


if (ALT > 10000.) 

if (TAT < -20.) 
elseif (TAT >20.) 
MCREPR = 1.764 - 


then 

MCREPR = 1.8568 - 
• .00571 TAT 


else 

MCREPR = 1.8125 
endif 


.008125 TAT 


endif 

If airbleed is off, the following equations 


MXEPRT 

MXEPRP 


1.97 - .0068 TAT 
3.589 - .0549 STAT_PRES 


MCLEPR = MCTEPR = min (MXEPRP, MXEPRT) 


if (TAT < -20.) then 

MXEPRT = 1.8568 - .00591 TAT 
elseif (TAT > +20.) then 

MXEPRT = 1.843 - .00714 TAT 

P 1 S0 

MXEPRT = 1.855 - .00775 TAT 
endif 


MCREPR = min (MXEPRP, MXEPRT) 


if (1500. < ALT < 18500.) then 
if (TAT >= 17.5) then 

MXEPRT = 2.053 - .00538 TAT 


else 

MXEPRT = 2.11 
endif 
endif 


.00853 TAT 


GAEPR = MCTEPR 
if (EPRFLG = 1) then 


.00591 TAT 


are evaluated: 



100 


MXEPR = MCLEPR 
elseif (EPRFLG = -l) then 
MXEPR = MCREPR 
else 

MXEPR = MCTEPR 
endif 

GLOBAL INPUTS: ABLOFF, ABROFF, ALT, EPRFLG, TAT 

GLOBAL OUTPUTS: MCLEPR, MCREPR, MCTEPR, MXEPR. 


101 


MODULE NAME: ERAD (Earth Radii Computations) 

FILE NAME: ERAD. FOR 

PROCESS : SLOW 

PURPOSE: To compute the radii of curvature in the East-West and 

North-South planes. 

CALLED BY: SLOW 

CALLING SEQUENCE: CALL ERAD 
CALLS TO: ANGL, MAG_VAR 


DESCRIPTION: 

If the simulated airplane is engaged, then magnetic variation 
(MAG VAR) has been set from the simulator data tables (SMMAGV) . If 
not, then MAGVAR is set by ERAD as follows: 

If IRS navigation is valid (INAW true), MAGVAR is computed as 
the difference between IRS true heading (THDG) and magnetic heading 
(MAGHDG) . Otherwise, the function MAG_VAR is invoked to compute 
the local MAGVAR based on present latitude (LAT) and longitude 
(LON) . 

The local North (RM) and East (RN) radii of curvature (using 
the WGS84 Earth model) and several related variables used by the 
navigation and guidance procedures are then set by evaluating the 
following equations: 

RN = RADIUS (1. + ELLIP * sin 2 (LAT)) 

RNP = CLAT (RN + WGSALT FTONM) 

RM = RADIUS (1. - 2. ELLIP + 3. ELLIP sin 2 (LAT)) 

RMP = RM + WGSALT FTONM 


Where: RADIUS 


ELLIP 

SLAT 

CLAT 

WGSALT 


is the nominal Earth radius in 
nautical miles (taken as 3443.9186 
NM) . 

is the eccentricity (3 . 3528107E-3) 
is the sine of the present latitude, 
is the cosine of the present latitude, 
is the present altitude corrected for the 
height of the local mean sea level above 
the reference geoid. 


RADFT = NMTFT (RM + RN) 12 . + WGSALT 
DLATFT = RMP NMTFT DTOR 
DLONFT = RNP NMTFT DTOR 


Where: RADFT 

DLATFT 

DLONFT 

DTOR 


is the best-fit local Earth 
radius in NM. 

is the number of feet per degree of LAT. 
is the number of feet per degree of LON. 
is the conversion from degrees to radians. 



102 

GLOBAL INPUTS: ALTCOR, CLAT, FLYFLG, INAW, LAT, LON, 

SLAT, THDG 


MAGHDG, 


GLOBAL OUTPUTS: 


DLATFT, DLONFT, MAG VAR, RADFT, RM, RMP, RN, RNP 


103 


MODULE NAME: HNAVSL (Horizontal Navigation Slow Loop) 

FILE NAME: HNAVSL. FOR P 

PROCESS : SLOW 

PURPOSE: To manually or automatically tune and monitor the path 

defined and cross track stations and use information from 
these stations and/or an ILS installation to create 
aircraft position updates for use by fast loop 
navigation. ^ 

CALLED BY: SLOW 

CALLING SEQUENCE: CALL HNAVSL 

CALLS TO: ANGL, CRBSC, GET_REAL, RADCAL, SIN, SIND, SORT, 

TAN, TUNPTH, TUNXTK 

DESCRIPTION: 

The radio update navigation routine (HNAVSL) acts as the 
executive for navigation updates. It calls the routines that 
autotune (or manually tune) the VORTAC's as path-defined or cross- 
path stations. Once suitable stations have been selected, HNAVSL 
validity checks and calls routines to compute range and 
bearing from the stations. The difference between the measured 
position and the estimated position is weighted according to the 
navigation mode (Inertial with radios, Air Data mode with radios, 
or radios only) . These weighted differences are output for use in 
updating the fast loop position and velocity estimates. In 
addition to VORTAC , s, ILS may be utilized if the airplane is in the 
correct zone. The ILS derived bearing of the airplane from the 
runway center line may be used in conjunction with a DME distance 
ho provide position error estimates. ILS may also be used as the 
sole navaid in the runway area. 

The acronym for the CDU display (IDD, IDX, etc.) is created 
according to the navigation mode being used and the combination of 
stations tuned. This navigation mode acronym is also displayed on 
the Navigation display. MLS and GPS inputs may also be used for 
navigation, but this is accomplished entirely in foreground 
processing. HNAVSL sets up the appropriate navigation mode 
display, but continues to concern itself with selection and tuning 
of standard navaids. 

HNAVSL is logically partitioned into the following sections: 
Initialization code: 

Packed error flag words F0, F2, F3, DMEER, and VORER to be 

used in the current HNAVSL pass are cleared. Local variables 
(SLLAT, SLLON) are assigned the most recent position estimate from 
fast loop navigation and local copies (DME3, DME2 , VOR2, SLOCDV, 
SGSDEV) are made of the most recent navaid input data. The Boolean 
flag, MLSFLG, is set if MLSMOD is true or if MLS navigation updates 
have been selected via the nav pallet switch (MLSSLI) and MLSVLD is 
true. Local subroutine RADCAL is then called to compute the 
airplane position vector, PSVECT. 



104 


Station tuning: 

The local subroutine TUNPTH and the external subroutine TUNXTK 
are next called to select and tune the path (DME2) and cross-path 
(DME3) stations, respectively. Failures are recorded in 
FALST2/FALST3. On return, additional checks are performed to 
ensure that valid signals are being received from the selected 
stations, with errors recorded in DMEER and VORER as appropriate. 
Ultimately, the error summary is logged in F0, F2 and F3 (for DME3, 
DME2 and VOR2, respectively) . 

Position error computations: 

Processing begins with the cross station, DME #3. If bit 9 of 
the simulated airplane control word (SIMFLG) is set, DME3 is set 
equal to the computed range (CDME3) and the station validity flag 
(DME3VD) is ignored. Otherwise, bit 13 is set in DMEER if DME3VD 
is false. Bit 14 of DMEER is set if any bits were set in FLSTA3 by 
TUNXTK. Next, the basic filter gain (DELGN) is set to 0.5 if 
either the Air Data (FLADM) or Radio (FLRM) mode flag is set and 
otherwise set to 0.25. The magnitude of the measured range is then 
checked. If DME 3 is not greater than zero (indicating invalid 
data), bit 11 is set in DMEER, and if it is greater than 200 
nautical miles (nm) , bit 12 is set. Next, if the selected station 
address (NVAD3A) is zero (no station selected), CDME3 is zeroed. 
Otherwise, local subroutine CRBSC is called to compute the range 
and bearing of the station. (Note: the bearing is not used for 
DME #3) . CRBSC also computes the cosine of the depression angle 
(COSDA) and the sine and cosine of the computed bearing (SINCB, 
COSCB) . If the computed range is greater than 200 nm, bit 10 is 
set in DMEER, or if CDME3 was forced to zero, bit 7 is set. 
Otherwise, DRANGE is computed as (CDME3 - DME 3) times COSDA. If 
this delta ground range is greater than 5 nm, bit 9 of DMEER is 
set. Otherwise, the North and East position errors (elements 1 and 
5 of the H matrix) are computed as follows: 

H ( 1 ) = DRANGE * COSCB * DELGN 

H (5) = DRANGE * SINCB * DELGN 

Additionally, bit 8 of F0 is set if the aircraft altitude is 
greater than the ground range to the station. This 'H > R' 
indication is a 'not broke but don't use' flag which inhibits 
navigation using this station, but does not cause retuning. (Note: 
this check as implemented works fine on the East coast, but would 
not be reliable in Denver. Some potential fixes would be: 
Subtract CRBEL from IDDALT before comparison; Check for COSDA > 
0.707; Use TRANSV(3) (once fixed) for the comparison) . 

Finally, DMEER is OR'd into F0. If DMEER was zero, the 
station timer (TIMS1) is cleared and the 'data timeout' bit in 
FLSTA3 should be cleared. (Bit 12 ('no path station') is being 

cleared) . ... 

If DMEER was non-zero, TIMS1 is checked. If it was previously 
zero, it is set to the present time. Otherwise, a check is made to 
see if the error has existed for more than 15 seconds ( (TIME - 
TIMS1 ) > 15) . If so, TIMS1 is cleared and, if the bank angle 


105 


(ROLL) is less than 15 degrees, bit 14 is set in FLSTA3. 
Subroutine TUNXTK will check FLSTA3 on the next iteration and 
retune if necessary. The 'timeout' error is ignored when ROLL is 
greater than 15 degrees, as the data is not used under these 

conditions. . . 

The path station (DME2) is processed next. Processing is the 
same as for the cross station except as noted below. The PTHSTA 
flag is set to enable additional processing in CRBSC. Provision is 
made for calculating position errors from measured versus 
calculated VOR2 bearing as well as from DME range, although the 
present hardware configuration does not permit input of VOR bearing 
data. The VORVLD bit is hardwired false in low level code (DISFD) 
to prevent its inadvertant use for navigation. Nevertheless, the 
simulator is set up to test the code. Bit 8 of SIMFLG is used for 

DME2 and bit 7 is used for VOR2. Errors detected by TUNPTH are 

logged in FLSTA2 and the error summary is stored in F2 (for the 
DME) and F3 (for the VOR) . If no station has been selected (NVAD2A 
= 0), both calculated range (CDME2 ) and calculated bearing (CVOR2) 
are zeroed. Any DME errors are logged in both DMEER and VORER, as 
the VOR data is necessarily scaled by range to the station. 
Additional errors are logged in VORER for CDME2 > 150 nm (bit 12) , 
delta bearing (DELBR) > 30 degrees (bit 9) , and DELBR * ground 
range (GRMAG) > 5 nm (bit 11) . If the DME data passes all checks, 

North and East position errors are computed as follows: 

H (3) = DRANGE * COSCB * DELGN 

H (7) = DRANGE * SINCB * DELGN 

If it were possible for the VOR data to pass all checks, DELBR 
would be converted to radians and the North and East position 
errors computed as follows: 

H (4 ) = TEMPI * DELBR * TRANSV(l) * DELGN 

H(8) = TEMPI * DELBR * TRANSV(2) * DELGN 

Where: TEMPI is a VOR weighting gain computed as 
.125 * (DMEMAX - DME 2) / DMEMAX, 

TRANSV is the transpose vector computed by 
CRBSC (measured in the local horizontal 
plane) , 

DMEMAX is DME max range = 200 nm. 

Finally, DMEER and VORER are OR' d into F2 and F3 and 'data 
time-out' is checked, using TIMS2 and the same error in clearing 
FLSTA2 as noted above for FLSTA3 . 


ILS processing: . . ... . . 

Checks are made to see if the aircraft is within the 

appropriate range and bearing of a selected ILS station. If oPb 
navigation mode has been selected (NAVMOD = 2) , RADCAL is first 
called to recalculate the airplane position vector using GPS 
position data. This is to preclude a possibly erroneous ILSZON 
calculation based on radio navigation data. If an airport has been 



106 


selected and it is within the delta lat/lon limits, CRBSC is called 
to calculate the range and bearing (RNGLS, BRGLS) from the 
localizer to the aircraft, and BRGLS is rotated into runway 
coordinates. If the range and bearing are within limits, the 

ILSZON flag (used by autoland control laws) is set, and if further 
criteria are met. North and East position errors are computed from 
the difference between the measured and estimated ILS bearing and 
(possibly) glideslope. 

Position corrections perpendicular to runway heading are 
computed if neither MLS nor GPS navigation has been selected, the 
localizer is valid and the localizer deviation and aircraft delta 
track are within specified limits. The equations evaluated are: 

DLPP = DTOR * (BRGLS - LOCDEV) 

DLNPP = DLPP * TRANSV ( 1 ) 

DLEPP = DLPP * TRANSV (2) 

Where: TRANSV is the vector computed by CRBSC giving 
the location of the localizer in locally 
South, East and up coordinates in nautical 
miles (nm) . 

If no field DME is available and the aircraft is on the last 
leg of . a 3D path coincident with the glideslope, position 
corrections along the runway centerline may be made using 
glideslope data. Two algorithms are coded. The second of these 
(which was the first coded and the only one which has been used in 
flight) computes both along runway and across runway corrections as 
follows : 

temp = RWYLEN + HTDZ / tan (GSA + GSDEV) 

DLPP = (XTK + temp * sin (LOCDEV) ) * FTONM 
DLNPP = DLPP * SINRH 
DLEPP = -DLPP * COSRH 

temp = HTDZ * GSDEV / (GSA GSDEV) 

DLPP = (HER + temp) * FTONM / tan (GSA) 

DLNPP = 0.5 * (DLNPP + DLPP * COSRH) 

DLEPP = 0.5 * (DLEPP + DLPP * SINRH) 

Where: XTK is the 3D path crosstrack error (in feet) 

HER is the 3D path altitude error (in feet) 

HTDZ is height above ground level (in feet) 

This algorithm works reasonably well, but the range estimate 
used to scale the beam errors is derived from radar altitude 
divided by nominal glide slope angle. This is subject to errors 
caused by terrain, altimeter scaling errors and the maximum 
altimeter range (1326 ft) . In Autoland, this is masked by the fact 
that the beam errors are essentially zero. If the plane is being 
manually flown, however, these scaling errors can cause navigation 
errors. The other algorithm attempts to avoid this problem by 
using the range estimate (RNGLS) derived from CRBSC. The equations 


107 


are: 


DLPP 

DLNPP 

DLEPP 

DLPP 

DLNPP 

DLEPP 


XTK * FTONM + RNGLS * sin (LOCDEV) 

DLPP * SINRH 
-DLPP * COSRH 

(HER + DTOGO * sin (GSDEV) ) * FTONM / TANGSA 

0.5 * (DLNPP + DLPP * COSRH) 

0I5 * (DLEPP + DLPP * SINRH) 


5SS s; 5SLS 

poStion'^ofre^ns VpN^and DPE) to fast loop navigation 
(HNAVFS) . 

Note: the following errors exist negation ^The^orrec? 

is bad, an attempt is made to use is the status 

VOR to use would be VOR3, but 3 always shows bad 

word for VOR #2. (Confusing, lt7 » • * s f ” t a CO nIistenoy, FI 

status, this mode 0 t S v SB V »3) is checked when DME2 is good and DME3 
(the status word for VOR tJ) is t V0R to use . This CAN 

is bad, although VOR2 woul( J b t to anything. It therefore 

cause a problem because 1 non-existent VOR3. Should this 

shows good status ( 0) or he n be h4 and h8> which is the 

condition occur, the data selec always zero (since 

data for the (correct VOR **• navigation mode is IXD or 

firs 

or MLS) . 

Navigation mode indicators: , NAV typ> and a coded mode word 

An ASCII character string mWV) * ^ cdu and the 

(MNAVTY) are set up to dr ^- v ? n ^ he pilot as to the navigation 
Navigation Display, which advi . ti £) the probable navigation 

accuracy. rC Votential ll inodes y (arranged ^n hierarchical order, are as 

follows : 

AMX: MLS mode (MLS da ^ 5 a 6 radiQ f na v 1 " 3 / U ter ^ih i ch is 

IMX: MLS nav source (MLS drives rau 

then used for navigation) 

DGP * Differential GPS with good status 
AGP: Absolute GPS with good status 



108 


GPn: Degraded GPS tracking 'n' satellites 
GXX: GPS selected but not valid 


^be following codes may begin with 'I / 
reference) , 'A' (Air data velocity reference) 

only) . ixx is the only code likely to be seen 


(Inertial velocity 
or 'x f (Radio mode 


ILD: 
ILG: 
I LX; 
IDD : 
IVD : 
IDV: 
IDX/ 

IXX: 


ILS localizer and DME #2 
ILS localizer and glideslope 

ILS localizer only (No along track correction! 

DME #3 and DME #2 (Inertial-Dual-DME) 

VOR #2 and DME #2 (Presently not possible) 

DME #3 and VOR #3 (Also not possible) 

IXD: Single DME is tuned and valid. No navigation 
updates are computed (except as noted above). 

o valid DME, or bank angle greater than 15 
degrees. No navigation updates are computed. 


flaqs HN F0 SL F2°anri e p? S • by copying the local failure 
g / / F2 and F3, into the global flags, FOG, F2G and F3G. 

GLOBAL INPUTS: ACTCNT, AIRPTS, ANTLAT, ANTLON CDME2 rnivm 

COSRH, CV0R2, DIFMOD, DTOGO, DME2VD, DME3TO DVE n™’ 
FLADM, FLRH, FLSTA2, FLSTA3, GPNAV, GPNAW g'pSSEL S' 
GSDEV, GSVLD, HER, HRAD, HTDZ, IDDaX iLdiIt IDDroS' 
ILDPRF, ILDHIG, ILGRNG, ILSZON, LAT, LON, LOCDEV MCV^n' 
MAG VAR, MDME2, MDME3, MLSMOD, MLSSLI, MLSVLd' 

NAV64K, NAVMOD, NVAD2A, NVAD3A, PTR2D, ROLL ' RotSdp' 

SS: W ^an^'tS! h ?k,' 


GLOBAL OUTPUTS: BRGLS, CDME2, 

DVE, DVN, FOG, F2G, 
NAVCTR, NAVTYP, RNGLS 


CDME3, CVOR2 , DPE, 
F3G, ILSZON, KIP, 


DPERRF, DPN, 
K2P, MNAVTY, 


109 


MODULE NAME: 
FILE NAME: 
PROCESS : 


RADCAL (Earth Radius Calculations) 

HNAVSL . FOR 

SLOW 


PURPOSE: Calculate the aircraft position vector, PSVECT. 

CALLED BY : SLOW 

CALLING SEQUENCE: CALL RADCAL 
CALLS TO: COSD, SIND 

DESCRIPTION i 

RADCAL uses SLLAT and SLLON (the local copies of the aircraft 
position estimate calculated by HNAVFS) , aircraft altitude (ALTCOR) 
and the Earth model parameters (RADIUS, ELLIP and ESQ) to compute 
PSVECT, the ellipsoidal Earth vector from the center of the Earth 
to the* aircraft position. The equations evaluated are as follows 
(simplified form) . 


temp = RADIUS * (1. + sin 2 (LAT) * ELLIP) + ALTCOR * FTONM 


temp * sin(LAT) * (1. - ESQ) 
PTVECT = -temp * sin (LON) * COS (LAT) 
temp * cos (LON) * cos (LAT) 


Where: RADIUS is the nominal earth radius (3443.9186 nm) , 

ELLIP is the ellipticity (3.3528107 E-3) , and 
ESQ is the eccentricity squared (6.6943801 E-3) . 
All quantities are per the WGS-84 Earth model. 

GLOBAL INPUTS: ALTCOR, SLLAT, SLLON 

GLOBAL OUTPUTS : None 


110 


MODULE NAME: 
FILE NAME: 
PROCESS : 


CRBSC (Range and Bearing Calculations) 

HNAVSL . FOR 

SLOW 


PURPOSE: Compute the slant range, ground range and bearing from 

the aircraft to a VOR, ILS or DME. g 

CALLED BY : SLOW 

CALLING SEQUENCE: CALL CRBSC (RANGE, BRG) 

CALLS TO: ATAN2D, COSD, MXV, SIND, SQRT, VMG 

DESCRIPTION: 

path station flag (PTHSTA) is true, DPHI1 and DLAM1 
(the delta latitude and longitude between the aircraft and the oath 
station) are calculated and the PTHSTA flag is cleared DPHii P *nH 
DLAMi are used by TUNXTK to calculate the wedge angle between the 
path station and the cross station. 

CRBSC then uses CRBLT , CRBLG and CRBEL (the station 
longitude and elevation set up by HNAVSL) , and the Earth model 
parameters (RADIUS, ELLIP and ESQ) to compute PT^CT,the 
ellipsoidal Earth vector from the center of the Earth to the 
navaid. DVECT is computed by subtracting PTVECT from PSVECT (the 

^ScaL °s m R £5? fS nt ? ° f the Earth t0 the competed by 

r (slant range to the navaid) is then computed as the 

{siSLf^formr 0 " 0 " eValUated a ™ «» 


temp = RADIUS * (1. + sin 2 (CRBLT) * ELLIP) + CRBEL * FTONM 


temp * sin (CRBLT) * (1. - ESQ) 
PTVECT = -temp * sin (CRBLG) * cos (CRBLT) 
temp * cos (CRBLG) * cos (CRBLT) 


Where: RADIUS is the nominal earth radius (3443.9186 nm) , 
ELL!P is the ellipticity (3.3528107 E-3) , and 
ESQ is the eccentricity squared (6.6943801 E-3) 

All quantities are per the WGS-84 Earth model. 

DVECT = PSVECT - PTVECT 


SRMAG = VMG (DVECT, 3) 


Where: VMG is an external function which returns the 
magnitude of a vector of a specified length. 
I.e, the square root of the sum of the squares 
of the elements of the vector. 


T ^frc^.m anS ^° Se matr ^ x (TVECT) is then computed and multiplied 
imes ECT to produce the transposed difference vector, TRANSV. 
The elements of TRANSV are the North, East and up coordinates of 



Ill 


the aircraft relative to the navaid in a locally horizontal plane. 
That is, a plane with its origin on the geoidal approximation of 
the Earth and directly under the aircraft. The equations evaluated 
are as follows: 

0.0 cos (LON) sin (LON) 

TVECT = -COS(LAT) -sin (LAT) sin (LON) sin (LAT) cos (LON) 
sin (LAT) cos (LAT) sin (LON) cos (LAT) cos (LON) 


TRANSV = [ TVECT ] [ DVECT ] 


Note: The Z coordinate of TRANSV (TRANSV (3)) is 

incorrect because the sign of TVECT (3, 2) is 
incorrect. The quantity (-cos (LAT) sin (LON)) 
yields the correct value. TRANSV(3) is not 
used in any calculation. 

Finally, the ground range and bearing (magnetic) of the 
aircraft from the station (GRMAG, MAGBEAR) , the sine and cosine of 
the (true) bearing (SINCB, COSCB) and the cosine of the depression 
angle (COSDA) are computed. 

GRMAG = sqrt ( TRANSVj 2 + TRANSV 2 2 ) 

MAGBEAR = at an ( TRANSVj, TRANSV 2 ) 

SINCB = TRANSV, / GRMAG 

COSCB = TRANSV 2 / GRMAG 

COSDA = GRMAG / SRMAG 

TRANSV, is then negated for use by HNAVSL in computing 
position errors from the calculated VOR or ILS angular errors 
(making this element positive south vice positive north) . 

GLOBAL INPUTS: SLLAT, SLLON 


GLOBAL OUTPUTS: 


None 



112 


MODULE NAME: TUNPTH (Path Defined Station Tuning) 

FILE NAME: HNAVSL . FOR 

PROCESS: SLOW 

PURPOSE: To select and tune a station for DME #2. 

CALLED BY: HNAVSL 

CALLING SEQUENCE: CALL TUNPTH 

CALLS TO: NXTPS, T1CHEX, TUNDM2, TUNEPS 

DESCRIPTION: 

TUNPTH, together with its internal subroutines NXTPS, T1CHEX 
and TUNEPS, and the external subroutine TUNDM2 , selects and tunes 
a navaid for DME #2 (the path station) . It first checks to see if 
the station was manually tuned (indicated by the auto-tune flag, 
ATNAV2, being false and the station address, NVAD2A, being non- 
zero) . If so, it checks the status word (FLSTA2 ) . The check 
should be for 'station-not-tuned (bit 13) and timer expired' or 
'station failed' (any other bit set in FLSTA2) . The way the 
parentheses are grouped, the timer would be checked only if the 
'station-not-tuned' bit is NOT set. If status is bad and ground 
speed is greater than 140 kts, the RETUN2 flag is set. (In the 
original NCDU code, this caused a message to be displayed on the 
CDU, but this feature was not implemented in the new CDU code. Had 
it been, we might have noticed that the logic used to set it is 
erroneous.) Next TUNPTH calls TUNEPS and T1CHEX to output the 
tuning code and verify that the station has properly tuned to the 
selected frequency. 

If auto-tune is enabled or if no station has been selected, an 
attempt is made to automatically select a path station. If ground 
speed is less than 64 knots (NAV64K false) , only the path defined 
station may be used. PTRSTA is set to the 'to waypoint' pointer 
(TOWPT) and NXTPS is called to fetch the path station address. If 
PTRPS is returned as a zero (indicating 'no path station'), bit 14 
of F2 is set. (This is an error, but the effect is only to lose 
the record of the original failure, since any bit set in FLSTA2 
causes bit 14 of F2 to be set in HNAVSL mainline code. Bit 12 of 
FLSTA2 should be set.) Otherwise, NVAD2A is set to PTRPS, TUNEPS 
is called to output the tuning code and T1CHEX is called to check 
the tuning, setting bit 13 of FLSTA2 if unsuccessful for more than 
four seconds. Next, FLSTA2 is set unconditionally to '1000' hex 
(bit 12 only) . This is also an error. The effect is to disable 
radio navigation below 64 knots, while wiping out any real errors 
that may have been logged. Bit 12 should only be set as indicated 
above . 

If NAV64K is true, full station search logic is enabled. The 
'no path station' flag is cleared and the PSFAIL flag is set if any 
other errors were logged in FLSTA2 and the error is timed out. 
Next, a check is made to see if it's time to update the path 
defined station (done when halfway to the next waypoint) . If the 
update has already been made (station pointer ahead of waypoint 
pointer) , PSFAIL is tested and if true, TUNDM2 is called to find 
another station. TUNEPS and T1CHEX are then called as above. 


113 


It the station pointer is behind bb ?p «ypoint pointer, ^t^s 

set equal to the waypoint jpointer^a are equal and the aircraft is 
next path station. If the po _ t * false, T1CHEX is called 
not yet at the halfwaypoint an^PSFAi Jf it is non-zero 

to verify tuning. STADIA NVAD2A is set to PTRPS and TUNEPS is 
and not equal ho NV i uninq code. If PTRPS is zero or equal to 
called to output the PSFAIL is false, otherwise the station 
NVAD2A, TlCHEX is < called i^PSFi UL £ £ T ^ en , if no next station 

pointer is updated TI iMnM2 is called to search for any usable 
«aUon d Oth?r«i'se%M2h is set to PTRPS and TUNEPS is called to 
output the tuning code. 

GLOBAL INPUTS: ATNAV2 , DTOGO, FLSTA2. GS, NAV64K, NVAD2A, 
RETUN2 , TOWPT 


GLOBAL OUTPUTS: FLSTA2, NVAD2A 



114 


MODULE NAME: 
FILE NAME: 
PROCESS : 


™ PS (Next Path Station) 
HNAVSL . FOR 

SLOW 


PURPOSE : 


To get station defined by 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


TUNPTH 
CALL NXTPS 
None 


next 


waypoint . 


DESCRIPTION: 

i, no path 

buffer entry indicated ^PTRSTA^Md* a?p 8 i s fOUnd ^ the ^uidanci 
thl waypoint °po inter, f ° V the seSfp^teTtJ^ 


GLOBAL INPUTS: GUID2D, TOWPT, WPT ACT 

GLOBAL OUTPUTS : 


None 


115 


MODULE NAME: 
FILE NAME: 
PROCESS: 


TUNEPS (Tune Path Station) 

HNAVSL . FOR 

SLOW 


PURPOSE: Tune the path station (DME #2). 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


TUNPTH 
CALL TUNEPS 
GET WORD 


DESCR U™e : path nation address l-^s ^"mched^frorn^th! 

SavIgatTon^dtta"^ a^pUced in "the tune output word (ATUNE2) . 
?he status word (FLSTA2) is then zeroed. 


GLOBAL INPUTS : NVAD2A 

GLOBAL OUTPUTS: ATUNE2, FLSTA2 



116 


MODULE NAME: 
FILE NAME: 
PROCESS : 


T1CHEX (Tuning Checks) 

HNAVSL.FOR 

SLOW 


PURPOSE: Check path station tuning 

CALLED BY : TUNPTH 

™fJ N ™ SEQUENCE: CALL T1CHEX 
UALLS TO: None 

DESCRIPTION: 

indict- U™\ FQ l It e Z alS ,, the ° cod. 

indicating that the DME #2 inputs are m s , hou , ld check bit 8 - 
the out-neq-in' bit (bit 13) i n FLSTA? . be simula ted for NAVIG) 
faii timer (PSTMR) i s zeroed. Other^fse fh 6a f ed and the Nation 

firs?"/ ¥ and PSTMR is checked? S pstmr -° Ut " neq "f n/ bit ^ 

first pass for this condition) it- io ls zero (indicating 

seconds (TIME) . Otherwise, PSTMR is suhtra ^ Present time in 

ma?rr SUlt is greater than 4 seconds pstmr 6 ^ fr ° m TIME and ' if 
mime code checks for PSTMR equal zero with ^LSTA^not Z TUNPTH 

t An « . — . zero. 


GLOBAL INPUTS : 
GLOBAL OUTPUTS: 


ATUNE2, DME2FQ, FLSTA2, SIMFLG, TIME 
FLSTA2 


117 


MODULE NAME: TUNDM2 (Autotune DME #2) 

FILE NAME: TUNDM2 . FOR 

PROCESS: SLOW 

PURPOSE: Find a suitable 'path station' when no path has been 

entered or the path has no stations coded. 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


TUNPTH 
CALL TUNDM2 

GET LONG, GET_REAL, NXT_STA2, SEARCH_STA2 


DESCRIPTION: . , „ 

TUNDM2 begins by checking the 'search-in-progress' flag 
(RINPFL) . If RINPFL is true, the high altitude flag (HIALT2) is 
gg£ according to present aircraft altitude, and NXTSTA2 is called 
to update to the next station in the longitudinal strip. 

If RINPFL is false, the permissable search range (ZONELM) is 
set to the minimum (ZONERGE = 40 nm) , the zone search counter 
(RZNCTR) is reset to zero, the local strip pointer (X2PTR) is reset 
to the beginning of the longitudinal strip pointers and a search is 
initiated for that two degree wide longitudinal strip which 
includes the aircraft present position. This search continues 
until the strip is found or until the end of the longitudinal 
strips in the navigation data base is found. (The present data 
base contains data for all of the continental United States: 66 to 

124 degrees west longitude) . . • 

When the proper strip is found, the zone pointer (RZNPTR) is 
set to point to the address of the first station in the strip, 
NAV ADD2 is loaded with the address of this station, RINPFL is set 
true and SEARCH_STA2 is called to check if this is a usable station 
and search further if not. 

GLOBAL INPUTS: IBPTR, IDDALT , SLLON, 

GLOBAL OUTPUTS: RZNCTR, RZNPTR, ZONELM 



118 


MODULE NAME: 
FILE NAME: 
PROCESS : 


NXTSTA2 (Select Next Station) 

TUNDM2 . FOR 

SLOW 


PURPOSE: Select the next station in a search sequence. 

CALLED BY : TUNDM2 

CALLING SEQUENCE: CALL NXTSTA2 

CALLS TO. CHOOSE_STR2 / EXT_RGE2, GET__LONG, SEARCH_STA2 

DESCRIPTION: 

next station the 

(indicating the end of the strip) the tnno SSS c ° ntains a zero 
incremented. if it is then equal * (o ‘ R2N ?? R > is 

extend the search range. Otherwise CHOOSF • S Ca A^ ec ^ to 

choose the next longitudinal strip CH OOSE_STR2 is called to 


GLOBAL INPUTS: RZNCTR 


GLOBAL OUTPUTS : RZNCTR 


119 


MODULE NAME: SEARCH_STA2 (Find Next Station) 

FILE NAME: TUNDM2 . FOR 

PROCESS: SLOW 

PURPOSE: Search a longitudinal strip for a suitable station. 

CALLED BY: TUNDM2 , NXTSTA2 

CALLING SEQUENCE: CALL SEARCH_STA2 

CALLS TO BMPSTA2, GET_BYTE, GET_REAL, SQRT 

DESCRIPTION : 

Initially the search-done flag (DONE) is cleared. Each 
station in the longitudinal strip is checked to verify that it is 
a VORTAC, that it is not one of the stations presently tuned and 
(if the high altitude flag (HIALT2) is set) that it is a high 
altitude navaid. If any of these checks fail, BMPSTA2 is called to 
update to the next station or set the DONE flag. 

If the station is of the correct type, the distance to the 
station (DIST) is approximated and the effective range of the 
station (RANGE) is computed as a function of the elevation of the 
aircraft above the station. If the station is out of range (DIST 
> RANGE) or is beyond the allowable search range (DIST > ZONELM) , 
BMPSTA2 is called as above. 

If all tests have passed, NVAD2A is set to the selected 
station address. Note that exit from this subroutine does not 
guarantee that a station has been found. At most, one full strip 
will be searched. If no suitable station is found, this will be 
detected by TUNDM2 on a subsequent iteration of the slow loop and 
result in another call to SEARCH_STA2. 

GLOBAL INPUTS: ALTCOR, NVAD2A, NVAD3A, SLLAT, SLLON, ZONELM 

GLOBAL OUTPUTS: NVAD2A 



120 


MODULE NAME: BMPSTA2 (Pick Next-in-strip) 

FILE NAME: TUNDM2 . FOR 

PROCESS: SLOW 

PURPOSE* Increment to the next station in a search sequence. 

CALLED BY: SEARCH_S TA2 

CALLING SEQUENCE: CALL BMP STA2 (DONE) 

CALLS TO: CHOOSE_STR2, EXT_RGE2, GET_LONG 

DESCRIPTION: 

The station address (NAV_ADD2) is incremented to point to the 
next station in the longitudinal strip and the word at that address 
is checked. If this word is zero, (indicating the end of the 
strip) , the zone counter (RZNCTR) is incremented. If RZNCTR is 
then equal to five, EXT_RGE2 is called to extend the search ranqe 
Otherwise, CHOOSE_STR2 is called to choose the next longitudinai 
strip. In either event, the DONE flag is then set to cause 
SEARCH_STA2 to exit its search sequence. 

GLOBAL INPUTS : RZNCTR 


GLOBAL OUTPUTS: 


RZNCTR 


MODULE NAME: 
FILE NAME: 
PROCESS : 


CHOOSE_STR2 (Select Next Longitudinal Strip) 

TUNDM2 . FOR 

SLOW 


121 


PURPOSE: Choose a new longitudinal strip to search. 

CALLED BY: BMPSTA2, NXTSTA2 

CALLING SEQUENCE: CALL CHOOSE_STR2 
CALLS TO: EXT_RGE2, GET_LONG, LOOKL2 

DESCRIPTION: 

This subroutine is entered when the previously selected 
longitudinal strip has been searched unsuccessfully for a suitable 
station. It begins by setting INDST, used by L00KL2. (Note: 

INDST is actually a constant pointing to the westernmost strip in 
the navigation data base, but it cannot be computed at compile 
time) . One of five sections of code is then executed depending on 
the value of the zone counter, RZNCTR. (hereinafter referred to as 
'the value' ) . 

If the value is 1, we are in that 2 degree strip which 
includes the aircraft position. If another strip exists to the 
east, NAV_ADD2 is set to point to the first navaid in that strip. 
If not (the location at RZNPTR + 8 is zero) , RZNCTR is set to 3 (to 
insure that a subsequent entry doesn't repeat the attempt to move 
east) and L00KL2 is called to attempt to move to the west. 

If the value is 2, processing proceeds identically, except 
that the initial attempt is to move to the second strip to the east 
of present position. 

If the value is 3, L00KL2 is called to move to the first strip 
to the west of present position. 

If the value is 4, the second strip to the west is chosen if 
one exists. Otherwise EXT_RGE2 is called to extend the search 
range and reset the zone counter. 

GLOBAL INPUTS: IBPTR, RZNCTR, RZNPTR 


GLOBAL OUTPUTS: 


None 



122 


MODULE NAME: EXT_RGE2 (Extend Search Range) 

FILE NAME: TUNDM2 . FOR 

PROCESS : SLOW 

PURPOSE: Extend station search range by 40 nm. 

CALLED BY: BMPSTA2, CHOOSE_STR2, NXTSTA2, LOOKL2 

CALLING SEQUENCE: CALL EXT_RGE2 
CALLS TO : GET_LONG 

DESCRIPTION: 

EXT_RGE2 is called when all permissable longitudinal strips 
have been searched out to the present search limit without finding 
a suitable navaid. The zone counter (RZNCTR) is zeroed, resetting 
the zone to aircraft present longitude, NAV_ADD2 is set to point to 
the first navaid in that strip (as indicated by RZNPTR) and the 
search range limit (ZONELM) is increased by 40 nm. If this 
increase results in ZONELM being more than 200 nm, the search in 
progress flag (RINPFL) is cleared -- thus reinitializing the search 
— and ZONELM is reset to 40 nm. 

GLOBAL INPUTS : RZNPTR 

GLOBAL OUTPUTS: RNZCTR, ZONELM 


123 


MODULE NAME: 
FILE NAME: 
PROCESS : 


LOOKL2 (Select Next Strip to West) 

TUNDM2 . FOR 

SLOW 


PURPOSE: Choose a new longitudinal strip to the west (Look Left). 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


CHOOSE_STR2 
CALL L00KL2 (INDST) 
GET LONG 


“" value of (RZNPTR -24) is compared to INDST and, if 
create?? NAV ADD2 is set equal to the longitudinal strip address 
found at the indicated address in the navigation data i base >. If 
< RZNPTR - 24) is less than INDST, there are no more longitudinal 
!trips R to the west, and EXT_RGE2 is called to extend the search 
range and reset the zone counter. 

GLOBAL INPUTS: RZNPTR 

GLOBAL OUTPUTS : None 


124 


MODULE NAME: 
FILE NAME: 
PROCESS : 


TUNXTK (Cross Track Station 

TUNXTK . FOR 

SLOW 


Tuning) 


PURPOSE : 


To tune station #3 manually or by auto-tune 
cross track station. 


to a suitable 


CALLED BY : HNAVSL 

CALLING SEQUENCE: CALL TUNXTK 

CALLS TO: GET_WORD, SEARCH_INIT, XTK_AUTO, XTK_MAN 

DESCRIPTION: 

select ed^^nd "tuned?" To" t'ecually^^tine' 8 a Ua ^ross-stat ^ 
entered via the PROGRESS #2 paqe on the rnn Sta 5* on ' one , 1S 

this CDU input finds the navaid in the navigation datahp^ 6 
its address in the navaid address variable, N^^3 a ?t flsn^i S6tS 
the cross-track mode flag, ATNAV3 indi raHn« »,„* It also clears 

When not manual tuning, ATNAV3 will be set and aut^tunin^will^e 
the active mode. In auto tuning mode TUNXTK 
subroutines) searches the navigation 9 da base a s^tah?* 

st^L^nrm^/re 6 sought. ^ condition/^detect^d?^ 

present^^selected Sa not e^ua^O)* “^ot^SEA^VMIT ■ * 

Se fT r h C ^ f °hL a /^wi^Frf/nei? 

trrc^ y d be i°/!tTs 1 V7 th ^ S The 6 NAV 6 4 K 

must be on the ground, so^no search "would 4 be^suiUsslu^ 1 ?;^ 
output tuning code (ATUNE3) is set equal to that nf ehl 1 ' T1 ?® 

SSSSSS u 0 se by o^e 3A cros F s S s T t A a 3 t ionrand Set "° ' 1000 ' hex 

. 11 NAV64K is* true 3 and" ATWW3 Ts" ^"Sd^elin^^aTluto 
tuning is permitted for DME3) , subroutine XTK an™ ?. ™J, a “ 


GLOBAL INPUTS: ATNAV3, FLSTA3, NAV64K, NVAD3A 

GLOBAL OUTPUTS: ATUNE3, FLSTA3 


MODULE NAME: 
FILE NAME: 
PROCESS: 


XTK_MAN (Manual Tuning) 

TUNXTK . FOR 

SLOW 


125 


PURPOSE: To tune station #3 manually. 

CALLED BY : TUNXTK 

CALLING SEQUENCE: CALL XTK_MAN 

CALLS TO: CMP_FREQ, GET_REAL, GET_WORD, TUNCK 

DESCRIPTION: 

The output tuning code (ATUNE3) is set equal to that of the 
navaid pointed to by NVAD3A, the station status word (FLSTA3) is 
cleared and TUNCK is called to verify station geometry. If bad 
geometry status is returned (BADG = true) , the bad geometry bit 
(bit 11) is set in FLSTA2 if ATNAV2 is true (forcing selection of 
a new path station) and otherwise is set in FLSTA3 (which will 
cause a DME fail indication on the CDU) . If geometry is good, 
subroutine CMP_FREQ is called to verify that the selected station 
has been tuned. 

Note: the line of code which sets FLSTA2 sets it equal to the 

'OR' of FLSTA3 (vice FLSTA2) and the 'bad geometry' bit. This has 
functional significance, but could make it confusing to analyze 
the status words. 

GLOBAL INPUTS: ATNAV2 , FLSTA3, NVAD3A 

ATUNE3, FLSTA2, FLSTA3 


GLOBAL OUTPUTS: 



126 


MODULE NAME: XTK_AUTO (Auto Tuning) 

FILE NAME: TUNXTK . FOR 

PROCESS : SLOW 

PURPOSE: To auto-tune station #3 to a suitable cross path station. 

CALLED BY : TUNXTK 

CALLING SEQUENCE: CALL XTK_AUTO 

CALLS TO: CMP_FREQ, GEOM_CK, NXTSTA, SEARCH_INIT / 

SEARCH_STA 

DESCRIPTION: 

XTK_AUTO begins by checking that the cross station status word 
(FLSTA3) equals 0 and bit 8 of FO (set by HNAVSL to indicate that 
the station is within the H > R cone) is not 0. This check will 
fail, as FO was cleared immediately before calling TUNXTK. It 
should be checking for the PATH station within the H > R cone, 
which at this point would be logged in bit 8 of F2G. If within the 
H > R cone and no errors have been logged for the cross station 
(FLSTA3 = 0) , there is no point in doing a station search as the 
geometry checks would be unreliable. CMP_FREQ would then be called 
to verify station tuning and processing terminated. 

Processing continues by checking the search-in-progress flag 
(CINPFL) . If it is set, SEARCH_STA is called to continue the 
search. Otherwise, FLSTA3 is checked. If it is zero, or if the 
only error is a 'station-not-tuned' error (bit 13) which has not 
timed out, GEOM_CK is called to check the station geometry. 

If FLSTA3 showed a station failure on entry or a 'station-not- 
tuned' has timed out, the cross station timer (XSTMR) is cleared 
and XST_INIT is checked. If it is false, SEARCH_INIT is called to 
initiate a station search. If it is true (indicating a search has 
already been initiated) , NXTSTA is called to select the next 
station . 

GLOBAL INPUTS: ATUNE3, FLSTA3, NAV64K, NVAD3A, TIME 

ATUNE3, FLSTA2, FLSTA3 


GLOBAL OUTPUTS: 


127 

MODULE NAME: GEOM_CK (Geometry Checks) 

FILE NAME: TUNXTK . FOR 

PROCESS: SLOW 


PURPOSE: Verify the cross station / path station geometry. 

CALLED BY : XTK_AUTO 

CALLING SEQUENCE: CALL GEOM_CK 
CALLS TO: TUNCK, CMP FREQ 


DESCRIPTION: 

GEOM_CK calls TUNCK to actually perform the geometry check 
hfr b ?M? e i°?? t?ry states is returned (BADG = true), the bad geometry 
, set in FLSTA3 (which will cause a new station to be 

selected) . if geometry is good, the tuning code is fetched from 
the navigation data base and set in ATUNE3, FLSTA3 is zeroed and 

has r been n ?unedT FREQ t0 Verify that the selected s?at?2n 


GLOBAL INPUTS: FLSTA3, NVAD3A 

GLOBAL OUTPUTS: ATUNE3, FLSTA3 



128 


MODULE NAME: 
FILE NAME: 
PROCESS : 


NXTSTA (Select Next Station) 

TUNXTK . FOR 

SLOW 


PURPOSE: Select the next station in a search sequence. 


CALLED BY: XTK_AUTO 

CALLING SEQUENCE: CALL NXTSTA 
CALLS TO: CHOOSE_STRIP, 


EXT RANGE, 


GET LONG, 


SEARCH STA 


DESCRIPTION^ address (NAV ADDR) is incremented to point to the 

next station in the longitudinal strip and the word at that address 
is checked . If the word is non-zero, SEARCHJ3TA is called to see 
if this is a valid station. If the word is zero (indicating the 
end of the longitudinal strip) , the zone counter (ZONCTR) is 
incremented. If it is then equal to five, EXT_RANGE is called to 
extend the search range. Otherwise, CHOOSE_STRIP is called to 
select the next longitudinal strip. 


GLOBAL INPUTS : None 

GLOBAL OUTPUTS : None 


MODULE NAME: SEARCH_INIT (Initialize Station Search) 

FILE NAME: TUNXTK . FOR 

PROCESS: SLOW 

PURPOSE: Initialize the search for station #3. 

CALLED BY: TUNXTK, XTK_AUTO 

CALLING SEQUENCE: CALL SEARCH_INIT 
CALLS TO: GET_LONG, GET_REAL, SEARCH_STA 

DESCRIPTION: 

Processing begins by setting the station high altitude flag 
(HIALTF) if the aircraft is above 18000 feet. The permissable 
search range (ZONLIM) is set to the minimum (ZONRGE1 = 40 nm) , the 
zone search counter (ZONCTR) is reset to zero, the local strip 
pointer (XPTR) is reset to the beginning of the longitudinal strips 
and a search is initiated for a strip which includes the aircraft 
present position. This search continues until the strip is found 
or the end of the longitudinal strips in the navigation data base 
is found. (The present data base contains data for all of the 
continental United States: 66 to 124 degrees West longitude) . 

Once the proper strip is found, ZONPTR is set to point to the 
this strip, NAV_ADDR is set to the address of the first navaid in 
the strip, the search-in-progress flag (CINPFL) is set and 
SEARCH_STA is called to select a usable station. 

GLOBAL INPUTS: IBPTR, IDDALT, SLLON 

ATUNE3, FLSTA2, FLSTA3 


GLOBAL OUTPUTS: 



130 


MODULE NAME: SEARCH_STA (Find Next Station) 

FILE NAME: TUNXTK. FOR 

PROCESS: SLOW 

PURPOSE: To select and tune a suitable cross track station. 

CALLED BY: SEARCH_INIT, XTK_AUTO 

CALLING SEQUENCE: CALL SEARCH_STA 

CALLS TO: BUMP_STA, CMP_FREQ, GET_BYTE, GET REAL. 

GET_WORD, TUNCK “ 

DESCRIPTION: 

Initially the search-done flag (DONE) is cleared. Each 
station in the lonitudinal strip is checked to see if it is a 
VORTAC and (if the high altitude flag (HIALTF) is set) if it is a 
high altitude navaid. If either of these checks fail, BUMP_STA is 
called to select the next station and set the DONE flag (Tf this 
involved selection of a new longitudinal strip) to cause an exit 
from the subroutine. 

If the station is of the correct type, TUNCK is called to 
check station geometry. If a bad geometry status is returned, or 
if either DME2 or DME3 is already tuned to this station, BUMP STA 
is called as above. Otherwise, FLSTA3 is cleared, the 'search^in- 
progress' flag (CINPFL) is cleared, NVAD3A is set to the selected 
station address, ATUNE3 is set to the tuning code found in the 
navigation database for this station and CMP_FREQ is called to 
verify the tuning. Finally, the DONE flag is set to cause an exit. 

GLOBAL INPUTS: ATUNE3, NVAD2A, NVAD3A 

GLOBAL OUTPUTS: ATUNE3, FLSTA3, NVAD3A 


131 


MODULE NAME: CMP_FREQ (Check Station Tuning) 

FILE NAME: TUNXTK . FOR 

PROCESS : SLOW 

PURPOSE: Verify tuning of DME3. 

CALLED BY: GEOM_CK, SEARCH_STA, XTK_AUTO, XTK_MAN 

CALLING SEQUENCE: CALL CMP_FREQ 
CALLS TO : None 


If the input frequency code (DME3FQ) equals the output code 
(ATUNE3) or if bit 9 of SIMFLG is set (indicating that the DME #3 
inputs are^to be simulated for NAVIG) , the station fail timer 
(XSTMR) is zeroed. Otherwise, the 'out-neq-in bit is set in 
FLSTA3 and XSTMR is checked. If it is zero (indicating first pass 
for this condition), it is set to the present time m seconds 

(TIME) . 

GLOBAL INPUTS: ATUNE3, DME3FQ, FLSTA3, SIMFLG, TIME 

GLOBAL OUTPUTS: FLSTA3 



132 


MODULE NAME: 
FILE NAME: 
PROCESS : 


BUMP_STA (Pick Next-strip) 

TUNXTK . FOR 

SLOW 


PURPOSE: Increment to the next station in a search sequence. 


CALLED BY: 
CALLING SEQUENCE 
CALLS TO: 


SEARCH_STA 
CALL BUMP_STA 

CHOOSE_STRIP , EXT_RANGE, GET_LONG 


DESCRIPTION: 

The station address (NAV ADDR) is incremented m -w 

next station in the longitudinal strip and the word at that- add the 
rs checked. If the word is non-zero. Processing is ?erminlted if 
the word is zero (indicating the end of the strio) the 

Exr^GE^c’ n iS H i ;° ren,ented - If 11 is then equal to five 
EXT_RANGE is called to extend the search M n+u . ve ' 

CHOOSB_STRIP is caned to select the next ^ngUudinal str!n" 1S i; 
either case, a DONE status is returned. 


GLOBAL INPUTS: 


None 


GLOBAL OUTPUTS: 


None 


133 


MODULE NAME: 
FILE NAME: 
PROCESS: 


CHOOSE_STRIP (Select Next Longitudinal String 
TUNXTK . FOR 9 ituamai Strip) 

SLOW 


PURPOSE : 


Select a two degree strip to search for a station. 


CALLED BY: 
CALLING SEQUENCE 
CALLS TO: 


BUMP_STA / NXTSTA 
CALL CHOOSE_STRIP 
EXT_RANGE , GEELONG, LOOK L 


DESCRIPTION: 

subroutine is entered wh#»n v ha • . 

b ui f di?a? Ct bu? U cLno C t 0 ^ bf cVuted 1 at" compile T ime 'o £*?> 

includes *the aircraft position^ 11 a'nnthe 2 ^ ree stri P “ hich 

ll 5 nitTdT \ S S6t t0 P ° lnt ' t0 the iTcfat strip 6 

ensure V 3 < P ° 

t^TLT. LOOK - L is called to to r :^\^r?£ slli 7tl 

hhsaf- t > he -*-^ a i Ue is 2 ' P roc essing proceeds identically excent- 
of preset position te '" Pt 13 t0 m ° Ve tC the SeCond stri P to the ^ 

first 'strip ^“the^st L °° K - L iS t0 atte * pt t0 tp the 

If the value is 4, the second strip to the west is cho<?^n i e 
*' Otherwise EXT_RANGE is called to extend the search 


GLOBAL INPUTS: IBPTR 

GLOBAL OUTPUTS: 


None 



134 


MODULE NAME: 
FILE NAME: 
PROCESS : 


LOOK_L (Select Next Strip to West) 

TUNXTK . FOR 

SLOW 


PURPOSE: To extend the station search to the first longitudinal 

strip to the West, if one exists. 


CALLED BY: 

CALLING SEQUENCE: 
CALLS TO: 


CHOOSE_STRIP 

CALL LOOK_L (INDST) 

EXT RANGE, GET_LONG 


DESCRIPTION NAV ADDR to p 0 i n t to the first navaid in the next 

longitudinal strip to the west of aircraft present position if one 
eSSts If there is no next strip to the west (ZONPTR - 24 is less 
than INDST), EXT_RANGE is called to extend the search range by 40 

nm. 


GLOBAL INPUTS : None 

GLOBAL OUTPUTS: 


None 


MODULE NAME: 
FILE NAME: 
PROCESS: 


EXT_RANGE (Extend Search Range) 

TUNXTK . FOR 

SLOW 


135 


PURPOSE: Extend search range for a cross-track station. 

CALLED BY: BUMP_STA, CHOOSE_STRIP, LOOK_L, NXTSTA 

CALLING SEQUENCE: CALL EXT_RANGE 
CALLS TO : GET_LONG 

DESCRIPTION: 

EXT_RANGE is called when all permissable longitudinal strips 
have been searched unsuccessfully for a suitable navaid out to the 
present search limit. The zone counter (ZONCTR) is zeroed, 
resetting the zone to aircraft present longitude, NAV_ADDR is set 
to point to the first navaid in that strip (as indicated by ZONPTR) 
and the search range limit (ZONLIM) is increased by 40 nm. If this 
increase results in ZONLIM being more than 200 nm, the search in 
progress flag (CINPFL) is cleared, the search initialized flag 
(XST_INIT) is cleared and ZONLIM is reset to 40 nm. 

GLOBAL INPUTS: None 

GLOBAL OUTPUTS : None 



136 


MODULE NAME: TUNCK (Verify Station Geometry) 

FILE NAME: TUNCK. FOR 

PROCESS: SLOW 

PURPOSE: To verify the geometry of a cross-track station 

CALLED BY: GEOM_CK, SEARCH_STA, XTK MAN 

CALLING SEQUENCE: CALL TUNCK (STA LAT, STA LON, STA ALT, RANGE TB) 
CALLS TO: SQRT ~ “ ~ 

DESCRIPTION: 

Processing begins by presetting 'good geometry' status (TB = 
false) and computing the delta lat (DTLAT) and delta Ion (DTLON) 
between the aircraft and the selected cross station. DTLON is 
immediately multiplied by cos (LAT) to account for the varying width 
of a degree of longitude. Analogues of the sine and cosine of the 
angle between the stations (SINW, COSW) are then computed by cross 

multiplying DTLAT and DTLON by the delta lat (DPHI1) and Ion 

(DLAM1 ) between the aircraft and the path station computed by CRBSC 
in HNAVSL . The following relations are implicit: The sine and 

cosine of the bearing to the cross station are proportional to 
DTLON and DTLAT, respectively. Similarly, the sine and cosine of 
the bearing to the path station are proportional to DLAM1 * 
cos (LAT) and DPHI1. • Calling the bearing to the path station P, the 
bearing to the cross station X and the angle between them (the 
wedge angle) W, then 

sin (W) = sin (P - X) = sin(P) cos (X) - cos(P) sin(X) 

cos (W) = cos (P - X) = cos (P ) cos (X) + sin (P) sin (X) 

tan (W) = sin (W) / cos (W) 

The minimum (primary) wedge angle between stations for a good 
position estimate is 30 degrees. I.e, between 30 and 150 degrees 
left or right. This requirement is met if the tangent of the 

primary angle ( abs(sin(W) / abs(cos(W)) ) is greater than the 
tangent of 30 degrees (0.57735) . If this criteria is not met, TB 
is set true. 

If the above test passes, processing continues by computing 
the approximate distance to the cross station (DIST) , and the 
approximate effective range of the station (RANGE) . 

DIST = 60.0 * sqrt (DTLAT 7 + DTLON 2 ) 

RANGE = 1.23 * sqrt (ALTCOR - STA_ALT) 

if the distance is greater than the specified search range 
(MAXRG) or greater than the effective range (RANGE) , TB is set 
true. 

GLOBAL INPUTS: ALTCOR, SLLAT, SLLON 

GLOBAL OUTPUTS: None 


137 


MODULE NAME: GMSG (Generate Message) 

FILE NAME: GMSG. FOR 

PROCESS: SLOW 

PURPOSE: To output messages to the system test panel and onboard 

line printer. 

CALLED BY : SLOW 

CALLING SEQUENCE: CALL GMSG 
CALLS TO: LIB$SIGNAL 


DESCRIPTION: 

GMSG drives the system test panel display and indicators with 
data stored in a message buffer. This message buffer is also used 
to echo each message that goes to the system test panel on the 
printer as well. The length of the buffer (in bytes) is stored in 
WRDCNT . The message length determines whether there is a text 
message to output, or only lights and switches to turn on or off. 
A value of four in WRDCNT denotes the latter, otherwise a message 
is output to the system test panel and the onboard printer. These 
output operations are designed to occur during separate iterations 
of GMSG to minimize the occurrence of I/O interrupts which might 
affect the foreground timing. The status of these I/O operations 
is tested during each iteration and, if an exception is detected, 
an error message is displayed on the system console device. 


GLOBAL INPUTS: 
GLOBAL OUTPUTS: 


IOACT, MSBUF, MSGST, WRDCNT 
IOACT, WRDCNT 


138 


MODULE NAME: MESG (Error Message Tables) 

FILE NAME: MESG. MAR 

PROCESS: SLOW 

PURPOSE: Repository for ASCII error messages. 

CALLED BY: Non executable 

CALLING SEQUENCE: Not called 
CALLS TO: None 

DESCRIPTION: 

MESG contains a pool of ASCII error messages that are 
displayed on the system test panel. 

GLOBAL INPUTS: N/A 

GLOBAL OUTPUTS : N/A 


MODULE NAME: 
FILE NAME: 
PROCESS : 


SNAPOUT (Snap Output Processing) 

SNAP OUT . FOR 

SLOW 


139 


PURPOSE: To format and print snapshot recordings on the aircraft 

line printer. 

CALLED BY : SLOW 

CALLING SEQUENCE: CALL SNAPOUT 
CALLS TO : None 

DESCRIPTION: 

SNAPOUT prints out snap data whenever new snapshots have been 
added to the snap buffer (SNAPBUF (n) . SDATA) . The global counter 
SPTR is set by the SNAP routine when a new snap is stored. The 
global counter RPTR is set by the SNAPOUT routine when the snap is 
printed. If the two numbers do not agree, then one or more snap 
lists remain to be printed and SLOW makes the call to SNAPOUT. 
Both counters are modulo-4. SNAPOUT prints one list per call. 

If a snap is to be printed, SNAPOUT first increments the read 
counter RPTR and then formats a header line with the snap number, 
the name, the time, and the snap criteria, storing these in the 
output buffer OBUF. It then takes one entry at a time from the 
snap buffer, checks the form (integer, real or boolean), performs 
the necessary conversions, and stores the ASCII value in the output 
buffer. It repeats this for 5 entries per line, for 3 lines, or 
until the buffer is empty. 

Because SNAPOUT requires a change in the I/O device, printing 
must be synchronized at the executive level. The flag IOACT is 
used to signal that I/O is in progress and the output is then 
initiated through a call to SYS$QIO. Subroutine SNAST, specified 
in the QIO statement, clears IOACT when the I/O is complete. 

GLOBAL INPUTS: RPTR, SNAPBUF 


GLOBAL OUTPUTS: 


IOACT, RPTR 



140 


Section 6.0 FLIGHT CONTROLS 


FLIGHT CONTROLS OVERVIEW 

The Flight Controls routines provide for control of the ATOPS 
aircraft in all coupled flight modes. This includes an Attitude 
Control Wheel Steering mode (pitch and roll only) for the Forward 
Flight Deck, a Manual Electric mode (pitch, roll and yaw) for the 
Research (Aft) Flight Deck (RFD) and a number of computer aided 

S? < ? e L°£ fe , ring P ltch / ro11 ' yaw and speed control from the Research 
Flight Deck. These include Attitude Control Wheel Steering (ACWS) 
Velocity Control Steering (VCWS) and a variety of autopilot modes 
ranging from track and flight path angle hold to 4D autopilot 
through full autoland. Interface with the Mode Select Panel (MSP) 
for flight mode selection, direct control of selected track, fliqht 
path angle (or altitude held) and airspeed, or selection of 2- 3- 

or 4D guidance is provided by these routines. The computation of 
of aircraft state commands based on the Flight Management 
computation of errors from a predefined path (which may include 
speed and/or time constraints) is also computed here. 

Flight Controls (FC) logic checks for validity of outputs from 
the Flight Management process, and provides for minimum operational 
capability from the RFD even in the absence of Flight Management 
outputs. Some of the signals required to drive the Navigation 
a " d Primar y Flight Display are either computed primarily by 
the FC software or are conditionally computed when validity of the 
Flight Management outputs cannot be verified. 


141 


MODULE NAME: DATSEL (Flight Controls Data Selection) 

FILE NAME: DATSEL. FOR 

PROCESS : FCFAST 

PURPOSE: To select input data for use by the Flight Controls 

Process (FCFAST) . 

CALLED BY: FCFAST 

CALLING SEQUENCE: CALL DATSEL 
CALLS TO: ANGL, ATAN2, SQRT 

DESCRIPTION: 

This module selectively overwrites those signals computed by 
HNAVFS in the Flight Management process, based upon the discretes 
INAW (IRS Navigation Valid) and NCUVAL (Navigation Computations 
Valid) . 

If INAW is true and NCUVAL is false, then LAT, LON, ALTCOR, 
HDCF, HDGTRU, HDD, VN, VE, GS, VGSDOT and XTACC are overwritten 
with the equivalent raw IRS inputs: LATINS, LONINS, IRSALT, 

IRSHDOT, THDG, HDDINS, VNINS, VEINS, GSINS, ATKINS, and XTKINS, 
respectively. GUID2D and MLSMOD are forced false as they cannot 
legitimately be true if NCUVAL is false. The following computed 
values are then overwritten with values computed from the raw 
inputs : 


NAV64K = (GS >= 64) 

TASFPS = TAS KTOFPS 
GSFPS = GS KTOFPS 
GSFPS2 = GSFPS GSFPS 
DFTANG = ANGL (TK - THDG) 

TKMAG = ANGL (TK - MAG VAR) 

If NAV64K then 

TK = atan (VE, VN) 

GAMMA = RTOD HDCF / GSFPS 
TASGS = sqrt (TASFPS 2 - HDOT 2 ) 
else 

TK = THDG 
GAMMA =0.0 
TASGS = TAS 
endif 

Finally, HRAD is calculated by compensating the radar 
altimeter input (RADALT) for pitch angle, 

HRAD = RADALT - 0.38 (PITCH - 2.0) 

and runway heading error (DLPSI) and cross runway velocity (XTVEL) 
are calculated if a destination runway has been selected. 



142 


If (AIRPTS (2,3) * 0) then 

DLPSI = ANGL (HDGTRU - RWYHDG) 

XTVEL = KTOFPS (COS (RWYHDG) VEINS - sin (RWYHDG) VNINS) 

else 

DLPSI = -180. 

XTVEL =0.0 
endif 

In the above, DLPSI is set to -180 when no runway has been 
selected to prevent LAND mode from engaging erroneously. Also, in 
the above computation of TASGS, HDCF should be used instead of 
HDOT . 

GLOBAL INPUTS: AIRPTS, ATKINS, COSRH, GSINS, HDDINS, HDGTRU, 

INAW, IRSALT, IRSHDOT, LATINS, LONINS, MAG VAR, NCUVAL, 
PITCH, RADALT, RWYHDG, SINRH, TAS, THDG, VEINS, VNINS, 
XTKINS 

GLOBAL OUTPUTS: ALTCOR, DFTANG, DLPSI, GAMMA, GS, GSFPS, GSFPS2, 

GUID2D, HDCF, HDD, HDGTRU, HRAD, LAT, LON, MLSMOD, 
NAV64K, TASFPS, TASGS TK, TKMAG, VE, VGSDOT, VN, XTACC, 
XTVEL 


143 


MODULE NAME 
FILE NAME: 
PROCESS: 


MSPLGC (Mode Select Panel Logic) 

MSPLGC.FOR 

FCFAST 


~ ^rT^i'c 

associated with selection of guidance mode. 

PALLED BY * FCFAST 

" 0 f" : SS.-KSS, U npk 

DESCR MSPLGC consists of two^funda^rrt^l^parts^^The K ^j£ R) p ^ 

handles inputs from the which are handled by MLOG) . The 

buttons (less the w® f i 0 a ic US ed to calculate which guidance 

second section contains the logi to the CMP and the 

modes are required These modes . are thenjtp outlined in the 

rest of the system is ° outline d below. 

description of MSPP0 \ h J ™P °ach contain lamps which may take a 
The buttons on the CMP each coi o _ ^ illuminated blue, 

maximum of four P° aal kle the * mode is not active; if green, the 
amber or green. If unlit, andf if ambe r, the mode is 

mode is providing ^l^nce ( gag d) dition for those buttons 
armed. Blue indicates a preset ^ ^ LTf F PA, TKA) or a 'not 
which have an associated k L ainin q guidance select buttons 

available' situation f or PATH) In the control wheel 

(LAND, HOR PATH, VERT PATH ' qu idance mode in each axis 

steering (CWS1 1 modes, n a ™* X1 . arm ed (LAND provides guidance in 
may be engaged and one may be arme . gu i da nce mode must be 

both axes) . in AUTO mode, exactly one gu f the engaged mode is 
engaged in each axis and one may b_^ rev ; rt t0 V CWS. If both an 
deselected or fails, the sy ists t he following priorities 

engaged and an armed condition exists, 

prevail (descending order) : 

Horizontal guidance - LAND, HOR PATH, TKA SEL; 
vertical guidance - LAND, VERT PATH, ALT ENG, FPA SEL; 


Speed guidance 


TIME PATH, CAS ENG. 


The four knob/button pairs re adout indicates the current 

readout. If the i amp , V uqht path angle or track angle, 

value of airspeed, altitude, flight is 9 disp iayed. Turning 

respectively. If H value for the associated parameter 

a knob adjusts the displayed value to ses the blue lamp to be 
and, if the button was Pt^iousiy unli , pressed within this 

lit for eight seconds. If the button ap p ro p ri ate) with the 

time, the mode is armed or engaged u ^pp ^ goes off a „ d 
preselected value retained. If . tft i unique in that the 

^eseU S ?t ay st^ r r n esu\ts 0U in re an amber' lamp (which does not auto- 



144 


extinguish) . Successive pushes of the» pa«? w 
mode to toggle between preselect and en ^ ° b v utton causes the 
the lamp / return to disengaged state th? ‘ To extinguish 

button on the throttle handles (hTDC) a ^ othrottle disconnect 

flrst three (VEL CWS, ATT CWS, AUTO) tr-T * hebottom row) , the 
procedure MLOG and are mutually exclusive t andl ® d en tirely by 
be illuminated green and tho . e ' . *- e ' a t most one will 

is also handled by mlSg, b3? ° tf ' ' Ths Si 

color logic with the remaining thre^ ? th and shares lamp 

VERT PATH, TIME PATH), whict^are i S ® lect butt ° ns (HOR PATH, 
button is depressed when unlit? LX « the »» 

for eight seconds if the minimum reouireJn^ 111 be lllu minated 
met. Otherwise, the amber (armed) ^ightwiVl K° r LAND m ° de are not 
engage criteria are met, at which time 11 b f^^aged until the 
and the amber light extinguished If den™" i gh J wil1 be Ut 
green, it will return to the unlit state P Whe - n . amber or 

buttons are serially dependent- i « at ' e u * rtB Tbe remaining three 

prerequisite for VERT PATH, which' is itself a n ™ . engaged is a 
path. However, pressing TIME PATH butwfn f h pr ® rec iuisite for TIME 
armed nor engaged will cause all S" "J 6 " H0R PATH is neither 
engaged (as appropriate) if the crit-Pria ° 6S t0 becorne armed or 
path will be lit blue, similarly If not ' TIME 

both HOR PATH and VERT PATH or turn bln/V f lther arm/engage 
logical requirements exist which «hn,nH K trying * Additional 
mechan
…[truncated]