View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Flight Visualization

4.4 | 16 ratings Rate this file 38 Downloads (last 30 days) File Size: 100 KB File ID: #18363 Version: 1.0
image thumbnail

Flight Visualization


Gus Brown (view profile)


18 Jan 2008 (Updated )

Creates an up-dateable display of an F4 Phantom jet with flight data.

| Watch this File

File Information

I created this function to assist in displaying flight test data.

It creates a patch and a collection of hg transform objects which allow one to easily update the figure.

Also allows the control surfaces to be moved.

Bar meters are included to display altitude, Mach number and g's.

Typically one would use this inside a loop to display flight data as an animation. Just remember to call drawnow to force each frame to update.


This file inspired Dynamical Systems Toolbox.

MATLAB release MATLAB 7.4 (R2007a)
Other requirements Some flight data would be nice.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (23)
29 Nov 2016 chenghua wei

wonderful work!

15 Sep 2015 Flavio

Flavio (view profile)

11 Jun 2015 Geza

Geza (view profile)

Every plot takes about 1 second, so I can not use it for animation. Any idea why?

Comment only
14 Jun 2013 Bruno Dias


04 Apr 2013 Joris

Joris (view profile)

Very interesting !
Good job, thank you :)

04 Apr 2013 Joris

Joris (view profile)

24 Dec 2012 Sl

Sl (view profile)

Thanks a lot. I can use this files to test my AHRS IMU. :-)

24 Dec 2012 Sl

Sl (view profile)

01 Feb 2011 Etienne

Nice tool but having trouble to understand the coordinate systems used for the control surfaces. I managed to create my own aircraft, but I am not sure what coordinate system is used for the control surfaces. I am assuming you are using a ZYX rotation matrix.

07 Apr 2010 Kyle

Kyle (view profile)

08 Apr 2009 Jveer

Jveer (view profile)

wow! seriously! one of the best visulizations i've seen on FEX. there is so much to learn from this. thank you!

25 Jun 2008 Hugo Curiel

Excellent Visualization.

Can you explain a bit more how to convert 3D models to the mat file format.

With your Google API, I would definitely join the visualization with a google earth path track. Would make a nice navigation analysis tool.

17 May 2008 yu lin

25 Mar 2008 Chirag Bhatt

Hi,Its ververy helpful and wonderful.

17 Mar 2008 Gus Brown

Hi, it seems that I may have zipped the file using WinZip's enhanced compression which apparently is not that widely supported.


I will re-compress the file with normal compression and upload it. This will likely only be available tomorrow.

Sorry for the inconvenience.

Comment only
14 Mar 2008 islam elbahnsy

i can't unzip the file i tried many many times the main 2 files can't be extracted if i should use special kind of extract file or special version please some one tell me because i really need this file

Comment only
07 Mar 2008 chen yongliang

good,it's useful to me!THANKs a lot

Comment only
07 Mar 2008 Gerhard Lippitsch

this file cannot be unzipped--is not in zip 2 format, pls help

11 Feb 2008 Gus Brown

Please vheck the 'Changes' section below to see when the updated file is available for download.

Comment only
11 Feb 2008 Gus Brown

> Do you have a sample demo?
I have added a script file 'example.m' which gives one an idea of how to use this function to create an animation.

Comment only
08 Feb 2008 Jim Henderson

Very nice indeed. I've been doing some trajectory calculations with Simulink but the standard visualization tool is poor. If I had all the information for the flight parameters in a file how would I animate them? I am interested in seeing how your model looks for an animation. My models don't have aileron rudder control so it would be nice to see your model in action. Do you have a sample demo?

22 Jan 2008 Gus Brown

Your comments on having to move the phantom.mat file are interesting as it works as advertised on my machine. I have a WindowsXP setup, what are you using?

I will add some instructions on how to build your own models, but this will take some time so please be patient. I may even include some of the tools I have created to do this, although these are not exactly suitable for public release. Typically one could create these surface models manually in matlab or import them from STL or other geometry files.

The model for the drawModel function is defined in two variables inside a *.mat file. These variables are 'M' for the surface models and 'ref' for the transform positions and rotations ([x y z phi theta psi]).

M is a structure which can contain substructures. The actual patch objects can be quad surfaces as one would draw with the surf function or triangulated surfaces as one would draw with the trisurf function.

Try loading the phantom.mat file to see what I am describing.

If there is a field called 'tri' present then a triangular surface is created from the x,y & z fields. See M.Phantom for an example of this.
Note that M.Phantom is a structured array where each array entry is an individual patch. The properties of each patch are defined in the other variables 'mat' for the material type, 'col' for the patch color, 'lit' for the lighting style and 'alp' for the surface alpha value (transparency). The 'ref' field indicates the position and orientation in euler angles of the rotation center of the patch, this is not used is this example. Instead the 'ref' variable is used for the reference locations.

The 'ref' variable is a structure containing a select list of reference locations. In this case 'all' for everything, 'tail' for the vertical fin, etc

Comment only
21 Jan 2008 Jeff Barton

A very useful visualization. Thanks. (Although I had to move the phantom.mat file out of private\drawModel in order for matlab to recognize it in the path.) For those of us who model and simulate many different vehicles, but don't have rendering experience, can you tell us how to acquire renderings of different aircraft?

21 Jan 2008

Fixed problem with altitude conversion from km to m.

11 Feb 2008

I have added an 'example' to show how to use this function to create an animation from existing flight data.

11 Feb 2008

Resubmitting due to possible transmission problems.

Contact us