You are on page 1of 140

An Open-Source Simulation Environment

in C++

Peter Zipfel, Ph.D., University of Florida

Modeling and Simulation Technologies


• P = Polymorphism at run-time
• I = Inheritance of vehicle characteristics
• E = Encapsulation of data tables and methods

MaSTech © 2013 2
What Is CADAC?
• CADAC – Computer Aided Design of Aerospace Concepts

MaSTech © 2013 3
What Is CADAC?
• CADAC – Computer Aided Design of Aerospace Concepts
• An engineering tool for the development of aerospace vehicles
– Focuses on high fidelity flight simulation of main vehicle
– Interacts with other secondary vehicles

MaSTech © 2013 4
What Is CADAC?
• CADAC – Computer Aided Design of Aerospace Concepts
• An engineering tool for the development of aerospace vehicles
– Focuses on high fidelity flight simulation of main vehicle
– Interacts with other secondary vehicles
• An evaluation tool for performance studies
– Fly-out performance
– Flight envelopes, launch envelopes, footprints

MaSTech © 2013 5
What Is CADAC?
• CADAC – Computer Aided Design of Aerospace Concepts
• An engineering tool for the development of aerospace vehicles
– Focuses on high fidelity flight simulation of main vehicle
– Interacts with other secondary vehicles
• An evaluation tool for performance studies
– Fly-out performance
– Flight envelopes, launch envelopes, footprints
• A planning and analysis tool for flight tests
– Trajectories, safety footprints
– Performance prediction
– Data correlation

MaSTech © 2013 6
What Is CADAC?
• CADAC – Computer Aided Design of Aerospace Concepts
• An engineering tool for the development of aerospace vehicles
– Focuses on high fidelity flight simulation of main vehicle
– Interacts with other secondary vehicles
• An evaluation tool for performance studies
– Fly-out performance
– Flight envelopes, launch envelopes, footprints
• A planning and analysis tool for flight tests
– Trajectories, safety footprints
– Performance prediction
– Data correlation
• A training tool
– University of Florida graduate courses in M&S
– Real-time integration into flight simulators 

MaSTech © 2013 7
CADAC Genesis
• 1966 Litton Industries
– 6 DOF missile simulation in Fortran IV
– Adopted by industry and government
– IBM, Control Data mainframes
• 1978 U.S. Air Force – CADAC Fortran
– Air-to-ground and air-to-air missiles
– Fighter Aircraft
– Hypersonic vehicles
– Hosted on Digital VAX, IBM PC
• 2000 University of Florida – CADAC C++
– Conversion to C++
– ANSI / ISO 1998 Standard C++
– Microsoft Visual C++ compilers
• Present
– USAF/AFRL 5 & 6 DOF simulations
– UFL and other academic institutions
– Embedded in FLAMES 
MaSTech © 2013 8
CADAC++ Active Simulations
TYPE VEHICLE OBJECTS DoF EARTH FEATURES
Cruise Missile Missile; Target; Satellite 5 Spherical Remote Targeting
Fighter Aircraft Aircraft 6 Flat Generic F16
Air-to-Ground Missile Missile; Aircraft; Target 6 Flat Weather Deck, MC
Air-to-Air Missile Missile; Target Aircraft 6 Flat MC
Plane + Transfer Vehicle +
Hypersonic Ascent Generic X30,
Interceptor; Tracking Station; 6 WGS84
Plane Weather Deck, MC
Satellite
Generic Defense Defensive Missile; Aircraft;
6 Flat MC
Missile Offensive Missile
Insertion Guidance, Weather
Three Stage Booster Rocket with Three Stages 6 WGS84
Deck, MC
Long Range Strike
Missile; Target 5 Spherical Hypersonic, FLAMES®
Missile
Two Pulse Rocket, Integral
Dual Role Missile Missile; Target; Recce Aircraft 6 Flat
Rocket Ramjet, MC
Booster + Waverider + Munition;
Global Strike 6 WGS84 Wave Rider, MC
Satellite; Target
Defensive Missile; Aircraft;
Self Defense Missile 6 Flat Real time, MC, FLAMES®
Offensive Missile
Small Smart Bomb Bomb; Satellite; Target 6 WGS84 Weather Deck, MC
Hypersonic Cruise
Missile; Satellite; Target 6 WGS84 Scramjet, Weather Deck, MC
Missile

MaSTech © 2013 9
CADAC, an Open Source Environment

• Free access to a full suite of tools


• Download CADAC4 from AIAA
– CADAC Studio
– Fortran simulations
• Request CADAC C++ simulations from
mastech.zipfel@cox.net
• Download compiler Visual C++ Express 2010 from
Microsoft

MaSTech © 2013 10
CADAC Usage
• USAF/AFRL since 1978
• University of Florida since 1978
• Missouri University of Science and Technology,
Rolla, MO
• University of Queensland, Australia
• Indian Institute of Technology, Madras, India
• National University of Córdoba, Argentina
• Technion, Haifa, Israel

MaSTech © 2013 11
Graduate Courses at UF

Cruise Missile

Building Aerospace Vehicle


Simulations in C++, 2nd Ed, 2008

MaSTech © 2013 12
Graduate Courses at UF

Fighter Aircraft
Cruise Missile
Air-to-Air Missile

Building Aerospace Vehicle Fundamentals of Six DoF Aerospace


Simulations in C++, 2nd Ed, 2008 Simulation and Analysis in FORTRAN
and C++, 2004

MaSTech © 2013 13
Graduate Courses at UF

Fighter Aircraft Hypersonic


Cruise Missile
Air-to-Air Missile Ascent Plane

Building Aerospace Vehicle Fundamentals of Six DoF Aerospace Advanced Six DoF Aerospace
Simulations in C++, 2nd Ed, 2008 Simulation and Analysis in FORTRAN Simulation and Analysis in C++, 2005
and C++, 2004

Available at www.aiaa.org

MaSTech © 2013 14
• Who is out there in cyberspace ?
On next slide click a number for:
1. Student
2. Aerospace engineer
3. Software engineer
4. Scientist
5. Manager
6. Just Human

MaSTech © 2013
15
Requirements for Constructive
Simulations

MaSTech © 2013 16
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles

MaSTech © 2013 17
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access

MaSTech © 2013 18
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access
• Modular structure to mirror the vehicle’s components
– Strict interface control
– Re-use of code

MaSTech © 2013 19
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access
• Modular structure to mirror the vehicle’s components
– Strict interface control
– Re-use of code
• Event scheduling
– Simulating all phases of flight

MaSTech © 2013 20
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access
• Modular structure to mirror the vehicle’s components
– Strict interface control
– Re-use of code
• Event scheduling
– Simulating all phases of flight
• Global communication bus
– Data flow between encapsulated objects

MaSTech © 2013 21
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access
• Modular structure to mirror the vehicle’s components
– Strict interface control
– Re-use of code
• Event scheduling
– Simulating all phases of flight
• Global communication bus
– Data flow between encapsulated objects
• Table look-up
– 1, 2, 3 – dimensional
– Separate files of data decks for safekeeping

MaSTech © 2013 22
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access
• Modular structure to mirror the vehicle’s components
– Strict interface control
– Re-use of code
• Event scheduling
– Simulating all phases of flight
• Global communication bus
– Data flow between encapsulated objects
• Table look-up
– 1, 2, 3 – dimensional
– Separate files of data decks for safekeeping
• Monte Carlo capability
– Uniform, Gauss, Rayleigh, exponential, Markov distributions

MaSTech © 2013 23
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access
• Modular structure to mirror the vehicle’s components
– Strict interface control
– Re-use of code
• Event scheduling
– Simulating all phases of flight
• Global communication bus
– Data flow between encapsulated objects
• Table look-up
– 1, 2, 3 – dimensional
– Separate files of data decks for safekeeping
• Monte Carlo capability
– Uniform, Gauss, Rayleigh, exponential, Markov distributions
• Matrix utility operations
– Programming matrix equations directly

MaSTech © 2013 24
Requirements for Constructive
Simulations
• Synthesis capability for multi-vehicle environments
– High fidelity simulation of main vehicle
– Lower fidelity for supporting vehicles
• Encapsulation of vehicles for multiple instantiation
– Binding data and functions and restricting their access
• Modular structure to mirror the vehicle’s components
– Strict interface control
– Re-use of code
• Event scheduling
– Simulating all phases of flight
• Global communication bus
– Data flow between encapsulated objects
• Table look-up
– 1, 2, 3 – dimensional
– Separate files of data decks for safekeeping
• Monte Carlo capability
– Uniform, Gauss, Rayleigh, exponential, Markov distributions
• Matrix utility operations
– Programming matrix equations directly
• Documentation and error checking
– Documenting all interface variables
– Checking interface variables, matrix compatibility, and file streams
– Making output compatible with CADAC-Studio 
MaSTech © 2013 25
Class Structure

CLASS DESCRIPTION
Cadac, ... Base class of hierarchical class structure of vehicles
Vehicle Hosting a pointer array of type Cadac
Module Storing module information
Variable Declaring module-variables
Event Storing event information
Packet Storing data packets for global communication bus
Datadeck Hosting a pointer array of type Table
Table Storing tabular data
Markov Storing Markov data
Matrix Declaring matrix operations
Document Storing module-variable definitions

MaSTech © 2013 26
Vehicles Are Encapsulated Objects

• Each aerospace vehicle is an object declared


by its hierarchical class structure
– Data and methods are encapsulated
• Aerodynamic and propulsion data tables
• Vehicle characteristics are computed in module functions

