5.0

5.0 | 2 ratings Rate this file 17 Downloads (last 30 days) File Size: 935.51 KB File ID: #25042

JSBSim S-Function GUI 0.3

by Brian Mills

 

16 Aug 2009 (Updated 03 Mar 2010)

S-Function version of JSBSim 1.0 release candidate. Non-linear flight model for Simulink.

| Watch this File

File Information
Description

To have access to JSBSim aircraft models, you must download JSBSim seperately!! Instructions in README file!!! Contains S-Function and source code.

Based on JSBSim MEX-Function project by Agostino De Marco.

Any JSBSim aircraft model will run!

MATLAB release MATLAB 7.7 (R2008b)
Other requirements JSBSim 1.0 can be downloaded seperately!! The included Mexw32 binary runs on Windows 32-bit platforms. Must be recompiled for other platforms. Visual Studio Express 2008 or better required! Please read the README text file!!!!
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (13)
19 Nov 2009 Gernot

I could not test it. Should it run on Matlab2009a?
1) no models are selectable in the gui: .. (not yet working)
2) initialize model parameters: ERROR:
??? Error using ==> JSBSimGUI>init_model_Callback at 1774
Error due to multiple causes:
--> Invalid MEX-file
'C:\E_Data\Lehre\FUP\F0902_AirbugSimpleControl\subJSBSimSimulink\JSBSim_SFunction_GUI\JSBSim_SFunction.mexw32':
Diese Anwendung konnte nicht gestartet werden, weil die Anwenungskonfiguration nicht
korrekt ist. Zur Problembehebung sollten Sie die Anwendung neu installieren.

19 Nov 2009 Brian Mills

Gernot,

1) The "no models (not yet working)" message in the AC model selection pane is because that function has not yet been completed. You can however type in the model names in the "AC _Name" text box.
2) You must download JSBSim seperately as in my instructions and place the JSBSim folder in exactly the location specified, otherwise, you will not have any aircraft files to load (AC model files are in the JSBSim download.)

Please first confirm that you have downloaded JSBSim and placed its folder in the JSBSimSFunction_GUI folder (the one that is populated with files) and then test and let me know the results. I compiled this version slightly differently (to run a bit faster,) so I am hoping that it is not the cause of the "Invalid MEX-file." Other users have successfully run my previously compiled versions with R2009a.

Regards,
Brian

20 Nov 2009 Gernot

Dear Brian,

I appreciate your work and your short response time.

1) this will be no problem
2) JSBSim downloaded, folder renamed to JSBSim and placed in
JSBSim_SFunction_GUI;
e.g. the path to 'f22' is: <here a long path>\JSBSim_SFunction_GUI\JSBSim\aircraft\f22
I've made <<here a long path>\JSBSim_SFunction_GUI> the current directory in Matlab and startet the GUI, loaded the model file, but the "init. model param." does throw the error mentioned.

SYSTEM: WinXP, Matlab 2009a; the same error occurs with Matlab 2008b

I fear the problem is inside the mex; or are some special dll's required (from VS2008 probably?)

Regards, Gernot.

20 Nov 2009 Brian Mills

Gernot,

So the error occurrs when you "push" the "Initialize Model Parameters" button? If that is the case, then it is not the mex function. If the error throws when you try to run the model, then perhaps it could be the mex. Could you clarify for me?

BTW, your path(s) look correct.

Sorry that you are having trouble with it. Please be patient and I will try my best to get you up and running.

Thanks for downloading the SFunction!

20 Nov 2009 Gernot

Brian,

what I've done:
* start Matlab 2009a
* change to folder <<here a long path>\JSBSim_SFunction_GUI>
* open JSBSimGUI.fig
* push "load model"
* push "initialize model parameters" THROWS:

vars =

    'init_throttle'
    'init_aileron'
    'init_elevator'
    'init_rudder'
    'init_mixture'
    'init_run_set'
    'init_flaps'
    'init_gear'

??? Error using ==> JSBSimGUI>init_model_Callback at 1774
Error due to multiple causes:
--> Invalid MEX-file
'C:\E_Data\Lehre\FUP\F0902_AirbugSimpleControl\subJSBSimSimulink\JSBSim_SFunction_GUI\JSBSim_SFunction.mexw32':
Diese Anwendung konnte nicht gestartet werden, weil die Anwenungskonfiguration nicht
korrekt ist. Zur Problembehebung sollten Sie die Anwendung neu installieren.

