Invis AC3D. For Designing of FlightGear's 3D-. Models. ⢠GIMP. For Designing of aircraft textures. ⢠Blender (Windows ver. 2.49). For correlation of. FDM and 3D ...
2013-062-041
Development of A Generic Flight Simulator For Fixed Wing Aircraft Salman Ahmad, Mansoor Ahsan and Farrukh Mazhar National University of Sciences and Technology, H-12, Islamabad, Pakistan With the advent of automation in aerospace vehicles, Unmanned Aerial Vehicles (UAVs) have found their utilization in multiple dimensions. Their attributes like low cost, simplicity of design, commercial availability of related equipment and mission efficiency without involving risk to human life has earned them a place in modern aviation. In the design and development of such aircraft, cost effectiveness is considered as one of the prime features. For the said reasons, most low profile UAVs are designed without the involvement of extensive CFD analysis or wind tunnel tests.
Abstract— Flight Simulation is the artificial creation of aircraft flight and various aspects related to flight environment. In this work, an open source flight simulator has been used to develop a customized and generic platform for simulation of fixed wing aircraft. Being open source such a simulator provides unlimited opportunities of innovations and usage which is not restricted to pilot training only but can be used for multiple purposes such as testing of conceptual aircraft designs and their behavioural analysis. This work discusses in detail the methods of designing Flight Dynamics Model (FDM) as well as visual model of a fixed wing aircraft and its related sub-systems. After the design of a generic Flight Dynamics Model (FDM) a Graphic User Interface (GUI) was also developed to use a simple data plug-in system to generate the code for the Flight Dynamics Model. In order to perform visual simulations a complete visual model for generic fixed wing aircraft has also been designed using multiple 3-D softwares. Making use of all the skills gained during the course of research, three complete aircraft with their Flight Dynamics and visual models have been designed. A method to correlate visual and behavioural models has been used in order to avoid disorientations between the two simulation domains.
This research aims at developing an application for simulation and testing of such designs. The aims of the research include investigation of a suitable platform for simulation, keeping in view the degree of expendability, ease of modification and ability of the application to interface with external applications. Further scope of the research includes in finding methods of modeling aircraft in simulators. It also aims at the study of 3D Design techniques for developing visual models of aircraft. Alongside this, it includes the study of various existing Flight Dynamics Modeling techniques.
Keywords—Flight Simulation; Flight Dynamics Model; Visualization; FlightGear: Graphical User Interface.
I.
II.
INTRODUCTION
SELECTION OF FLIGHT SIMULATOR PLATFORM
Building a completely new flight simulation environment may have implied duplication of efforts, thus a selection was made from available flight simulators. The world of Flight Simulation has developed exponentially during the last decade with the advancements in computational resources and graphics processing. There is a range of Flight Simulators available commercially around the world amongst which Microsoft’s Flight simulator series, Xplane and FlightGear are notable. The selection criterion was framed by keeping in view traits like expandability, ease of modification and ability to interface with standalone applications and APIs.
Flight simulator is an airplane pilot-training device in which the cockpit and instruments of an airplane are duplicated and the conditions of actual flight are simulated. Though the basic aim of Flight simulation is to train pilots for flying but it has also found its use in applications like behavioral analysis of aircraft, testing of control algorithms and feasibility checks of aircraft designs prior to actual flight. Flight simulators also help in the development and testing of various flight software as well as flight hardware [1]. Not only have they been used for pilot training but in development of useful applications for manned and unmanned aircraft [2][3]. Some utilization include the development and testing of control algorithms, development of 3D interface for real-time control of UAVs [4], in the development of multi agent systems for UAVs [5], Hardware in Loop Simulation (HILS) for UAV autopilot controllers [6] and in validation of Icing systems on board commercial airliners [7].
One of the prime selection criteria was the ability of simulator to host a credible flight dynamics model that is close to real and gives viable solutions with available data. A. Microsoft’s Flight Simulator Microsoft’s Flight simulator is a renowned proprietary flight simulator having a detailed graphics platform supported by Direct X 10. It has one of the most realistic
246
visual models and supports high quality graphics. Its flight model is based on a parametric approach where it uses a set of parameters defined in the form of matrices to simulate the flight dynamics. Though being highly detailed, Microsoft’s Flight Simulator being proprietary software, offers limited features for customization and interfacing. B. Xplane Series Xplane is another proprietary flight simulator which uses a structure based approach to simulate its flight model by a process called “blade element theory”. This involves calculation of forces and moments by breaking down aircraft structure into smaller elements [5][8]. Xplane being proprietary software does not offer its source code for modification and hence limits the opportunities of expansion and interfacing.
Fig. 1. Block-Diagram of FlightGear Compilation
C. FlightGear - The Open Source Simulator FlightGear is an open source flight simulator which has been developed by an international community of contributors abiding by GNU regulations. The FlightGear project aims at creation of a sophisticated flight simulation platform which can be used in applications not only restricted to flying training or entertainment but also in the field of scientific research and development [9]. Its open source nature offers its users with prospects of expansion, modification and interfacing. It offers output of flight parameters through serial communication (RS-432) and Ethernet protocols allowing interface with multiple software. In addition to this it supports a wide variety of Flight models with a possibility of embedding an externally created, user-defined flight dynamics model as well. On the basis of its open source nature, expandability, ease of modification and support of multiple types of flight dynamics models, FlightGear was selected as the base platform for the course of this research. III.
COMPILATION OF SOURCE CODE
x
OpenAL. An audio library for rendering of three dimensional multichannel sound. [10]
x
Zlib. A software library used for data compression. It is an abstraction of the “Deflate” compression algorithm used in the Gzip compression program. [11]
x
Plib. A portable computer games library having a 3D engine for font rendering, windowing, GUIs and networking. [12]
x
GLUT. An OpenGL utility toolkit. [13]
x
SimGear. A set of libraries having resources for simulations, visualizations and games building. It is a parallel project with FlightGear and it has been maintained to support FlightGear requirements.[14]
x
GNU Automation Tools. These include GNU Autotools e.g. automake, autoconf etc that are required to build/compile the software code using GNU compiler tool chain. IV.
To exploit the true advantages offered by an open source simulator, it was deemed necessary to compile the software from its source codes. Any contribution in the source code requires a complete compilation process to achieve the results in the form of binaries. This requires a set of libraries with an operating system supporting the GNU build system e.g. Linux or Cygwin (in case of windows).
BASICS OF FLIGHT SIMULATION MODELING
An aircraft model consists of a visual model, a flight dynamics model and various systems and subsystems. These include sounds, instruments, avionics, hydraulics, aircraft lightings and fuel. FlightGear offers its developers to model all these systems using default xml based features and external applications as well.
FlightGear is dependent on a set of libraries and toolkits for its compilation. The compilation procedure requires a match of versions between the requisite libraries. A block diagram of FlightGear’s compilation process is shown in Fig. 1. The libraries required include OpenAL, GLUT, Zlib, Plib, SimGear and a number of GNU automation tools as discussed below:-
A. Visual Model Visual model is a representation of the true dimensions of the aircraft with respect to surrounding environment in visual domain. An aircraft may be modeled in any of the FlightGear supported 3-D formats using CAD programs. In order to model an aircraft with a high degree of fidelity, accurate calibration of visual model with the FlightGear’s 3-D environment is required. A complete visual model consists of 3-D CAD model along with animations. These animations
247
include propeller movement, control surface movements and the movement of landing gear.
4) Navigation Equations. These equations use body axis velocities computed from the force equations. The generic form of these equations is given in (10).
B. Flight Dynamics Model (FDM) FDM models the dynamic parameters of aircraft including its accelerations, moments, inertia and position. These parameters are governed by nonlinear constant coefficients ODEs called the 6-DOF nonlinear equations of motion. These equations can be presented in the body or wind axis. For our work, the body axis 6-Dof equations of motion are presented as follows:
PN UccT c\ V (-cI s\ sI sT c\ ) W (sI s\ cI sT c\ ) PE Uc UcT s\ V (cI c\ sI sT s\ ) W (sI c\ cI sT c\ ) h UsT Vs V I cT WcI cT V.
RV QW Q gD sin T ( XA XT )
V mV
RU PW gD sin I cos T (YA YT )
W mW
QU P PV gD cos I cos T ( ZA ZT )
The FDM engines differ with each other by the method they use to achieve an end result i.e. Aircraft’s behavior. These differences include the type of data which is required by respective FDM engines, the type of solvers they use and the types of scenarios that they can simulate the aircraft in.
(7)
Where, m is total mass of the aircraft, U, V and W are linear velocities; P, Q and R are angular rates, gD is gravity constant, T and I are pitch and roll angles respectively. XA YA ZA are sum of aerodynamic forces in x, y and z directions and XTYT ZT are thrust forces in x, y and z direction respectively.
A. JSBsim Flight dynamics model JSBsim is named after its developer John S Berndt. JSBsim uses the “Coefficient Build up Method”. This method involves the use of extensive data extracted from CFD analysis and wind tunnel testing. Coefficients are fed to the FDM in terms of tables in XML coding. JSBsim typically uses “3rd Degree Adams Bashforth Integrator” as default for propagating the translational and rotational velocities and positions in a 6 degree of freedom (6-DOF) model.
2) Moment Equations. These equations model the angular moments of aircraft in body axis. Inertia coefficients m and n are computed from the mass moment of inertias. Outputs of these equations are angular rates p, q and r. The generic form of moment equation is given in (8).
Since its initiation in 1996, JSBsim has been extensively developed by contributors from all around the world. Though being a very mature Flight Dynamics Model, JSB sim relies on large amount of coefficients.
*P Jxz[ Jx Jy Jz ]PQ [ Jz ( Jz Jy) J 2 xz ]QR Jzl Jxzn JyQ ( Jz Jx) PR Jxz ( P 2 R 2 ) m *R [( Jx Jy ) Jx J 2 xz ]PQ Jxz[ Jx Jy Jz ]QR Jxzl Jxn where
(8) B. YASim Flight Dynamics Model Yasim stands for “Yet another Simulator” and it is one of the embedded Flight Dynamics Models in FlightGear. It has a relatively different approach as compared to JSBsim. It uses the aircraft’s performance parameters and aircraft’s structural dimensions for calculation of flight dynamics. It comprises of aerodynamic, inertia and propulsion model which can be defined in terms of an XML code.
* JxJz J 2 xz 3) Kinematic Equations. The attitude of the aircraft can be determined using the angular rates P, Q and R as computed from (8). P, Q and R are the aircraft roll rate, pitch rate and yaw rate respectively and are related to the derivatives of Euler angles through Direction Cosine Matrix (DCM). The equations are given in (9)
I T