MaSTech © 2013 27
Vehicles Are Encapsulated Objects

Cadac, ... • Each aerospace vehicle is an object declared


Vehicle by its hierarchical class structure
Module – Data and methods are encapsulated
Variable
• Aerodynamic and propulsion data tables
Event
• Vehicle characteristics are computed in module functions
Packet
Datadeck • Class hierarchy
Table – Abstract base class CADAC
Markov
– First derived class defines the equations of motion
Matrix
Document – Second derived class defines the vehicle modules 

MaSTech © 2013 28
Examples of Hierarchies

Hypersonic
Cruise Missile Fighter Aircraft
Ascent Plane

Cadac Cadac Cadac

Round3 Flat6 Round6 Round3 Ground0

Cruise Target Satellite Plane Hyper Satellite Radar

MaSTech © 2013 29
CADAC Execution

modules.cpp
headers.hpp

compile

aero_deck.asc
input.asc vehicle.exe
prop_deck.asc

Program Execution

input19PR_3.asc: Ascent and rendezvous with circular and elliptical satellite May 21 2005 16:58:56

+90
+70
+50
+30
plot.asc traj.asc stat.asc
+70

main
+50

+150
+30
-50

all vehicles stochastics


vehicle
+170
+10
-70
-10
-170
-90

CADAC Studio

MaSTech © 2013 30
• What is your preferred language?
1. Fortran
2. C
3. C++
4. C#
5. Java
6. English

MaSTech © 2013
31
The Power of Polymorphism
• Definition
– Polymorphism is the capability of C++ to use many forms (polymorph) with one
interface (polymorph)

MaSTech © 2013 32
The Power of Polymorphism
• Definition
– Polymorphism is the capability of C++ to use many forms (polymorph) with one
interface (polymorph)
• Examples
– Overloaded functions: many coding forms, but one function name
– Overloaded operators: many operations, but one operator symbol
– Virtual functions: many coding forms, but one function name
– Run-time polymorphism: many derived objects, but with pointers of the same type of
the ‘base class’

MaSTech © 2013 33
The Power of Polymorphism
• Definition
– Polymorphism is the capability of C++ to use many forms (polymorph) with one
interface (polymorph)
• Examples
– Overloaded functions: many coding forms, but one function name
– Overloaded operators: many operations, but one operator symbol
– Virtual functions: many coding forms, but one function name
– Run-time polymorphism: many derived objects, but with pointers of the same type of
the ‘base class’
• The power of late binding (function calls are resolved at run-time)
– The (virtual) function call is determined by the type of object pointed to by the pointer
– The pointers to the derived objects can be stored in one array of type ‘base class’
– Late binding reduces code complexity 

MaSTech © 2013 34
Run-Time Polymorphism
• Run-time polymorphism is accomplished using inheritance and virtual
functions

MaSTech © 2013 35
Run-Time Polymorphism
• Run-time polymorphism is accomplished using inheritance and virtual
functions
• A virtual function is a member of the base class and may be overridden
by a new function of the derived class

MaSTech © 2013 36
Run-Time Polymorphism
• Run-time polymorphism is accomplished using inheritance and virtual
functions
• A virtual function is a member of the base class and may be overridden
by a new function of the derived class
• Procedure:
1. Build a branching class hierarchy
2. Dynamically allocate memory for an array of pointers to the objects; the
array pointer is of type base_class
pointer = new base_class *[size];
3. Place the object pointers into the array
4. At run-time, as one of the pointer array elements accesses a virtual function,
the correct version of the virtual function corresponding to the object
pointer will be called

MaSTech © 2013 37
Run-Time Polymorphism
• Run-time polymorphism is accomplished using inheritance and virtual
functions
• A virtual function is a member of the base class and may be overridden
by a new function of the derived class
• Procedure:
1. Build a branching class hierarchy
2. Dynamically allocate memory for an array of pointers to the objects; the
array pointer is of type base_class
pointer = new base_class *[size];
3. Place the object pointers into the array
4. At run-time, as one of the pointer array elements accesses a virtual function,
the correct version of the virtual function corresponding to the object
pointer will be called
• A class is called an abstract class if at least one of its functions is purely
virtual; it cannot be used to create an object

MaSTech © 2013 38
Run-Time Polymorphism
• Run-time polymorphism is accomplished using inheritance and virtual
functions
• A virtual function is a member of the base class and may be overridden
by a new function of the derived class
• Procedure:
1. Build a branching class hierarchy
2. Dynamically allocate memory for an array of pointers to the objects; the
array pointer is of type base_class
pointer = new base_class *[size];
3. Place the object pointers into the array
4. At run-time, as one of the pointer array elements accesses a virtual function,
the correct version of the virtual function corresponding to the object
pointer will be called
• A class is called an abstract class if at least one of its functions is purely
virtual; it cannot be used to create an object
• Benefit of run-time polymorphism (late binding)
– Program ‘morphs’ during execution without a large amount of contingency
code
– But slows down execution 
MaSTech © 2013 39
Implementation of Run-Time Polymorphism
• All vehicle objects are stored in the pointer array vehicle_ptr
Classes
of type Cadac (abstract base class)
Cadac, ... 1. Create Vehicle vehicle_list which has as private member the pointer
Vehicle array Cadac **vehicle_ptr
Module 2. From ‘input.asc’ read the number and type of vehicle objects
Variable 3. Add the vehicle pointers to vehicle_ptr array in the order read from
Event ‘input.asc’
Packet
Datadeck
Table
Markov
Matrix
Document

MaSTech © 2013 40
Implementation of Run-Time Polymorphism
• All vehicle objects are stored in the pointer array vehicle_ptr
Classes
of type Cadac (abstract base class)
Cadac, ... 1. Create Vehicle vehicle_list which has as private member the pointer
Vehicle array Cadac **vehicle_ptr
Module 2. From ‘input.asc’ read the number and type of vehicle objects
Variable 3. Add the vehicle pointers to vehicle_ptr array in the order read from
Event ‘input.asc’
Packet • During run-time the vehicle objects are accessed by their pointers
Datadeck – The class Vehicle declares an overloaded offset operator
Cadac *operator[] that returns the vehicle pointer
Table
– The vehicle pointer is of the correct vehicle type (e.g., Cruise, Target,
Markov Satellite) although it is stored in the pointer array of type Cadac
Matrix (polymorphism)
Document 4. With this vehicle-pointer the member functions of the respective vehicle are
accessed
– Example: At every integration step the ‘newton’ module of the i-th vehicle is
called
vehicle_list[i]->newton(int_step); ♣
MaSTech © 2013 41
Cruise Missile Architecture
Abstract base class Cadac

Derived class Round3

Derived class Target Cruise Satellite

MaSTech © 2013 42
Cruise Missile Architecture
Abstract base class Cadac

Derived class Round3


round3 [ ]

Derived class Target Cruise Satellite


target [ ] cruise [ ] satellite [ ] Module-Variable arrays

MaSTech © 2013 43
Cruise Missile Architecture
Abstract base class Cadac
Virtual functions

Derived class Round3 newton ( )


round3 [ ] environment ( )
Virtual functions
Derived class Target Cruise Satellite
target [ ] cruise [ ] satellite [ ] Module-Variable arrays aerodynamics ( )
propulsion ( )
forces ( )
targeting ()
seeker ( )
guidance ( )
control ( )
intercept ()

MaSTech © 2013 44
Cruise Missile Architecture
Abstract base class Cadac
Virtual functions

Derived class Round3 newton ( )


round3 [ ] environment ( )
Virtual functions
Derived class Target Cruise Satellite
target [ ] cruise [ ] satellite [ ] Module-Variable arrays aerodynamics ( )
propulsion ( )
SATELLITE3 forces ( )
Vehicle-objects TARGET3 CRUISE3
targeting ()
seeker ( )
guidance ( )
control ( )
intercept ()

MaSTech © 2013 45
Cruise Missile Architecture
Abstract base class Cadac
Virtual functions

Derived class Round3 newton ( )


round3 [ ] environment ( )
Virtual functions
Derived class Target Cruise Satellite
target [ ] cruise [ ] satellite [ ] Module-Variable arrays aerodynamics ( )
propulsion ( )
SATELLITE3 forces ( )
Vehicle-objects TARGET3 CRUISE3
targeting ()
seeker ( )
guidance ( )
control ( )
Communication bus combus [ ] intercept ()

MaSTech © 2013 46
Cruise Missile Architecture
Abstract base class Cadac
Virtual functions

Derived class Round3 newton ( )


round3 [ ] environment ( )
Virtual functions
Derived class Target Cruise Satellite
target [ ] cruise [ ] satellite [ ] Module-Variable arrays aerodynamics ( )
propulsion ( )
SATELLITE3 forces ( )
Vehicle-objects TARGET3 CRUISE3
targeting ()
seeker ( )
guidance ( )
control ( )
Communication bus combus [ ] intercept ()

environment

control aerodynamics

forces newton intercept

propulsion

guidance seeker targeting



MaSTech © 2013 47
CADAC++ Modularity
• CADAC’s modular structure mirrors the hardware components
Classes of an aerospace vehicle
Cadac, ... – A module is a model of a vehicle component
Vehicle • Examples: aerodynamics, propulsion, actuator, guidance, control
Module
Variable
Event
Packet
Datadeck
Table
Markov
Matrix
Document

