The CD-ROM that accompanies this book contains
source code for developing simulations in C++ as well as example simulations
for use with Simulink, VisSim, MATRIXX SystemBuild, and 20-sim. The
top-level directories on the CD-ROM are organized as follows:
1.
Integrating state variables and updating difference equations. Supported integration
methods: Forward Euler, Adams-Bashforth 2nd, 3rd, and 4th
order, Runge-Kutta 2nd and 4th order.
2.
Function interpolation. Linear function interpolation with any number of
function dimensions.
3.
Matrix/vector classes and operations. These C++ template classes enable the
creation of vectors and matrices of arbitrary size element types such as int, double, and complex. The supported operations
include addition, subtraction, and multiplication of appropriately-sized
vectors and matrices as well as matrix inversion using the LU decomposition.
Vector dot product, cross product and magnitude operations are also included.
4.
Random number generation. Pseudorandom numbers can be generated in a portable
manner using a high quality method. Uniform and normal random number distributions
are available.
5.
Rigid body motion. Rigid body motion simulation is provided by the RigidBody class. This class uses a quaternion to compute the
rotational orientation of the body. The motion of the body is determined by its
initial conditions and the translational and rotational accelerations imparted
on it over time.
6.
Nonlinear functions. Some nonlinear functions that are often needed in
dynamic system simulation are provided. These functions include nint (nearest integer), limit, quantize, and transport_delay.
Including
the DSSL.h file in a C++ source
program provides the basic DSSL services. If the integration methods are used, StateList.cpp must also be compiled and
linked with the program. If the Random class is used, Random.cpp is required and if the RigidBody class is used, RigidBody.cpp is required.
The entire RTSP protocol and software package consists of the following items:
1. Message Definition File (MDF) syntax and format specifications
2. Translator program to convert an MDF file into C++ source code
3. Runtime software that provides the RTSP real time communication routines
4. A generic Win32™ controller program that reads any valid MDF file, sends out command messages to the federates in response to button clicks, and displays the response information returned from the federates