Probably my path's (many functions from the FEX; toolboxes) shadows some of your functions?

My download of JSBSim was 2 days ago. Possible there are changes?

Or should I try to recompile the .mex? I've to get hands on VS-studio first. Which version do you use?

Regard's
Gernot

23 Nov 2009 Brian Mills

Gernot,

I have tried to do some testing to duplicate your problem and it looks like it may be some issue with the mex file (on your system.) It surprised me that a mex file error would occurr when you initialized the model.

Let me recompile the mex file and have you try it. I can email it to you.

04 Dec 2009 Gernot

After testing Brian's files on a different PC without troubles, I think the problem is related to my individual installation.

Brian has done good work!

30 Dec 2009 Andrew Sammur

Dear Brian,

I have tried to use your s-function but seem to be running into the same problem Gernot was referring to. I also tried to recompile the mex file but i am having a few problems with generating the JSBSimLib.lib and also with fdmExec->GetPropertyCatalog().

Do you have a work around for Gernot's problem?

Thanks

Andrew

21 Jan 2010 Gernot

1) The problem seems to vanish as soon as Visual C is installed. This is only my suspicion and not confirmed by Brian - just try it.

2) a simulink-block is missing (before a scope); I just removed it; afterwards, the model should run

Gernot

09 Nov 2010 Daniel Restrepo

Hi Brian,
First thanks for uploading what seems to be a great program. Unfortunatly I ve been having issues using the software. I downloaded the JSBSim S functionGui 0.3 straight from this website and then extracted it. I then downloaded the JSBSim -1.0-rc2.tar.gz from the website given in the READ ME file. I extracted that renamed the JSBSIM-1.0 file to JSBSim and replaced the empty JSBSim folder in the S function folder with it. I then opened the JSBSimGui.fig and tried running it but it is giving me multiple errors in the matlab command window. It says error in gui_mainfcn at 96 and error in JSBSimGUI at 42. It also states that the errors are cuased by Error using ==>JSBSimGUI>init_model_Callback at 1777 Invalid MEX-file 'C:\Documents and Settings\td26704\Desktop\JSBSimGUI_SFunction\JSBSim_SFunction.mexw32' and
Error while obtaining sizes from MEX S-function 'JSBSim_SFunction' in 'jsbsimgui_test/JSBSim S-Function'

Do you have any suggestions on what my problem might be...
Thankyou
Daniel

09 Nov 2010 Daniel Restrepo

Hi im having trouble running the JSBsim s function program from my computer. I type jsbsimgui_start into my command window. I load the test file and initialize the GUI and i get several errors.
1) In JSBSimGUI>load_model_Callback at 115
2) In gui_mainfcn at 96
3) In JSBSimGUI at 42

Does anyone have any suggestions on how to fix this ...thank you

09 Nov 2010 Brian Mills

Hi,

 The project has progressed quite a bit since I last updated this file posting. I recommend you download the latest project snapshot from this link (if I am allowed to do that): http://dl.dropbox.com/u/5284957/JSBSim_MATLAB_release.zip
This download has everything you need to get it working. Sometime soon (time allowing) I plan to post this new version here on the Mathworks site.

26 Mar 2012 Sun Riming

Hi,
 The project(0.3 version) is very cool. But I just can not get the latest one form
this link (if I am allowed to do that): http://dl.dropbox.com/u/5284957/JSBSim_MATLAB_release.zip
 Would you sent me a copy to srm1119@foxmail.com?
Thank you very much.

Please login to add a comment or rating.
Updates
17 Aug 2009

Rev 8-18-09 Fixed problem with deltaT

14 Sep 2009

Verbosity and delta T have been added to the input parameters. Verbosity dictates how much information is output to the command window. Delta T specifies what the JSBSim simulation time step is set to.

18 Nov 2009

Now with a handy graphical user interface and JSBSim multiplier function.

03 Mar 2010

Fixed some bugs. Created new simulink model. New state vector.

Tag Activity for this File
Tag Applied By Date/Time
aerospace Brian Mills 17 Aug 2009 10:59:00
control design Brian Mills 17 Aug 2009 10:59:00
simulation Brian Mills 17 Aug 2009 10:59:00
simulink Brian Mills 17 Aug 2009 10:59:00

Contact us at files@mathworks.com