MaSTech © 2013 48
CADAC++ Modularity
• CADAC’s modular structure mirrors the hardware components
Classes of an aerospace vehicle
Cadac, ... – A module is a model of a vehicle component
Vehicle • Examples: aerodynamics, propulsion, actuator, guidance, control
Module
• The calling order of the modules is controlled by the input file
Variable
Event
Packet
Datadeck
Table
Markov
Matrix
Document

MaSTech © 2013 49
CADAC++ Modularity
• CADAC’s modular structure mirrors the hardware components
Classes of an aerospace vehicle
Cadac, ... – A module is a model of a vehicle component
Vehicle • Examples: aerodynamics, propulsion, actuator, guidance, control
Module
• The calling order of the modules is controlled by the input file
Variable
Event • Data between modules is transferred by module-variables
Packet – Module-variables, being the only interface, are strictly controlled
Datadeck – Each vehicle object has reserved an array for its module-variables
Table – There is a one-to-one relationship between the module-variable name and
the array location
Markov
– The file doc.asc documents all module-variables
Matrix
Document

MaSTech © 2013 50
CADAC++ Modularity
• CADAC’s modular structure mirrors the hardware components
Classes of an aerospace vehicle
Cadac, ... – A module is a model of a vehicle component
Vehicle • Examples: aerodynamics, propulsion, actuator, guidance, control
Module
• The calling order of the modules is controlled by the input file
Variable
Event • Data between modules is transferred by module-variables
Packet – Module-variables, being the only interface, are strictly controlled
Datadeck – Each vehicle object has reserved an array for its module-variables
Table – There is a one-to-one relationship between the module-variable name and
the array location
Markov
– The file doc.asc documents all module-variables
Matrix
Document • Module-variables can be of type int, double, 3x1 vector, and
3x3 matrix

MaSTech © 2013 51
CADAC++ Modularity
• CADAC’s modular structure mirrors the hardware components
Classes of an aerospace vehicle
Cadac, ... – A module is a model of a vehicle component
Vehicle • Examples: aerodynamics, propulsion, actuator, guidance, control
Module
• The calling order of the modules is controlled by the input file
Variable
Event • Data between modules is transferred by module-variables
Packet – Module-variables, being the only interface, are strictly controlled
Datadeck – Each vehicle object has reserved an array for its module-variables
Table – There is a one-to-one relationship between the module-variable name and
the array location
Markov
– The file doc.asc documents all module-variables
Matrix
Document • Module-variables can be of type int, double, 3x1 vector, and
3x3 matrix
• Inside a module, the module-variables are localized and, after
computations, are loaded into their array location ♣

MaSTech © 2013 52
Fighter Aircraft Modular Structure

Class Hierarchy
Cadac

Flat6 Cadac::flat6[]

Plane Cadac::plane[]
propulsion( )
plane[50-99]
Modules

actuator( ) aerodynamics( ) forces( ) euler( ) newton( )


plane[600-649] plane[100-199] flat6[200-209] flat6[150-199] flat6[210-249]

control( ) environment( ) kinematics( )


plane[500-599] flat6[50-99] flat6[100-149]

guidance( )
plane[400-499]

MaSTech © 2013 53
Hypersonic Plane Modular Structure

rcs( ) propulsion( )
hyper[50-99] hyper[10-49] 6 DoF Hypersonic Vehicle HYPER6
actuator( ) aerodynamics( ) forces( ) euler( ) newton( ) intercept( )
hyper[600-649] hyper[100-199] round6[200-209] round6[150-199] round6[210-299] hyper[650-699]

control( ) environment( ) kinematics( )


hyper[500-599] round6[50-99] round6[100-149]

guidance( ) ins( ) Class Hierarchy


hyper[400-499] hyper[300-349]
Cadac

seeker( ) gps( )
hyper[200-299] hyper[700-799]

startrack( ) Round6
datalink( )
hyper[350-399 ] hyper[800-849]

Hyper

data flow on combus


data flow inside object

MaSTech © 2013 54
Hypersonic Plane Modular Structure

rcs( ) propulsion( )
hyper[50-99] hyper[10-49] 6 DoF Hypersonic Vehicle HYPER6
actuator( ) aerodynamics( ) forces( ) euler( ) newton( ) intercept( )
hyper[600-649] hyper[100-199] round6[200-209] round6[150-199] round6[210-299] hyper[650-699]

control( ) environment( ) kinematics( )


hyper[500-599] round6[50-99] round6[100-149]

guidance( ) ins( ) Class Hierarchy


hyper[400-499] hyper[300-349]
Cadac

seeker( ) gps( )
hyper[200-299] hyper[700-799]
3 DoF Satellite SAT3 Round3 Ground0
startrack( ) Round6
datalink( ) newton( ) forces( )
hyper[350-399 ] hyper[800-849]
round3[20-59] satellite[10-19]

environment( )
0 DoF Ground Hyper Satellite Radar
seeker( ) round3[10-19]
radar [10-29] Radar RADAR0
kinematics( ) data flow on combus
ground0[10-19] data flow inside object ♣

MaSTech © 2013 55
Structure of Newton Module
previous module

void Round3::def_newton()
Definition of module-variables used in this module

void Round3::init_newton ()
Initial calculations

void Round3::newton(double int_step)


Integrations and time-phased calculations

Integration loop

next module

MaSTech © 2013 56
Code Example of Module Newton
void Round3::def_newton()
{

Definition of //Definition of module-variables


module-variables in round3[19].init("lonx",0,"Vehicle longitude-deg","newton","diag","scrn,plot,com");
round3[20].init("latx",0,"Vehicle latitude-deg","newton","diag","scrn,plot,com");
array ‘round3[ ]’, round3[21].init("alt",0,"Vehicle altitude-m","newton","out","scrn,plot,com");
a member of class ...
‘Round3’ }void Round3::init_newton()
{
........................
}
void Round3::newton(double int_step)
{
//localizing module-variables
//input from other modules
double time=round3[0].real();
Matrix FSPV=round3[10].vec();
double grav=round3[11].real();
Matrix WEII=round3[27].mat();
//state variables
Matrix SBII=round3[35].vec();
Matrix VBII=round3[36].vec();
Matrix ABII=round3[37].vec();
...
//-------------------------------------------------------------------------
//building gravitational vector in geographic coordinates
GRAV.assign_loc(2,0,grav);

//integrating inertial state variables


ABII_NEW=TIG*((TGV*FSPV)+GRAV);
VBII_NEW=integrate(ABII_NEW,ABII,VBII,int_step);
SBII=integrate(VBII_NEW,VBII,SBII,int_step);
ABII=ABII_NEW;
VBII=VBII_NEW;
...
//-------------------------------------------------------------------------
//loading module-variables
//state variables
round3[35].gets_vec(SBII);
round3[36].gets_vec(VBII);
round3[37].gets_vec(ABII);
...
}

MaSTech © 2013 57
Code Example of Module Newton
void Round3::def_newton()
{
name, value, definition, module, type, out to: screen, plot file, combus
Definition of //Definition of module-variables
module-variables in round3[19].init("lonx",0,"Vehicle longitude-deg","newton","diag","scrn,plot,com");
round3[20].init("latx",0,"Vehicle latitude-deg","newton","diag","scrn,plot,com");
array ‘round3[ ]’, round3[21].init("alt",0,"Vehicle altitude-m","newton","out","scrn,plot,com");
a member of class ...
‘Round3’ }void Round3::init_newton()
{
........................
}
void Round3::newton(double int_step)
{
//localizing module-variables
//input from other modules
double time=round3[0].real();
Matrix FSPV=round3[10].vec();
double grav=round3[11].real();
Matrix WEII=round3[27].mat();
//state variables
Matrix SBII=round3[35].vec();
Matrix VBII=round3[36].vec();
Matrix ABII=round3[37].vec();
...
//-------------------------------------------------------------------------
//building gravitational vector in geographic coordinates
GRAV.assign_loc(2,0,grav);

//integrating inertial state variables


ABII_NEW=TIG*((TGV*FSPV)+GRAV);
VBII_NEW=integrate(ABII_NEW,ABII,VBII,int_step);
SBII=integrate(VBII_NEW,VBII,SBII,int_step);
ABII=ABII_NEW;
VBII=VBII_NEW;
...
//-------------------------------------------------------------------------
//loading module-variables
//state variables
round3[35].gets_vec(SBII);
round3[36].gets_vec(VBII);
round3[37].gets_vec(ABII);
...
}

MaSTech © 2013 58
Code Example of Module Newton
void Round3::def_newton()
{
name, value, definition, module, type, out to: screen, plot file, combus
Definition of //Definition of module-variables
module-variables in round3[19].init("lonx",0,"Vehicle longitude-deg","newton","diag","scrn,plot,com");
round3[20].init("latx",0,"Vehicle latitude-deg","newton","diag","scrn,plot,com");
array ‘round3[ ]’, round3[21].init("alt",0,"Vehicle altitude-m","newton","out","scrn,plot,com");
a member of class ...
‘Round3’ }void Round3::init_newton()
{
........................
}
void Round3::newton(double int_step)
{
//localizing module-variables
Getting module- //input from other modules
double time=round3[0].real();
variables from Matrix FSPV=round3[10].vec();
‘round3[ ]’ array double grav=round3[11].real();
Matrix WEII=round3[27].mat();
//state variables
Matrix SBII=round3[35].vec();
Matrix VBII=round3[36].vec();
Matrix ABII=round3[37].vec();
...
//-------------------------------------------------------------------------
//building gravitational vector in geographic coordinates
GRAV.assign_loc(2,0,grav);

//integrating inertial state variables


ABII_NEW=TIG*((TGV*FSPV)+GRAV);
VBII_NEW=integrate(ABII_NEW,ABII,VBII,int_step);
SBII=integrate(VBII_NEW,VBII,SBII,int_step);
ABII=ABII_NEW;
VBII=VBII_NEW;
...
//-------------------------------------------------------------------------
//loading module-variables
//state variables
round3[35].gets_vec(SBII);
round3[36].gets_vec(VBII);
round3[37].gets_vec(ABII);
...
}

