In case anyone here is using Matlab and Simulink to test or develop UAVs and UAV autopilots I am posting a link to a new flight dynamic model SFunction for use with Simulink- http://jsbsim.sf.net/JSBSimSFunction.zip
The project enables any JSBSim flight dynamic model to be run within Simulink. It also has a trim utility as well as a linearization utility that prints formatted, de-coupled state space matrices to the command window. This makes it extremely useful for flight control or autopilot design. An eigenvalue analysis is also performed after the linearization.
The project is open-source and all the source code is included with the project download. It has been tested with Matlab R2008b and R2010a. Currently there is an issue with R2010a that causes the resulting trimmed control inputs to be slightly off- hopefully we can get this fixed soon. Pre-compiled MEX files exist for win64/32 currently, with Mac OS and hopefully Linux versions in hte near future.