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.
Gus Brown (2021). Flight Visualization (https://www.mathworks.com/matlabcentral/fileexchange/18363-flight-visualization), MATLAB Central File Exchange. Retrieved .
Every plot takes about 1 second, so I can not use it for animation. Any idea why?
Very interesting !
Good job, thank you :)
Thanks a lot. I can use this files to test my AHRS IMU. :-)
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.
wow! seriously! one of the best visulizations i've seen on FEX. there is so much to learn from this. thank you!
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.
Hi,Its ververy helpful and wonderful.
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.
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
good,it's useful to me!THANKs a lot
this file cannot be unzipped--is not in zip 2 format, pls help
Please vheck the 'Changes' section below to see when the updated file is available for download.
> 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.
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?
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
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?
Inspired: Dynamical Systems Toolbox
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!