MaSTech © 2013 59
Code Example of Module Newton
void Round3::def_newton()
{
name, value, definition, module, type, out to: screen, plot file, combus
Definition of //Definition of module-variables
module-variables in round3[19].init("lonx",0,"Vehicle longitude-deg","newton","diag","scrn,plot,com");
round3[20].init("latx",0,"Vehicle latitude-deg","newton","diag","scrn,plot,com");
array ‘round3[ ]’, round3[21].init("alt",0,"Vehicle altitude-m","newton","out","scrn,plot,com");
a member of class ...
‘Round3’ }void Round3::init_newton()
{
........................
}
void Round3::newton(double int_step)
{
//localizing module-variables
Getting module- //input from other modules
double time=round3[0].real();
variables from Matrix FSPV=round3[10].vec();
‘round3[ ]’ array double grav=round3[11].real();
Matrix WEII=round3[27].mat();
//state variables
Matrix SBII=round3[35].vec();
Matrix VBII=round3[36].vec();
Matrix ABII=round3[37].vec();
...
//-------------------------------------------------------------------------
//building gravitational vector in geographic coordinates
GRAV.assign_loc(2,0,grav);

//integrating inertial state variables


Computations ABII_NEW=TIG*((TGV*FSPV)+GRAV);
VBII_NEW=integrate(ABII_NEW,ABII,VBII,int_step);
SBII=integrate(VBII_NEW,VBII,SBII,int_step);
ABII=ABII_NEW;
VBII=VBII_NEW;
...
//-------------------------------------------------------------------------
//loading module-variables
//state variables
round3[35].gets_vec(SBII);
round3[36].gets_vec(VBII);
round3[37].gets_vec(ABII);
...
}

MaSTech © 2013 60
Code Example of Module Newton
void Round3::def_newton()
{
name, value, definition, module, type, out to: screen, plot file, combus
Definition of //Definition of module-variables
module-variables in round3[19].init("lonx",0,"Vehicle longitude-deg","newton","diag","scrn,plot,com");
round3[20].init("latx",0,"Vehicle latitude-deg","newton","diag","scrn,plot,com");
array ‘round3[ ]’, round3[21].init("alt",0,"Vehicle altitude-m","newton","out","scrn,plot,com");
a member of class ...
‘Round3’ }void Round3::init_newton()
{
........................
}
void Round3::newton(double int_step)
{
//localizing module-variables
Getting module- //input from other modules
double time=round3[0].real();
variables from Matrix FSPV=round3[10].vec();
‘round3[ ]’ array double grav=round3[11].real();
Matrix WEII=round3[27].mat();
//state variables
Matrix SBII=round3[35].vec();
Matrix VBII=round3[36].vec();
Matrix ABII=round3[37].vec();
...
//-------------------------------------------------------------------------
//building gravitational vector in geographic coordinates
GRAV.assign_loc(2,0,grav);

//integrating inertial state variables


Computations ABII_NEW=TIG*((TGV*FSPV)+GRAV);
VBII_NEW=integrate(ABII_NEW,ABII,VBII,int_step);
SBII=integrate(VBII_NEW,VBII,SBII,int_step);
ABII=ABII_NEW;
VBII=VBII_NEW;
...
//-------------------------------------------------------------------------
//loading module-variables
Loading module- //state variables
variables onto round3[35].gets_vec(SBII);
round3[36].gets_vec(VBII);
‘round3[ ]’ array round3[37].gets_vec(ABII);
...
 }

MaSTech © 2013 61
• How do you feel about polymorphism?
1. Too difficult to understand
2. I want to get to know it better
3. Best for multi-object modular simulations
4. Not the best architecture
5. I am numbed and without feelings

MaSTech © 2013
62
Event Scheduling
• Aerospace vehicle trajectories are divided into phases initiated by events
– Rocket ascent in three stages
– Aircraft take-off, cruise, landing
– Missile launch, midcourse, terminal, intercept

MaSTech © 2013 63
Event Scheduling
• Aerospace vehicle trajectories are divided into phases initiated by events
Classes – Rocket ascent in three stages
Cadac, ... – Aircraft take-off, cruise, landing
Vehicle – Missile launch, midcourse, terminal, intercept
Module • Events in CADAC++ are interruptions of the trajectory for the purpose of
Variable reading new module-variables
Event – Global dimensioning of events
• NEVENT = maximum number of events
Packet
• NVAR = maximum number of module-variables at each event
Datadeck
Table
Markov
Matrix
Document

MaSTech © 2013 64
Event Scheduling
• Aerospace vehicle trajectories are divided into phases initiated by events
Classes – Rocket ascent in three stages
Cadac, ... – Aircraft take-off, cruise, landing
Vehicle – Missile launch, midcourse, terminal, intercept
Module • Events in CADAC++ are interruptions of the trajectory for the purpose of
Variable reading new module-variables
Event – Global dimensioning of events
• NEVENT = maximum number of events
Packet
• NVAR = maximum number of module-variables at each event
Datadeck • Events are introduced in the input file input.asc
Table – Event block
Markov IF watch_variable_name relational_operator value
Matrix module-variables
ENDIF
Document
– Relational operators: <, =, >
– Example: seeker is enabled at dbt = 8000 m to-go
IF dbt < 8000
mseek 2 //'int' =2:Enable, =3:Acquisition, =4:Lock module seeker
ENDIF

MaSTech © 2013 65
Input File of Cruise Missile ( 1 of 4 )
TITLE input1_3.asc: UAV cruising and attacking target tracked by satellite
// Waypoint guidance and dive into target
OPTIONS y_scrn n_comscrn y_events n_tabout y_plot y_traj n_merge y_doc
MODULES
environment def,init,exec
aerodynamics def,exec
propulsion def,init,exec
forces def,exec
newton def,init,exec
targeting def,exec
seeker def,exec
guidance def,exec
control def,exec
intercept def,exec
END
TIMING
scrn_step 30
plot_step 0.2
traj_step 0.5
int_step 0.05
END
. . . . . . . continue
MaSTech © 2013 66
Input File of Cruise Missile ( 2 of 4 )
VEHICLES 3
CRUISE3 UAV
//initial conditions
lonx 14.7 //Vehicle longitude - deg module newton
latx 35.4 //Vehicle latitude - deg module newton
alt 7000 //Vehicle altitude - m module newton
psivgx 90 //Vehicle heading angle - deg module newton
thtvgx 0 //Vehicle flight path angle - deg module newton
dvbe 200 //Vehicle speed - m/s module newton
alphax 0 //Angle of attack - deg module control
phimvx 0.0 //Bank angle - deg module control
//aerodynamics
AERO_DECK cruise3_aero_deck.asc
//mass properties and propulsion
mprop 4 //'int' Mode switch - ND module propulsion
PROP_DECK cruise3_prop_deck.asc
//seeker
//guidance
//autopilot
. . . . . . . . continue

MaSTech © 2013 67
Input File of Cruise Missile ( 3 of 4 )
IF wp_flag = -1
//Waypoint #1 crossed
wp_lonx 15.1 //Longitude of way point - deg module guidance
wp_latx 35.35 //Latitude of way point - deg module guidance
psifgx 135 //Heading line-of-attack angle - deg module guidance
altcom 5000 //Altitude command - m) module control
ENDIF
IF wp_flag = -1
//Waypoint #2 crossed
……
ENDIF
IF wp_flag = -1
//after Waypoint #3: hold heading at 180 and descend to 1500 m
//turn-on seeker and intercept nearest target l
ENDIF
IF mseeker = 3
//seeker is locked on target
ENDIF
END (of CRUISE3)
. . . . . . . . continue

MaSTech © 2013 68
Input File of Cruise Missile ( 4 of 4 )
TARGET3 Tank_t1
lonx 15.4 //Vehicle longitude - deg module newton
latx 35.3 //Vehicle latitude - deg module newton
alt 100 //Vehicle altitude - m module newton
psivgx 45 //Vehicle heading angle - deg module newton
dvbe 10 //Vehicle speed - m/s module newton
END
SATELLITE3 Sat_s1
lonx 10 //Vehicle longitude - deg module newton
latx 30 //Vehicle latitude - deg module newton
alt 500000 //Vehicle altitude - m module newton
psivgx 45 //Vehicle heading angle - deg module newton
thtvgx 0 //Vehicle flight path angle - deg module newton
dvbe 7700 //Vehicle speed - m/s module newton
END
END
ENDTIME 300
STOP

MaSTech © 2013 69
Console Output
input1_3.asc: UAV cruising and attacking target tracked by satellite Jan 10 2013 10:03:33

Vehicle: CRUISE3
time event_time pdynmc mach lonx latx
psivgx thtvgx SBEG1 SBEG2 SBEG3 VBEG1
mprop thrust mass cl_ov_cd mcontrol anx
phimvx phicx ancomx alcomx mguidance wp_grdrange

UAV
0 0 11790 0.640464 14.7003 35.4
90.0005 -0.0560967 -4.67125e-005 10.0005 0.00489589 -0.0018685
4 1342.26 999.999 3.81163 46 0.189791
-0.621118 -12.4224 1.0202 -0.0206828 30 18098.6

UAV
30 30 14037.7 0.698874 14.7697 35.4001
89.9982 -0.0169859 6.92492 6301.06 -0.390137 0.00697903
4 971.033 998.649 10.008 46 0.996081
-0.154728 -0.155251 0.994662 -0.00135087 30 11814.5

UAV
60 60 14039.9 0.698925 14.8418 35.4
90.0525 -2.33129e-006 3.00039 12848.7 -0.322431 -0.200044
4 964.612 997.811 10.0282 46 0.990144
-0.236911 -0.238453 0.990137 -0.00206247 30 5274.05

*** Missile c1 overflies waypoint at longitude = 14.9 deg, latitude = 35.4 deg at time = 84.2 sec
SWBG-horizontal miss distance = 1.92061 m north = 0.00257307 m east = -1.9206 m

*** Event #1 UAV time = 84.2 sec; criteria: wp_flag = -1 ***


. . . . . . . .

MaSTech © 2013 70
UAV Trajectory
Launch
Long 14.7o, Lat 35.4o, heading East
Altitude - m
Alt 7000 m
Mach 0.7
8.00 e +3
Launch 6.00
 4.00 Waypoints
2.00
Lon-deg Lat-deg
WP #1 14.9 35.4
0 WP #2 15.25 35.54
WP #3 15.43
35.1 35.44
Target
 35.2
Waypoint # 1
 35.3
14.4

# 3 35.4
Cruise -2.00

 Mach 0.7
#2 35.5 After WP #1 descend to 5000 m
14.6 14.8 35.6 After WP #2 descend to 2000 m
15.0
15.2
Latitude - deg
After WP #3 descend to Target
15.4
Longitude - deg
input_3.asc: UAV Cruise ' UAV ' Nov 28 2006 16:00:52

MaSTech © 2013 71
• What is your preferred format for
input data?
1. Programmed into code
2. ASCI input file
3. Graphic user interface
4. Namelist (Fortran)

MaSTech © 2013
72
Communication Bus combus

MaSTech © 2013 73
Communication Bus combus
• Encapsulation of vehicle-objects prevents direct data exchange

MaSTech © 2013 74
Communication Bus combus
• Encapsulation of vehicle-objects prevents direct data exchange
• The communication bus combus gives global access to the module-
variables of all vehicle-objects

MaSTech © 2013 75
Communication Bus combus
• Encapsulation of vehicle-objects prevents direct data exchange
Classes
• The communication bus combus gives global access to the module-
Cadac, ... variables of all vehicle-objects
Vehicle • Building the communication bus
Module – Module-variables are flagged by the keyword “com”
Variable round3[19].init("lonx",0,"Vehicle longitude - deg","newton","init/diag","com");

Event – Every vehicle-object publishes (loads) a packet of com –variables


Packet – The packets are stored in the array combus of type Packet
Datadeck
Table
Markov
Matrix
Document

MaSTech © 2013 76
Communication Bus combus
• Encapsulation of vehicle-objects prevents direct data exchange
Classes
• The communication bus combus gives global access to the module-
Cadac, ... variables of all vehicle-objects
Vehicle • Building the communication bus
Module – Module-variables are flagged by the keyword “com”
Variable round3[19].init("lonx",0,"Vehicle longitude - deg","newton","init/diag","com");

Event – Every vehicle-object publishes (loads) a packet of com –variables


Packet – The packets are stored in the array combus of type Packet
Datadeck • Using the communication bus
Table – The communication bus can be used by any vehicle-object
– A vehicle-object subscribes (downloads) the variables it needs from the other
Markov vehicle-objects
Matrix – Example: UAV downloads the position of the target it attacks
Document

MaSTech © 2013 77
Communication Bus combus
• Encapsulation of vehicle-objects prevents direct data exchange
Classes
• The communication bus combus gives global access to the module-
Cadac, ... variables of all vehicle-objects
Vehicle • Building the communication bus
Module – Module-variables are flagged by the keyword “com”
Variable round3[19].init("lonx",0,"Vehicle longitude - deg","newton","init/diag","com");

Event – Every vehicle-object publishes (loads) a packet of com –variables


Packet – The packets are stored in the array combus of type Packet
Datadeck • Using the communication bus
Table – The communication bus can be used by any vehicle-object
– A vehicle-object subscribes (downloads) the variables it needs from the other
Markov vehicle-objects
Matrix – Example: UAV downloads the position of the target it attacks
Document • Characteristics of combus
– It is an array of type Packet of size equal to the number of vehicle- objects
– The slot # of a vehicle in combus[] is the same as in vehicle_list[] 

MaSTech © 2013 78
Publishing and Subscribing Module-Variables

Publishing Subscribing

CRUISE3 c1
Packets
round3[]: lonx, latx, alt
cruise[]: thrust, mguidance combus
c1
CRUISE3 c2 c2
round3[]: lonx, latx, alt .
cruise[]: thrust, mguidance .
..
. t1
TARGET3 t1 t2
.
round3[]: lonx, latx, alt .
--------------------------

TARGET3 t2
round3[]: lonx, latx, alt
--------------------------
.. CRUISE3 c2 CRUISE3 c1
. … t1 lonx, latx, alt t1 lonx, latx, alt
t2 lonx, latx, alt t2 lonx, latx, alt

MaSTech © 2013 79
Publishing and Subscribing

MaSTech © 2013 80
Publishing and Subscribing
• The communication bus Packet combus enables the communication
among the encapsulated vehicle objects

MaSTech © 2013 81
Publishing and Subscribing
• The communication bus Packet combus enables the communication
among the encapsulated vehicle objects
• Vehicles publish selected module-variables by using the keyword “com”
in the definition
– Every vehicle object of the same type (multiple instantiation) publishes the
same module-variables
– Example: All vehicle objects are derived from the round3 class and publish
the same round3 module-variables

MaSTech © 2013 82
Publishing and Subscribing
• The communication bus Packet combus enables the communication
among the encapsulated vehicle objects
• Vehicles publish selected module-variables by using the keyword “com”
in the definition
– Every vehicle object of the same type (multiple instantiation) publishes the
same module-variables
– Example: All vehicle objects are derived from the round3 class and publish
the same round3 module-variables
• Subscription of module-variables is complicated by the fact that the
subscribing vehicle object (this) is unaware of the publishing vehicle

MaSTech © 2013 83
Publishing and Subscribing
• The communication bus Packet combus enables the communication
among the encapsulated vehicle objects
• Vehicles publish selected module-variables by using the keyword “com”
in the definition
– Every vehicle object of the same type (multiple instantiation) publishes the
same module-variables
– Example: All vehicle objects are derived from the round3 class and publish
the same round3 module-variables
• Subscription of module-variables is complicated by the fact that the
subscribing vehicle object (this) is unaware of the publishing vehicle
• Subscription methodology:
– Publishing vehicle must by identified by its combus slot#
• Logic is required to select the publishing vehicle from all other vehicle objects
– Example: Pick target (publisher) when it is in acquisition range of missile (subscriber)
• Build the publishing vehicle’s ID
• Find this ID in combus und thus determining its slot#
– Download module-variables from the combus data packet 

MaSTech © 2013 84
Console Display of combus
. . . . . . . .
UAV
60 60 14039.9 0.698925 14.8418 35.4 7000.32
90.0525 -2.33129e-006 3.00039 12848.7 -0.322431 -0.200044 218.255
4 964.612 997.811 10.0282 46 0.990144 0
-0.236911 -0.238453 0.990137 -0.00206247 30 5274.05 0

time = 60 ------------------------------------ combus --------------------------------------------


** CRUISE3 ** mach lonx latx alt dvbe psivgx
SBEG1 SBEG2 SBEG3 VBEG1 VBEG2 VBEG3 SBII1
SBII3 thrust

*** c_1 0.698925 14.8418 35.4 7000.32 218.255 90.0525


3.00039 12848.7 -0.322431 -0.200044 218.255 8.88049e-006 5.01955e+0066
3.69465e+006 964.612

** TARGET3 ** mach lonx latx alt dvbe psivgx


SBEG1 SBEG2 SBEG3 VBEG1 VBEG2 VBEG3 SBII1
SBII3

*** t_1 0.0294188 15.4049 35.3038 100.063 9.99972 45.0045


424.583 424.629 -0.0634189 7.07032 7.07142 -0.00152751 5.00655e+006
3.68193e+006

** SATELLITE3 mach lonx latx alt dvbe psivgx


SBEG1 SBEG2 SBEG3 VBEG1 VBEG2 VBEG3 SBII1
SBII3

*** s_1 26.1265 13.2454 32.6799 501637 7697.56 46.954


321398 332307 -1637.38 5254.12 5625.28 -54.2971 5.62495e+006
3.71084e+006
-----------------------------------------------------------------------------------------

*** Missile c1 overflies waypoint at longitude = 14.9 deg, latitude = 35.4 deg at time = 84.2 sec ***
SWBG-horizontal miss distance = 1.92061 m north = 0.00257307 m east = -1.9206 m
*** Event #1 UAV time = 84.2 sec; criteria: wp_flag = -1 ***

MaSTech © 2013 85
Table Look-Up
Classes • Aerodynamic and propulsion decks
Cadac, ... – Contain 1, 2, 3 dimensional tables
Vehicle – Linear interpolation adequate
Module
Variable • Desired features
Event – Keep data decks separate from code
Packet – Make adding or deleting tables simple
Datadeck • Architecture
Table – Encapsulation of data and methods
Markov – Table stores tabular data
Matrix – Datadeck hosts pointer-arrays of type Table
Document – Tables to be accessed by pointers stored in these arrays
– Overloading the look-up function for 1, 2, 3 dimensions 

MaSTech © 2013 86
Table Look-Up Procedure

MaSTech © 2013 87
Table Look-Up Procedure
• Tables are located in files ‘cruise3_aero_deck.asc’ and ‘cruise3_prop_deck.asc’

MaSTech © 2013 88
Table Look-Up Procedure
• Tables are located in files ‘cruise3_aero_deck.asc’ and ‘cruise3_prop_deck.asc’
• These file names are identified in ‘input.asc’ by the key words AERO_DECK or PROP_DECK

MaSTech © 2013 89
Table Look-Up Procedure
• Tables are located in files ‘cruise3_aero_deck.asc’ and ‘cruise3_prop_deck.asc’
• These file names are identified in ‘input.asc’ by the key words AERO_DECK or PROP_DECK
• The function look_up(…), located in the ‘utility_functions.cpp’ file, carries out the
interpolation

MaSTech © 2013 90
Table Look-Up Procedure
• Tables are located in files ‘cruise3_aero_deck.asc’ and ‘cruise3_prop_deck.asc’
• These file names are identified in ‘input.asc’ by the key words AERO_DECK or PROP_DECK
• The function look_up(…), located in the ‘utility_functions.cpp’ file, carries out the
interpolation
• Tabular data are read and stored during initialization
– main() opens the file ‘input.asc’
– For every vehicle-object, the function vehicle_data(…) is called
– In vehicle_data(…) the file name of the aero-deck is read and the file is opened
– Then the function read_tables(…) is called, which reads and stores the table

MaSTech © 2013 91
Table Look-Up Procedure
• Tables are located in files ‘cruise3_aero_deck.asc’ and ‘cruise3_prop_deck.asc’
• These file names are identified in ‘input.asc’ by the key words AERO_DECK or PROP_DECK
• The function look_up(…), located in the ‘utility_functions.cpp’ file, carries out the
interpolation
• Tabular data are read and stored during initialization
– main() opens the file ‘input.asc’
– For every vehicle-object, the function vehicle_data(…) is called
– In vehicle_data(…) the file name of the aero-deck is read and the file is opened
– Then the function read_tables(…) is called, which reads and stores the table
• Using tables during integration
– Function look_up(…) is overloaded for one, two, and three dimensional table look-up
– The table interpolation consists of two steps
• Finding the index of the discrete independent variable with function find_index(…) nearest and below the
input variable
• Conducting a linear interpolation with function interpolate(…) between data points
– Extrapolation is constant at the upper end and linearly sloped at the lower end ♣

MaSTech © 2013 92
One-Dimensional Table Look-Up
Object name
of table

Keywords
1DIM cd0_vs_mach
NX1 6 Number of discrete
0.4000 0.0506 points
0.5500 0.0462
0.6500 0.0435
0.7700 0.0410
0.8500 0.0506
0.9500 0.1078

Array of discrete Array of discrete


independent dependent variable
variable mach cd0[mach]

• Application in module ‘aerodynamics’, drag coefficient


cd0=aerotable.look_up("cd0_vs_mach",mach);

MaSTech © 2013 93
Two-Dimensional Table Look-Up
Keywords Object name of table

Number of discrete points

2DIM tav_vs_alt_mach
NX1 3 NX2 4 // altitude - m, Mach #; thrust available - N
0 0.4 2168.0 2088.8 2043.9 1987.8
1524 0.55 1942.9 1891.3 1863.3 1846.8
3048 0.7 1711.6 1677.3 1676.0 1683.6
0.85

Array of second discrete


independent variable
mach Array of discrete dependent
variables
Array of first discrete tav[altitude][mach]
independent variable altitude

• Application in module ‘propulsion’, thrust available


tav=proptable.look_up("tav_vs_alt_mach",alt,mach);

MaSTech © 2013 94
• What do you like about Monte Carlo best?
1. A vacation spot on the Côte Azure
2. The Formal One race care event
3. Gambling in the casinos
4. Grace Kelly, the former princess
5. Statistical method for nonlinear systems

MaSTech © 2013
95
Monte Carlo Technique
• ‘Monte Carlo’ is an important technique of experimental mathematics
– Statistical mechanics, nuclear physics, genetics
– We use the simple direct simulation method

MaSTech © 2013 96
Monte Carlo Technique
• ‘Monte Carlo’ is an important technique of experimental mathematics
– Statistical mechanics, nuclear physics, genetics
– We use the simple direct simulation method
• We study the response of nonlinear systems to random inputs
– Making multiple runs, drawing values from stochastic distributions
– Obtaining large quantity of output for post-analysis

MaSTech © 2013 97
Monte Carlo Technique
• ‘Monte Carlo’ is an important technique of experimental mathematics
– Statistical mechanics, nuclear physics, genetics
– We use the simple direct simulation method
• We study the response of nonlinear systems to random inputs
– Making multiple runs, drawing values from stochastic distributions
– Obtaining large quantity of output for post-analysis
• High fidelity aerospace simulations have many noise sources
– Turbulence, INS, sensors, aerodynamic misalignments
– With distributions like uniform, Gaussian, Rayleigh, exponential, Gaussian-
Markov, Dryden

MaSTech © 2013 98
Monte Carlo Technique
• ‘Monte Carlo’ is an important technique of experimental mathematics
– Statistical mechanics, nuclear physics, genetics
– We use the simple direct simulation method
• We study the response of nonlinear systems to random inputs
– Making multiple runs, drawing values from stochastic distributions
– Obtaining large quantity of output for post-analysis
• High fidelity aerospace simulations have many noise sources
– Turbulence, INS, sensors, aerodynamic misalignments
– With distributions like uniform, Gaussian, Rayleigh, exponential, Gaussian-
Markov, Dryden
• Output data are nearly Gaussian if there are many noise sources
– Asserted by the central limit theorem
– Requires at least 10 uncorrelated noise sources

MaSTech © 2013 99
Monte Carlo Technique
• ‘Monte Carlo’ is an important technique of experimental mathematics
– Statistical mechanics, nuclear physics, genetics
– We use the simple direct simulation method
• We study the response of nonlinear systems to random inputs
– Making multiple runs, drawing values from stochastic distributions
– Obtaining large quantity of output for post-analysis
• High fidelity aerospace simulations have many noise sources
– Turbulence, INS, sensors, aerodynamic misalignments
– With distributions like uniform, Gaussian, Rayleigh, exponential, Gaussian-
Markov, Dryden
• Output data are nearly Gaussian if there are many noise sources
– Asserted by the central limit theorem
– Requires at least 10 uncorrelated noise sources
• Output is expressed in univariate or bivariate performance criteria
– Univariate: mean, standard deviation, CEP (Circular Error Probable),
– Bivariate: error ellipses ♣

MaSTech © 2013 100


Monte Carlo Implementation
• High fidelity simulations use many random variables
– Modeling noise
– Describing uncertain phenomena
– Environmental disturbances

MaSTech © 2013 101


Monte Carlo Implementation
• High fidelity simulations use many random variables
Classes – Modeling noise
– Describing uncertain phenomena
Cadac, ...
– Environmental disturbances
Vehicle
• Monte Carlo methodology executes repetitive runs drawing random variables
Module from stochastic distribution
Variable – The number of runs and the random number seed are provided in the input file
Event input.asc :
MONTE 20 12345
Packet
– Random variables are identified in input.asc by the key words
Datadeck UNI, GAUSS, RAYL, EXP, MARKOV
Table – For initialization of module-variables UNI, GAUSS, RAYL, EXP are used
Markov – For run time noise MARKOV is used
Matrix
Document

MaSTech © 2013 102


Monte Carlo Implementation
• High fidelity simulations use many random variables
Classes – Modeling noise
– Describing uncertain phenomena
Cadac, ...
– Environmental disturbances
Vehicle
• Monte Carlo methodology executes repetitive runs drawing random variables
Module from stochastic distribution
Variable – The number of runs and the random number seed are provided in the input file
Event input.asc :
MONTE 20 12345
Packet
– Random variables are identified in input.asc by the key words
Datadeck UNI, GAUSS, RAYL, EXP, MARKOV
Table – For initialization of module-variables UNI, GAUSS, RAYL, EXP are used
Markov – For run time noise MARKOV is used
Matrix • The maximum numbers of Markov variables is set by the global integer
Document NMARKOV

MaSTech © 2013 103


Monte Carlo Implementation
• High fidelity simulations use many random variables
Classes – Modeling noise
– Describing uncertain phenomena
Cadac, ...
– Environmental disturbances
Vehicle
• Monte Carlo methodology executes repetitive runs drawing random variables
Module from stochastic distribution
Variable – The number of runs and the random number seed are provided in the input file
Event input.asc :
MONTE 20 12345
Packet
– Random variables are identified in input.asc by the key words
Datadeck UNI, GAUSS, RAYL, EXP, MARKOV
Table – For initialization of module-variables UNI, GAUSS, RAYL, EXP are used
Markov – For run time noise MARKOV is used
Matrix • The maximum numbers of Markov variables is set by the global integer
Document NMARKOV
• Stochastic output of the main vehicle is collected in stat.asc files
– Use: OPTION y_stat y_merge
• CADAC-Studio analyses and displays stochastic information ♣

MaSTech © 2013 104


Stochastic Distributions in CADAC
pdf

1
max  min
UNI vname min, max
min max vname
pdf
0.2
GAUSS vname mean, sigma
0 -20 -10 0 10
vname
mean sigma
pdf
0.4
RAYL vname mode
0.2

00 0.1 0.2 0.3 0.4 vname


pdf mode
EXP vname density 0.4

density = # of events / unit (vname) 0.2

0 0 0.1 0.2 0.3 0.4 0.5


density vname

MARKOV vname sigma, bcor Auto-


sigma2
Power
Spectral
correlation
Density
1st Order Gauss-Markov Process
sec bcor Hz

MaSTech © 2013 105
Ascent and Intercept
TITLE input19_3_3.asc: X30 ascent from Cape, and seeker intercept
// Monte Carlo run
// X30 ascent, releasing transfer vehicle, releasing interceptor,
// intercepting satellite
// Error models: GPS/INS, star tracker, SAR terminal sensor
MONTE 100 12345
OPTIONS y_scrn y_events y_doc n_tabout y_plot y_stat y_merge y_traj
. . . . . .
//GPS measurement
MARKOV ucfreq_noise 0.1 100 //User clock frequency error
GAUSS ucbias_error 0 3 //User clock bias error - m
GAUSS pr1_bias 0 0.842 //Pseudo-range 1 bias – m
MARKOV pr1_noise 0.25 0.002 //Pseudo-range 1 noise – m
. . . . . .
//star tracker
GAUSS az1_bias 0 0.0001 //Star azimuth error 1 bias – rad
MARKOV az1_noise 0.00005 50 //Star azimuth error 1 noise – rad
. . . . . .
//Interceptor RF seeker
GAUSS biasaz 0 .0001 //Azimuth boresight error – rad
MARKOV randgl1 1 0.5 //Glint Markov noise in satellite x-dir – m
GAUSS esfta 0 .001 //Azimuth scale factor error – ND
. . . . . .
ENDTIME 1900
STOP

MaSTech © 2013 106


Ascent and Intercept Scenario
SAT3

HYPER6

HYPER6

HYPER6

RADAR0

MaSTech © 2013 107


Ascent Trajectory
input19_1PR.asc: Ascent from Cape Canaveral until satellite intercept May 14 2005 14:56:35
+90
+70

 Intercept of
+50satellite

Start of
+30
 hypersonic
vehicle

+10
+50
-110 +30
-90 +10
-70 -50 -30 -10

-10

MaSTech © 2013 108


-30
Trajectory Traces
Satellite
intercept
Crossing of Release of T.V. Release of
waypoint interceptor

25.0

250
e +3

e +3
input19_1PR.asc: Ascent from Cape Canaveral until satellite intercept ' Hypersonic Vehicle ' May 14 2005 14:56:35
8.00

20.0

200
6.00

15.0

150
Inertial velocity - m/s
4.00

10.0

50.0 100
Altitude - m
2.00

5.00
Mach #
0

0 0.20 0.40 0.60 0.80 1.00 e +3 1.20


T ime - sec
40.0 45.0 50.0 55.0 60.0 65.0 70.0

11.0

-80.0-60.0-40.0-20.0 0 20.0 40.0 60.0


9.00
1.00 3.00 5.00 7.00
Flight path angle - deg

Angle of attack - deg


Heading angle - deg

0 0.20 0.40 0.60 0.80 1.00 1.20


T ime - sec e +3

MaSTech © 2013 109


Two Interceptors of Two Satellites

• Two interceptors are released
from the transfer vehicle to
intercept two satellites in Intercept Sat 1
circular and elliptical orbits

input19PR_3.asc: Ascent and rendezvous with circular and elliptical satellite May 21 2005 16:58:56

Intercept Sat 2

+50
+30
+70

+90

+70


+50 Release of
two
+150 interceptors
+30
-50

Start of
+170
+10 hypersonic
-70 vehicle
-10
-170
MaSTech © 2013 -90 110
Stochastic Analysis of Intercept
– With INS/GPS, star tracker and seeker errors, 30 Monte Carlo runs

– 20 good intercept points in 1-, 3- Hill coordinates


3H 1H
2H
input19_3_2.asc: Vandenberg AFB - South, tail-chase engagement 30 MC ' Hypersonic Vehicle ' Jun 4 2005 07:19:21
. Intercept
2.5
MISS_H3
0

·
-2.5

50.0% Contour Ellipse


ELL STG SYM
1 6

1
-7.5

• The 20 good ascent trajectories


achieved terminal guidance with
-12.5

the RF seeker
• Their miss distances are plotted
in the 1H, 3H coordinates, normal
to the satellite trajectory
-17.5

• The CEP is about 5 m


-10 -5 0 5 10
MISS_H1

MaSTech © 2013 111


• What did you like best about the trip to
Monte Carlo?
1. I’d rather visit the real place
2. I don’t gamble, even in simulations
3. A substitute for the real world
4. Good way to model the real environment
5. I'd rather stay in my deterministic home

MaSTech © 2013
112
Overloaded Matrix Operators

MaSTech © 2013 113


Overloaded Matrix Operators
• Operators are overloaded by defining operator functions
Classes • ret_type class_name::operator#(arg_list){…}
Cadac, ... – # is a placeholder for any C++ operator (except . :: .* ?: sizeof)

Vehicle – The operator function defines the operation that the overloaded operator performs
Module – Most useful to define the operations of a new class, e.g., class Matrix
Variable
Event
Packet
Datadeck
Table
Markov
Matrix
Document

MaSTech © 2013 114


Overloaded Matrix Operators
• Operators are overloaded by defining operator functions
Classes • ret_type class_name::operator#(arg_list){…}
Cadac, ... – # is a placeholder for any C++ operator (except . :: .* ?: sizeof)

Vehicle – The operator function defines the operation that the overloaded operator performs
Module – Most useful to define the operations of a new class, e.g., class Matrix
Variable • Example: matrix multiplication
Event – Prototype
Packet Matrix Matrix::operator*(const Matrix &B);
Datadeck – Usage
Table • Matrix AMAT(3,3),BMAT(3,3),CMAT(3,3);
• CMAT=AMAT*BMAT;
Markov
Matrix
Document

MaSTech © 2013 115


Overloaded Matrix Operators
• Operators are overloaded by defining operator functions
Classes • ret_type class_name::operator#(arg_list){…}
Cadac, ... – # is a placeholder for any C++ operator (except . :: .* ?: sizeof)

Vehicle – The operator function defines the operation that the overloaded operator performs
Module – Most useful to define the operations of a new class, e.g., class Matrix
Variable • Example: matrix multiplication
Event – Prototype
Packet Matrix Matrix::operator*(const Matrix &B);
Datadeck – Usage
Table • Matrix AMAT(3,3),BMAT(3,3),CMAT(3,3);
• CMAT=AMAT*BMAT;
Markov
– Multiplication is explained by actual operator function assignment
Matrix
• CMAT=AMAT.operator*(BMAT);
Document
– AMAT, the left operand , is the object which initiates the function call: operator*(…)
– BMAT, the right operand, is the argument of the function

– AMAT*BMAT is returned by the function 

MaSTech © 2013 116


CADAC Utility Functions
void print();
double absolute();
Matrix adjoint(); Overloaded operators
void assign_loc(…)
Matrix & build_mat33(…); bool operator!=(const Matrix &B);
Matrix & cart_from_pol(…) Matrix operator*(const double &b);
Matrix col_vec(const int &col);
double determinant(); Matrix operator*(const Matrix &B);
Matrix diamat_vec(); Matrix & operator*=(const double &b);
Matrix diavec_mat();
void dimension(int row,int col); Matrix & operator*=(const Matrix &B);
Matrix ellipse(); Matrix operator+(const double &b);
int get_cols(); Matrix operator+(const Matrix &B);
int get_index(const int &row,const int &col);
double get_loc(const int &r,const int &c); Matrix & operator+=(const double &b);
double * get_pbody(); Matrix & operator+=(const Matrix &B);
int get_rows();
Matrix & identity(); Matrix operator-(const double &b);
Matrix inverse(); Matrix operator-(const Matrix &B);
Matrix mat33_vec9();
Matrix & ones(); Matrix & operator-=(const double &b);
bool operator!=(const Matrix &B); Matrix & operator-=(const Matrix &B);
Matrix pol_from_cart(); Matrix &operator=(const Matrix &B);
Matrix row_vec(const int &row);
Matrix skew_sym(); bool operator==(const Matrix &B);
Matrix sub_matrix(const int &row, const int &col); double & operator [](const int &r);
Matrix trans();
Matrix univec3(); double operator^(const Matrix &B);
Matrix & zero(); Matrix operator~();
Matrix vec9_mat33();

MaSTech © 2013 117


Coding 6 DoF Equations in Matrices

Aircraft translational equations of motion


1
[dv / dt ]   [ ] [v ]  [ f a , p ]B  [T ]BL [ g ]L
E
B
B BE B E B
B
m
//integrating acceleration in body coordinates to obtain velocity
Matrix VBEBD_NEW=-WBEB.skew_sym()*VBEB+FAPB*(1/vmass)+TBL*GRAVL;
VBEB=integrate(VBEBD_NEW,VBEBD,VBEB,int_step);
VBEBD=VBEBD_NEW;

MaSTech © 2013 118


Coding 6 DoF Equations in Matrices

Aircraft translational equations of motion


1
[dv / dt ]   [ ] [v ]  [ f a , p ]B  [T ]BL [ g ]L
E
B
B BE B E B
B
m
//integrating acceleration in body coordinates to obtain velocity
Matrix VBEBD_NEW=-WBEB.skew_sym()*VBEB+FAPB*(1/vmass)+TBL*GRAVL;
VBEB=integrate(VBEBD_NEW,VBEBD,VBEB,int_step);
VBEBD=VBEBD_NEW;

Aircraft attitude equation with rotary (engine) angular momentum



[d BE / dt ]B  [ I BB ]B   [
1
 
] [ I BB ]B [ BE ]B  [lR ]B  [mB ]B
BE B

//integrating the angular velocity acc wrt the inertial frame in body coord
Matrix WACC_NEXT=IBBB.inverse()*(-WBEB.skew_sym()*(IBBB*WBEB+L_ENGINE)+FMB);
WBEB=integrate(WACC_NEXT,WBEBD,WBEB,int_step);
WBEBD=WACC_NEXT; 

MaSTech © 2013 119


Documenting and Error Checking
• Emphasis is on documenting module-variables. They govern:
– Input/output
– Data transfer between modules
– Special diagnostic needs

MaSTech © 2013 120


Documenting and Error Checking
• Emphasis is on documenting module-variables. They govern:
– Input/output
– Data transfer between modules
– Special diagnostic needs
• ‘One definition – multiple use’ principle
– Module-variables are defined in the modules
– Their descriptions are used in the input.asc file
– All descriptions are collected in the doc.asc file

MaSTech © 2013 121


Documenting and Error Checking
• Emphasis is on documenting module-variables. They govern:
Classes – Input/output
Cadac, ... – Data transfer between modules
– Special diagnostic needs
Vehicle
• ‘One definition – multiple use’ principle
Module
– Module-variables are defined in the modules
Variable – Their descriptions are used in the input.asc file
Event – All descriptions are collected in the doc.asc file
Packet • Class Document enables the sharing of the descriptions
Datadeck
Table
Markov
Matrix
Document

MaSTech © 2013 122


Documenting and Error Checking
• Emphasis is on documenting module-variables. They govern:
Classes – Input/output
Cadac, ... – Data transfer between modules
– Special diagnostic needs
Vehicle
• ‘One definition – multiple use’ principle
Module
– Module-variables are defined in the modules
Variable – Their descriptions are used in the input.asc file
Event – All descriptions are collected in the doc.asc file
Packet • Class Document enables the sharing of the descriptions
Datadeck • Error checking
Table – Matrix compatibility
Markov – File stream opening
– Violations of the ‘one-on-one correspondence’ rule
Matrix • One module-variable name for one array location
Document

MaSTech © 2013 123


Documenting and Error Checking
• Emphasis is on documenting module-variables. They govern:
Classes – Input/output
Cadac, ... – Data transfer between modules
– Special diagnostic needs
Vehicle
• ‘One definition – multiple use’ principle
Module
– Module-variables are defined in the modules
Variable – Their descriptions are used in the input.asc file
Event – All descriptions are collected in the doc.asc file
Packet • Class Document enables the sharing of the descriptions
Datadeck • Error checking
Table – Matrix compatibility
Markov – File stream opening
– Violations of the ‘one-on-one correspondence’ rule
Matrix • One module-variable name for one array location
Document • Documentation package for a simulation
– Modules
– input.asc
– doc.asc 

MaSTech © 2013 124


doc.asc File
TITLE F16C12_1.ASC 3 WAYPOINTS AND TERMINAL GLIDE SLOPE TO IP
//
OPTIONS y_scrn n_events n_comscrn n_tabout y_doc y_plot y_traj n_merge
........
*********************************************************************************************************************
********************************************** PLANE6 ***************************************************************
*********************************************************************************************************************
*** F16C12_1.ASC 3 WAYPOINTS AND TERMINAL GLIDE SLOPE TO IP Dec 25 2012 18:10:32 ***

Plane Module-Variable Array


----------------------------------------------------------------------------------------------------------------------
|LOC| NAME | DEFINITION | MODULE | PURPOSE | OUTPUT |
----------------------------------------------------------------------------------------------------------------------
. . . . . . .
----------------------------------------------------------------------------------------------------------------------
50 mprop int =0: off,=1: manual throttle,=2: Mach hold propulsion data
51 vmachcom Commanded Mach # - ND propulsion data
52 throttle Throttle setting (0->1) ND propulsion data scrn,plot
53 gmach Gain conversion from Mach to throttle - ND propulsion data
54 thrustf Saved thrust when 'mfeeze'=1 - N propulsion save
55 thrust Turbojet thrust - N propulsion out scrn,plot
56 thrust_req Required thrust - N propulsion diag
57 mfreeze_prop int Saving m'mfreeze' value - ND propulsion save
58 powerd Derivative of achieved power setting - %/sec propulsion state
59 power Achieved power setting - % propulsion state
----------------------------------------------------------------------------------------------------------------------
. . . . . . . .

MaSTech © 2013 125


• Why do you hate documenting?
1. Not exiting
2. A drudgery
3. A necessary evil
4. Because my boss makes me do it
5. I don’t hate it — l love it

MaSTech © 2013
126
CADAC Studio
• 2DIM: 2-dimensional plotting
– Up to three variables in two frames (total of six variables)
– Multiple vehicle plotting
• PITA: 3-dimensional plotting in Cartesian coordinates
– Up to ten vehicles
• GLOBE: 3-dimensional plotting over the Earth (longitude, latitude, altitude)
– Up to four vehicles
• CHARTS: Strip charts
– Up to 12 traces in one frame
• Stochastic processing
– HIST: Histograms
– BIVAR: CEP and bivariate ellipses from scatter plots
– MCAP: Mean and std. deviation of trajectory fans
• Automated launch envelope and footprint generation
– SWEEP and SWEEP++ for CADAC_FTN and CADAC++ 

MaSTech © 2013 127


KPLOT 2 – 2DIM

MaSTech © 2013 128


KPLOT – 3 DIM (1 of 2)

MaSTech © 2013 129


KPLOT – 3DIM (2 of 2)

MaSTech © 2013 130


KPLOT - GLOBE

MaSTech © 2013 131


Available CADAC Simulations
• Fortran (included in CADAC4 download)
– 3 DoF NASA hypersonic vehicle
– 3 DoF three stage rocket
– 5 DoF cruise missile with GPS, and terminal sensor
– 5 DoF short range air-to-air missile
– 6 DoF F16 aircraft simulation without flight control
– 6 DoF NASA hypersonic vehicle with flight control
– 6 DoF short range air-to-air missile

• C++ of this Webinar (request from mastech.zipfel@cox.net)


– 5 DoF cruise missile
– 6 DoF F16 aircraft
– 6 DoF NASA hypersonic vehicle 

MaSTech © 2013 132


References
– Supplement your knowledge of flight
dynamics by studying:
• Zipfel, Peter H., Modeling and Simulation of
Aerospace Vehicle Dynamics, AIAA
Education Series, 2nd Edition 2007
– Fill in the voids you may have in C++ by consulting:
• Schildt, Herbert, C++: The Complete Reference, 4th Edition, McGraw-
Hill, 2002
• Or if you need a C++ introductory tutorial, read: Schildt, Herbert,
C++ From the Ground Up, 3rd Edition, McGraw-Hill, 2003
– Find more detail of the CADAC++ architecture in publication:
• Zipfel, Peter H., “CADAC: Multi-Use Architecture for Constructive
Aerospace Vehicle Simulations.” Journal of Defense Modeling and
Simulations, Feb 2012. 
MaSTech © 2013 133
Your Take-Away

MaSTech © 2013 134


Your Take-Away
• Fortran is being edged out by C++
– CADAC_FTN of 1978 became CADAC++ in 2000

MaSTech © 2013 135


Your Take-Away
• Fortran is being edged out by C++
– CADAC_FTN of 1978 became CADAC++ in 2000
• CADAC++ is an open source framework
– For constructive aerospace simulations
• Missiles, aircraft, boosters, hypersonic vehicles
– Used by government and academic institutions

MaSTech © 2013 136


Your Take-Away
• Fortran is being edged out by C++
– CADAC_FTN of 1978 became CADAC++ in 2000
• CADAC++ is an open source framework
– For constructive aerospace simulations
• Missiles, aircraft, boosters, hypersonic vehicles
– Used by government and academic institutions
• PIE of C++ enables large net-centric modular simulations
– P = Polymorphism: Late binding at run-time
– I = Inheritance: Vehicles inherit the equations of motion
– E = Encapsulation: Multiple instantiation of vehicle objects 

MaSTech © 2013 137


Way Forward
• Download CADAC4 from AIAA website
– http://arc.aiaa.org/doi/book/10.2514/4.862182 and go to Supplemental Materials
• Send me an e-mail mastech.zipfel @ cox.net to obtain the
three C++ simulations
– 5 DoF cruise missile
– 6 DoF fighter aircraft
– 6 DoF NASA hypersonic ascent plane
• Meet me in Hampton, VA at the National Aerospace
Institute on 4 & 5 March 2013 for my short course
– Modeling Flight Dynamics with Tensors
– https://www.aiaa.org/CourseDetail.aspx?id=14462
• Attend my next webinar 3 April 2013, 1 pm EST
– UAV Conceptual Design Using Computer Simulations
– https://www.aiaa.org/CourseDetail.aspx?id=15009 

MaSTech © 2013 138


• How did you like my Webinar?
1. Boring
2. Met my expectations
3. Exceeded my expectations
4. I can’t get enough of it

MaSTech © 2013
139
MaSTech © 2013 140

You might also like