You can subscribe to this list here.
2009 |
Jan
|
Feb
(6) |
Mar
(16) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(8) |
Jul
(3) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(1) |
2011 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(13) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: b m. <bri...@in...> - 2009-04-07 10:12:29
|
You're right. I will try to get something added soon. Thanks! ----- Original Message ----- From: "Bowman, D. Stuart" <sb...@mi...> Date: Monday, April 6, 2009 10:42 Subject: Re: [Jsbsim-matlab] Mathworks File Submission To: "jsb...@li..." <jsb...@li...> > Works great for me!! Thanks for sharing, Brian. > > You may consider adding a how-to-run text file to your zip file. > I'm pretty familiar with Simulink and it still took me a few > tries before I had the paths set correctly and got the test > model working. > > -stuart > From: b mills [mailto:bri...@in...] > Sent: Wednesday, April 01, 2009 10:25 PM > To: jsb...@li... > Subject: [Jsbsim-matlab] Mathworks File Submission > > Hi folks, > > Just wanted to let everyone know that the SFunction project is > available for download from the Mathworks website- > http://www.mathworks.com/matlabcentral/fileexchange/file_infosSimply type "JSBSim" in the search criteria and it should show up. > > Cheers! > Brian > |
From: Bowman, D. S. <sb...@mi...> - 2009-04-06 14:42:03
|
Works great for me!! Thanks for sharing, Brian. You may consider adding a how-to-run text file to your zip file. I'm pretty familiar with Simulink and it still took me a few tries before I had the paths set correctly and got the test model working. -stuart From: b mills [mailto:bri...@in...] Sent: Wednesday, April 01, 2009 10:25 PM To: jsb...@li... Subject: [Jsbsim-matlab] Mathworks File Submission Hi folks, Just wanted to let everyone know that the SFunction project is available for download from the Mathworks website- http://www.mathworks.com/matlabcentral/fileexchange/file_infos Simply type "JSBSim" in the search criteria and it should show up. Cheers! Brian |
From: b m. <bri...@in...> - 2009-04-02 02:24:54
|
Hi folks, Just wanted to let everyone know that the SFunction project is available for download from the Mathworks website- http://www.mathworks.com/matlabcentral/fileexchange/file_infos Simply type "JSBSim" in the search criteria and it should show up. Cheers! Brian |
From: Jon S. B. <jon...@co...> - 2009-03-23 11:10:54
|
Brian, I committed the changes to CVS last night that include re-initializing the FCS component states. You may want to subscribe to the CVS update list, too. Jon From: b mills [mailto:bri...@in...] Sent: Sunday, March 22, 2009 10:29 PM To: jsb...@li... Subject: [Jsbsim-matlab] Updates Hi all, Just some brief (or not so brief) updates. Thanks to Jon, one issue I have had is now (at least in some cases) fixed. This was an issue with previous aircraft states being used in successive simulation runs. If the AC model used has no FCS integrators (such as in PIDs, and possibly actuators) then the problem seems to be fixed. However, for the time being, if there are FCS system states, then the S-Function will need to be cleared from the Matlab command line in order to have a fresh start after each run. At this point I want to make the project available to anyone that wants it so I'm assuming that getting it on cvs would be logical. I'm also going to look at uploading it to Mathworks.com. Whats next: My intention was to be able to use this S-Function for not only flight-model and FCS system work, but also to construct systems models (apu, electrical etc.) However, after looking at FG and JSBSim source code, it appears that in order for this to happen, it may need to become a FlightGear S-Function. How difficult would it be to incorporate some of the FG classes into the project...kind of a FG_Lite.... A trim and linearization function. Agostino, I think you already have some code for a trim function in your MexJSBSim project? Brian |
From: b m. <bri...@in...> - 2009-03-23 03:29:22
|
Hi all, Just some brief (or not so brief) updates. Thanks to Jon, one issue I have had is now (at least in some cases) fixed. This was an issue with previous aircraft states being used in successive simulation runs. If the AC model used has no FCS integrators (such as in PIDs, and possibly actuators) then the problem seems to be fixed. However, for the time being, if there are FCS system states, then the S-Function will need to be cleared from the Matlab command line in order to have a fresh start after each run. At this point I want to make the project available to anyone that wants it so I'm assuming that getting it on cvs would be logical. I'm also going to look at uploading it to Mathworks.com. Whats next: My intention was to be able to use this S-Function for not only flight-model and FCS system work, but also to construct systems models (apu, electrical etc.) However, after looking at FG and JSBSim source code, it appears that in order for this to happen, it may need to become a FlightGear S-Function. How difficult would it be to incorporate some of the FG classes into the project...kind of a FG_Lite.... A trim and linearization function. Agostino, I think you already have some code for a trim function in your MexJSBSim project? Brian |
From: Jon S. B. <jon...@co...> - 2009-03-19 13:13:33
|
Stuart, I agree. I've only played with SciCos/SciLab a little bit, but there's an opportunity for some "synergy" there. Jon From: Bowman, D. Stuart [mailto:sb...@mi...] Sent: Thursday, March 19, 2009 7:54 AM To: jsb...@li... Subject: Re: [Jsbsim-matlab] S-Function Progress Awesome! Thanks for the update, Brian. It would be really cool to do this work also in ScicosLab since that is an Open Source version of Matlab, but I've looked at it and got confused kinda quickly. Maybe I just need to spend more time with it. But, a JSBSim module in there would be more accessible to the world since only academic & corporate techies have regular access to Simulink. -sb |
From: Bowman, D. S. <sb...@mi...> - 2009-03-19 12:54:21
|
Awesome! Thanks for the update, Brian. It would be really cool to do this work also in ScicosLab since that is an Open Source version of Matlab, but I've looked at it and got confused kinda quickly. Maybe I just need to spend more time with it. But, a JSBSim module in there would be more accessible to the world since only academic & corporate techies have regular access to Simulink. -sb From: b mills [mailto:bri...@in...] Sent: Thursday, March 19, 2009 3:42 AM To: jsb...@li... Subject: [Jsbsim-matlab] S-Function Progress The S-Function is coming along nicely. I'm getting more and more data out of JSBSim and into the Matlab workspace. As there is so much data that can be made available, I think that I may have two versions of the S-Function- one for flight control design and flight-testing and one for systems design. The "aero" version is the current version and has basic flight control inputs and outputs aerodynamic and propulsion data. The "systems" version will be built up to have many more inputs and outputs. The goal here is to create the ability to create systems models using Matlab/Simulink and test them in that environment. For example, an APU could be modeled and tested within Matlab and then compiled using RTW into C-code or some other code. The resulting file could be added into the AC folder and run with FlightGear. However, I'm not sure at this point how to interface these RTW generated modules with Flightgear. That will be something to tackle later... [http://www.flightgear.org/forums/images/smilies/icon_biggrin.gif] As it stands now, the S-Function outputs 19 states, 12 propulsion properties for up to 4 engines, 8 flight control outputs and and 6 calculated outputs. A trim/linearization routine that generates de-coupled state-space matrices is probably what I will start on next. Once the S-Function is sufficiently developed I will be posting it on the Mathworks website to get it into the right hands. Hopefully at some point its use will create some positive benefits for the FlightGear community ie more users, more interest, better FDMs etc. |
From: b m. <bri...@in...> - 2009-03-19 07:42:38
|
The S-Function is coming along nicely. I'm getting more and more data out of JSBSim and into the Matlab workspace. As there is so much data that can be made available, I think that I may have two versions of the S-Function- one for flight control design and flight-testing and one for systems design. The "aero" version is the current version and has basic flight control inputs and outputs aerodynamic and propulsion data. The "systems" version will be built up to have many more inputs and outputs. The goal here is to create the ability to create systems models using Matlab/Simulink and test them in that environment. For example, an APU could be modeled and tested within Matlab and then compiled using RTW into C-code or some other code. The resulting file could be added into the AC folder and run with FlightGear. However, I'm not sure at this point how to interface these RTW generated modules with Flightgear. That will be something to tackle later... As it stands now, the S-Function outputs 19 states, 12 propulsion properties for up to 4 engines, 8 flight control outputs and and 6 calculated outputs. A trim/linearization routine that generates de-coupled state-space matrices is probably what I will start on next. Once the S-Function is sufficiently developed I will be posting it on the Mathworks website to get it into the right hands. Hopefully at some point its use will create some positive benefits for the FlightGear community ie more users, more interest, better FDMs etc. |
From: b m. <bri...@in...> - 2009-03-09 12:17:55
|
Thanks Stuart! Hopefully between the work that Agostino is doing and the work that I'm doing we can get a user-friendly "package" that will allow people to play with this stuff using both Simulink and the Matlab command window. The DAVEML stuff sounds pretty cool- I will have to check it out. Brian ----- Original Message ----- From: "Bowman, D. Stuart" <sb...@mi...> Date: Friday, March 6, 2009 11:28 Subject: Re: [Jsbsim-matlab] JSBSim S-Function To: "jsb...@li..." <jsb...@li...> > I've been thinking of this same idea for a while. Take a flight > control system designed in Matlab and autoconvert it to JSBSim's > XML format. As you say, all of the basic components that exist > in JSBSim for flight control also exist in Simulink. Higher > level logic implemented by a Flight Management System might be > more difficult to boil down to XML, but not necessarily > impossible. I'd love to hear how this work progresses, Brian! > > The work of the DAVEML project (http://daveml.nasa.gov/) has > produced a converter that takes their models from DAVEML to > Simulink. The converter is written in JAVA. This is a least > proof of concept that the mdl files can be read and processed > (though, they do look rather complicated!). > > Also, glad to hear you switched the Simulink model to using > discrete components. That was the right move for matching JSBSim. > > Cool work! > > -Stuart > From: b mills [mailto:bri...@in...] > Sent: Thursday, March 05, 2009 7:37 PM > To: jsb...@li... > Subject: Re: [Jsbsim-matlab] JSBSim S-Function > > So it seems entirely possible to generate jsbsim config files > from simulink subsystems. Most of the components of a > jsbsim fcs already exist in simulink (gains, summers, pids, > lookup tables etc.) Custom masked subsystem blocks could be > designed for actuators and the fcs_function components. > That would pretty useful if you could "build" a fcs_function as > a block component/subsystem in simulink and then have it auto- > generate the corresponding xml. > > Brian > > ----- Original Message ----- > From: Agostino De Marco <ago...@un...> > Date: Friday, March 6, 2009 1:19 > Subject: Re: [Jsbsim-matlab] JSBSim S-Function > To: jsb...@li... > > > Simulink .mdl files are in simple ascii text format. > > MDL stands for Model File Format. > > It contains keywords and parameter-value pairs that describe the > > model.The file describes model components in hierarchical order. > > > > There are quite a few fellows that have worked on parsing .mdl > format.> This is an example using python: > > http://www.fauskes.net/nb/parsing-simulink/ > > Scrolling all the posts in the above page I could get lots of info. > > > > Another example in Java: > > http://conqat.cs.tum.edu/index.php/Simulink_Library > > > > Agostino > > > > > > > > > > > > Quoting b mills <bri...@in...>: > > > > > I've been using modified Aerosim xml parsers to import JSBSim > > config > > > files into Matlab for several years now. The problem > is that > > the > > > parsers have not kept pace with changes in the JSBSim xml format. > > > > > They are in need of an overhaul and I can currently only import > > the > > > old (v1.0?) format JSBSim files. The parsers are written as > > m-files. > > > > > > What would be interesting is to see if a matlab m-file could > > be > > > written that would "parse" a simulink model of say, a flight > > control > > > subsystem, and produce a JSBSim compatible fcs xml file. If > > RTW > > > workshop can turn a simulink model into code, then it seems > > like > > > something could be written as an m-file to do this. I've > > already > > > written a Matlab GUI program that can produce a JSBSim FCS xml > > file, > > > so some progress is already made on this. > > > > > > Brian > > > > > > ----- Original Message ----- > > > From: Agostino De Marco <ago...@un...> > > > Date: Thursday, March 5, 2009 9:02 > > > Subject: Re: [Jsbsim-matlab] JSBSim S-Function > > > To: jsb...@li... > > > > > >> This is interesting actually. Using JSBSim with Matlab may > > >> open new and unespected perspectives. > > >> I think that the data-driven feature of JSBSim is the most > > >> beneficial for Matlab users. An interesting area could be > > >> how to import the JSBSim configuration structure in a > > >> Matlab structure. > > >> > > >> Agostino > > >> > > >> > > >> Quoting "Jon S. Berndt" <jon...@co...>: > > >> > > >> > This sounds very interesting. I guess at some point I'll > > have to > > >> get a demo > > >> > version of Matlab and try this out. > > >> > > > >> > > > >> > > > >> > Jon > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > From: b mills [mailto:bri...@in...] > > >> > Sent: Thursday, March 05, 2009 1:06 AM > > >> > To: jsb...@li... > > >> > Subject: [Jsbsim-matlab] JSBSim S-Function > > >> > > > >> > > > >> > > > >> > Building off the work that Agostino has already completed, > > I now > > >> have a > > >> > JSBSim S-function running in Matlab. It is pretty > rudamentary,> >> but it > > >> > appears to work. I was even able to linearize it > using the > > >> Control and > > >> > Estimations Tool Manager. As it is curently > implemented. the > > >> derivatives of > > >> > the states are calculated by JSBSim and then integrated to > > >> continuous states > > >> > by Matlab. > > >> > > > >> > > > >> > > > >> > I will be working to further develop this over the next few > > days. > > >> > > > >> > > > >> > > > >> > Brian > > >> > > > >> > > > >> > > >> ------------------------------------ > ---------------- > > >> --- > > >> Agostino De Marco, PhD > > >> Assistant Professor > > >> Università degli Studi di Napoli Federico II > > >> / University of Naples Federico II / > > >> Dipartimento di Ingegneria Aerospaziale > > >> / Department of Aerospace Engineering / > > >> via Claudio 21, 80125 Napoli - Italy > > >> Tel.: +39 0817683323 > > >> Fax: +39 0817683622 > > >> Email: ago...@un... > > >> Web 1: www.dpa.unina.it/adag > > >> Web 2: www.dpa.unina.it/demarco > > >> ------------------------------------------------------- > > >> > > >> > > >> ------------------------------------------------------------ > -- > > --- > > >> ------------- > > >> Open Source Business Conference (OSBC), March 24-25, 2009, San > > >> Francisco, CA > > >> -OSBC tackles the biggest issue in open source: Open Sourcing > > >> the Enterprise > > >> -Strategies to boost innovation and cut costs with open source > > >> participation-Receive a $600 discount off the registration fee > > >> with the source code: SFAD > > >> http://p.sf.net/sfu/XcvMzF8H > > >> _______________________________________________ > > >> Jsbsim-matlab mailing list > > >> Jsb...@li... > > >> https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > > >> > > > > > > > --------------------------------------------- > ------- > > --- > > Agostino De Marco, PhD > > Assistant Professor > > Università degli Studi di Napoli Federico II > > / University of Naples Federico II / > > Dipartimento di Ingegneria Aerospaziale > > / Department of Aerospace Engineering / > > via Claudio 21, 80125 Napoli - Italy > > Tel.: +39 0817683323 > > Fax: +39 0817683622 > > Email: ago...@un... > > Web 1: www.dpa.unina.it/adag > > Web 2: www.dpa.unina.it/demarco > > ------------------------------------------------------- > > > > > > --------------------------------------------------------------- > -- > > ------------- > > Open Source Business Conference (OSBC), March 24-25, 2009, San > > Francisco, CA > > -OSBC tackles the biggest issue in open source: Open Sourcing > > the Enterprise > > -Strategies to boost innovation and cut costs with open source > > participation-Receive a $600 discount off the registration fee > > with the source code: SFAD > > http://p.sf.net/sfu/XcvMzF8H > > _______________________________________________ > > Jsbsim-matlab mailing list > > Jsb...@li... > > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > > > |
From: Bowman, D. S. <sb...@mi...> - 2009-03-06 16:31:22
|
Jon, I'm not sure a demo version of Matlab would allow you to play with this stuff. I could be wrong, though. You would have to get Matlab and also their Simulink product to examine what Brian is doing. -sb From: Jon S. Berndt [mailto:jon...@co...] Sent: Thursday, March 05, 2009 7:59 AM To: jsb...@li... Subject: Re: [Jsbsim-matlab] JSBSim S-Function This sounds very interesting. I guess at some point I'll have to get a demo version of Matlab and try this out. Jon From: b mills [mailto:bri...@in...] Sent: Thursday, March 05, 2009 1:06 AM To: jsb...@li... Subject: [Jsbsim-matlab] JSBSim S-Function Building off the work that Agostino has already completed, I now have a JSBSim S-function running in Matlab. It is pretty rudamentary, but it appears to work. I was even able to linearize it using the Control and Estimations Tool Manager. As it is curently implemented. the derivatives of the states are calculated by JSBSim and then integrated to continuous states by Matlab. I will be working to further develop this over the next few days. Brian |
From: Bowman, D. S. <sb...@mi...> - 2009-03-06 16:28:14
|
I've been thinking of this same idea for a while. Take a flight control system designed in Matlab and autoconvert it to JSBSim's XML format. As you say, all of the basic components that exist in JSBSim for flight control also exist in Simulink. Higher level logic implemented by a Flight Management System might be more difficult to boil down to XML, but not necessarily impossible. I'd love to hear how this work progresses, Brian! The work of the DAVEML project (http://daveml.nasa.gov/) has produced a converter that takes their models from DAVEML to Simulink. The converter is written in JAVA. This is a least proof of concept that the mdl files can be read and processed (though, they do look rather complicated!). Also, glad to hear you switched the Simulink model to using discrete components. That was the right move for matching JSBSim. Cool work! -Stuart From: b mills [mailto:bri...@in...] Sent: Thursday, March 05, 2009 7:37 PM To: jsb...@li... Subject: Re: [Jsbsim-matlab] JSBSim S-Function So it seems entirely possible to generate jsbsim config files from simulink subsystems. Most of the components of a jsbsim fcs already exist in simulink (gains, summers, pids, lookup tables etc.) Custom masked subsystem blocks could be designed for actuators and the fcs_function components. That would pretty useful if you could "build" a fcs_function as a block component/subsystem in simulink and then have it auto-generate the corresponding xml. Brian ----- Original Message ----- From: Agostino De Marco <ago...@un...> Date: Friday, March 6, 2009 1:19 Subject: Re: [Jsbsim-matlab] JSBSim S-Function To: jsb...@li... > Simulink .mdl files are in simple ascii text format. > MDL stands for Model File Format. > It contains keywords and parameter-value pairs that describe the > model.The file describes model components in hierarchical order. > > There are quite a few fellows that have worked on parsing .mdl format. > This is an example using python: > http://www.fauskes.net/nb/parsing-simulink/ > Scrolling all the posts in the above page I could get lots of info. > > Another example in Java: > http://conqat.cs.tum.edu/index.php/Simulink_Library > > Agostino > > > > > > Quoting b mills <bri...@in...>: > > > I've been using modified Aerosim xml parsers to import JSBSim > config > > files into Matlab for several years now. The problem is that > the > > parsers have not kept pace with changes in the JSBSim xml format. > > > They are in need of an overhaul and I can currently only import > the > > old (v1.0?) format JSBSim files. The parsers are written as > m-files. > > > > What would be interesting is to see if a matlab m-file could > be > > written that would "parse" a simulink model of say, a flight > control > > subsystem, and produce a JSBSim compatible fcs xml file. If > RTW > > workshop can turn a simulink model into code, then it seems > like > > something could be written as an m-file to do this. I've > already > > written a Matlab GUI program that can produce a JSBSim FCS xml > file, > > so some progress is already made on this. > > > > Brian > > > > ----- Original Message ----- > > From: Agostino De Marco <ago...@un...> > > Date: Thursday, March 5, 2009 9:02 > > Subject: Re: [Jsbsim-matlab] JSBSim S-Function > > To: jsb...@li... > > > >> This is interesting actually. Using JSBSim with Matlab may > >> open new and unespected perspectives. > >> I think that the data-driven feature of JSBSim is the most > >> beneficial for Matlab users. An interesting area could be > >> how to import the JSBSim configuration structure in a > >> Matlab structure. > >> > >> Agostino > >> > >> > >> Quoting "Jon S. Berndt" <jon...@co...>: > >> > >> > This sounds very interesting. I guess at some point I'll > have to > >> get a demo > >> > version of Matlab and try this out. > >> > > >> > > >> > > >> > Jon > >> > > >> > > >> > > >> > > >> > > >> > From: b mills [mailto:bri...@in...] > >> > Sent: Thursday, March 05, 2009 1:06 AM > >> > To: jsb...@li... > >> > Subject: [Jsbsim-matlab] JSBSim S-Function > >> > > >> > > >> > > >> > Building off the work that Agostino has already completed, > I now > >> have a > >> > JSBSim S-function running in Matlab. It is pretty rudamentary, > >> but it > >> > appears to work. I was even able to linearize it using the > >> Control and > >> > Estimations Tool Manager. As it is curently implemented. the > >> derivatives of > >> > the states are calculated by JSBSim and then integrated to > >> continuous states > >> > by Matlab. > >> > > >> > > >> > > >> > I will be working to further develop this over the next few > days. > >> > > >> > > >> > > >> > Brian > >> > > >> > > >> > >> ---------------------------------------------------- > >> --- > >> Agostino De Marco, PhD > >> Assistant Professor > >> Università degli Studi di Napoli Federico II > >> / University of Naples Federico II / > >> Dipartimento di Ingegneria Aerospaziale > >> / Department of Aerospace Engineering / > >> via Claudio 21, 80125 Napoli - Italy > >> Tel.: +39 0817683323 > >> Fax: +39 0817683622 > >> Email: ago...@un... > >> Web 1: www.dpa.unina.it/adag > >> Web 2: www.dpa.unina.it/demarco > >> ------------------------------------------------------- > >> > >> > >> -------------------------------------------------------------- > --- > >> ------------- > >> Open Source Business Conference (OSBC), March 24-25, 2009, San > >> Francisco, CA > >> -OSBC tackles the biggest issue in open source: Open Sourcing > >> the Enterprise > >> -Strategies to boost innovation and cut costs with open source > >> participation-Receive a $600 discount off the registration fee > >> with the source code: SFAD > >> http://p.sf.net/sfu/XcvMzF8H > >> _______________________________________________ > >> Jsbsim-matlab mailing list > >> Jsb...@li... > >> https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > >> > > > > ---------------------------------------------------- > --- > Agostino De Marco, PhD > Assistant Professor > Università degli Studi di Napoli Federico II > / University of Naples Federico II / > Dipartimento di Ingegneria Aerospaziale > / Department of Aerospace Engineering / > via Claudio 21, 80125 Napoli - Italy > Tel.: +39 0817683323 > Fax: +39 0817683622 > Email: ago...@un... > Web 1: www.dpa.unina.it/adag > Web 2: www.dpa.unina.it/demarco > ------------------------------------------------------- > > > ----------------------------------------------------------------- > ------------- > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing > the Enterprise > -Strategies to boost innovation and cut costs with open source > participation-Receive a $600 discount off the registration fee > with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Jsbsim-matlab mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > |
From: b m. <bri...@in...> - 2009-03-06 10:33:43
|
Have now tested a second s-function that uses discrete states calculated by JSBSim with very good results. The simulink model's state outputs exactly match the states calculated by JSBSim. This seems to work a whole lot better than my previous model that used continuous states that were calculated within the s-function. Also was able to linearize, though this still needs to be looked at closer. My only real problem right now is getting the set-running to set the engine running- it does not seem to be working. This should be ready for sharing very soon. The code needs some housekeeping and some error checking stuff added before its ready. Brian |
From: b m. <bri...@in...> - 2009-03-06 00:37:01
|
So it seems entirely possible to generate jsbsim config files from simulink subsystems. Most of the components of a jsbsim fcs already exist in simulink (gains, summers, pids, lookup tables etc.) Custom masked subsystem blocks could be designed for actuators and the fcs_function components. That would pretty useful if you could "build" a fcs_function as a block component/subsystem in simulink and then have it auto-generate the corresponding xml. Brian ----- Original Message ----- From: Agostino De Marco <ago...@un...> Date: Friday, March 6, 2009 1:19 Subject: Re: [Jsbsim-matlab] JSBSim S-Function To: jsb...@li... > Simulink .mdl files are in simple ascii text format. > MDL stands for Model File Format. > It contains keywords and parameter-value pairs that describe the > model.The file describes model components in hierarchical order. > > There are quite a few fellows that have worked on parsing .mdl format. > This is an example using python: > http://www.fauskes.net/nb/parsing-simulink/ > Scrolling all the posts in the above page I could get lots of info. > > Another example in Java: > http://conqat.cs.tum.edu/index.php/Simulink_Library > > Agostino > > > > > > Quoting b mills <bri...@in...>: > > > I've been using modified Aerosim xml parsers to import JSBSim > config > > files into Matlab for several years now. The problem is that > the > > parsers have not kept pace with changes in the JSBSim xml format. > > > They are in need of an overhaul and I can currently only import > the > > old (v1.0?) format JSBSim files. The parsers are written as > m-files. > > > > What would be interesting is to see if a matlab m-file could > be > > written that would "parse" a simulink model of say, a flight > control > > subsystem, and produce a JSBSim compatible fcs xml file. If > RTW > > workshop can turn a simulink model into code, then it seems > like > > something could be written as an m-file to do this. I've > already > > written a Matlab GUI program that can produce a JSBSim FCS xml > file, > > so some progress is already made on this. > > > > Brian > > > > ----- Original Message ----- > > From: Agostino De Marco <ago...@un...> > > Date: Thursday, March 5, 2009 9:02 > > Subject: Re: [Jsbsim-matlab] JSBSim S-Function > > To: jsb...@li... > > > >> This is interesting actually. Using JSBSim with Matlab may > >> open new and unespected perspectives. > >> I think that the data-driven feature of JSBSim is the most > >> beneficial for Matlab users. An interesting area could be > >> how to import the JSBSim configuration structure in a > >> Matlab structure. > >> > >> Agostino > >> > >> > >> Quoting "Jon S. Berndt" <jon...@co...>: > >> > >> > This sounds very interesting. I guess at some point I'll > have to > >> get a demo > >> > version of Matlab and try this out. > >> > > >> > > >> > > >> > Jon > >> > > >> > > >> > > >> > > >> > > >> > From: b mills [mailto:bri...@in...] > >> > Sent: Thursday, March 05, 2009 1:06 AM > >> > To: jsb...@li... > >> > Subject: [Jsbsim-matlab] JSBSim S-Function > >> > > >> > > >> > > >> > Building off the work that Agostino has already completed, > I now > >> have a > >> > JSBSim S-function running in Matlab. It is pretty rudamentary, > >> but it > >> > appears to work. I was even able to linearize it using the > >> Control and > >> > Estimations Tool Manager. As it is curently implemented. the > >> derivatives of > >> > the states are calculated by JSBSim and then integrated to > >> continuous states > >> > by Matlab. > >> > > >> > > >> > > >> > I will be working to further develop this over the next few > days. > >> > > >> > > >> > > >> > Brian > >> > > >> > > >> > >> ---------------------------------------------------- > >> --- > >> Agostino De Marco, PhD > >> Assistant Professor > >> Università degli Studi di Napoli Federico II > >> / University of Naples Federico II / > >> Dipartimento di Ingegneria Aerospaziale > >> / Department of Aerospace Engineering / > >> via Claudio 21, 80125 Napoli - Italy > >> Tel.: +39 0817683323 > >> Fax: +39 0817683622 > >> Email: ago...@un... > >> Web 1: www.dpa.unina.it/adag > >> Web 2: www.dpa.unina.it/demarco > >> ------------------------------------------------------- > >> > >> > >> -------------------------------------------------------------- > --- > >> ------------- > >> Open Source Business Conference (OSBC), March 24-25, 2009, San > >> Francisco, CA > >> -OSBC tackles the biggest issue in open source: Open Sourcing > >> the Enterprise > >> -Strategies to boost innovation and cut costs with open source > >> participation-Receive a $600 discount off the registration fee > >> with the source code: SFAD > >> http://p.sf.net/sfu/XcvMzF8H > >> _______________________________________________ > >> Jsbsim-matlab mailing list > >> Jsb...@li... > >> https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > >> > > > > ---------------------------------------------------- > --- > Agostino De Marco, PhD > Assistant Professor > Università degli Studi di Napoli Federico II > / University of Naples Federico II / > Dipartimento di Ingegneria Aerospaziale > / Department of Aerospace Engineering / > via Claudio 21, 80125 Napoli - Italy > Tel.: +39 0817683323 > Fax: +39 0817683622 > Email: ago...@un... > Web 1: www.dpa.unina.it/adag > Web 2: www.dpa.unina.it/demarco > ------------------------------------------------------- > > > ----------------------------------------------------------------- > ------------- > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing > the Enterprise > -Strategies to boost innovation and cut costs with open source > participation-Receive a $600 discount off the registration fee > with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Jsbsim-matlab mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > |
From: Agostino De M. <ago...@un...> - 2009-03-05 16:19:28
|
Simulink .mdl files are in simple ascii text format. MDL stands for Model File Format. It contains keywords and parameter-value pairs that describe the model. The file describes model components in hierarchical order. There are quite a few fellows that have worked on parsing .mdl format. This is an example using python: http://www.fauskes.net/nb/parsing-simulink/ Scrolling all the posts in the above page I could get lots of info. Another example in Java: http://conqat.cs.tum.edu/index.php/Simulink_Library Agostino Quoting b mills <bri...@in...>: > I've been using modified Aerosim xml parsers to import JSBSim config > files into Matlab for several years now. The problem is that the > parsers have not kept pace with changes in the JSBSim xml format. > They are in need of an overhaul and I can currently only import the > old (v1.0?) format JSBSim files. The parsers are written as m-files. > > What would be interesting is to see if a matlab m-file could be > written that would "parse" a simulink model of say, a flight control > subsystem, and produce a JSBSim compatible fcs xml file. If RTW > workshop can turn a simulink model into code, then it seems like > something could be written as an m-file to do this. I've already > written a Matlab GUI program that can produce a JSBSim FCS xml file, > so some progress is already made on this. > > Brian > > ----- Original Message ----- > From: Agostino De Marco <ago...@un...> > Date: Thursday, March 5, 2009 9:02 > Subject: Re: [Jsbsim-matlab] JSBSim S-Function > To: jsb...@li... > >> This is interesting actually. Using JSBSim with Matlab may >> open new and unespected perspectives. >> I think that the data-driven feature of JSBSim is the most >> beneficial for Matlab users. An interesting area could be >> how to import the JSBSim configuration structure in a >> Matlab structure. >> >> Agostino >> >> >> Quoting "Jon S. Berndt" <jon...@co...>: >> >> > This sounds very interesting. I guess at some point I'll have to >> get a demo >> > version of Matlab and try this out. >> > >> > >> > >> > Jon >> > >> > >> > >> > >> > >> > From: b mills [mailto:bri...@in...] >> > Sent: Thursday, March 05, 2009 1:06 AM >> > To: jsb...@li... >> > Subject: [Jsbsim-matlab] JSBSim S-Function >> > >> > >> > >> > Building off the work that Agostino has already completed, I now >> have a >> > JSBSim S-function running in Matlab. It is pretty rudamentary, >> but it >> > appears to work. I was even able to linearize it using the >> Control and >> > Estimations Tool Manager. As it is curently implemented. the >> derivatives of >> > the states are calculated by JSBSim and then integrated to >> continuous states >> > by Matlab. >> > >> > >> > >> > I will be working to further develop this over the next few days. >> > >> > >> > >> > Brian >> > >> > >> >> ---------------------------------------------------- >> --- >> Agostino De Marco, PhD >> Assistant Professor >> Università degli Studi di Napoli Federico II >> / University of Naples Federico II / >> Dipartimento di Ingegneria Aerospaziale >> / Department of Aerospace Engineering / >> via Claudio 21, 80125 Napoli - Italy >> Tel.: +39 0817683323 >> Fax: +39 0817683622 >> Email: ago...@un... >> Web 1: www.dpa.unina.it/adag >> Web 2: www.dpa.unina.it/demarco >> ------------------------------------------------------- >> >> >> ----------------------------------------------------------------- >> ------------- >> Open Source Business Conference (OSBC), March 24-25, 2009, San >> Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing >> the Enterprise >> -Strategies to boost innovation and cut costs with open source >> participation-Receive a $600 discount off the registration fee >> with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> Jsbsim-matlab mailing list >> Jsb...@li... >> https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab >> > ------------------------------------------------------- Agostino De Marco, PhD Assistant Professor Università degli Studi di Napoli Federico II / University of Naples Federico II / Dipartimento di Ingegneria Aerospaziale / Department of Aerospace Engineering / via Claudio 21, 80125 Napoli - Italy Tel.: +39 0817683323 Fax: +39 0817683622 Email: ago...@un... Web 1: www.dpa.unina.it/adag Web 2: www.dpa.unina.it/demarco ------------------------------------------------------- |
From: b m. <bri...@in...> - 2009-03-05 14:25:18
|
I've been using modified Aerosim xml parsers to import JSBSim config files into Matlab for several years now. The problem is that the parsers have not kept pace with changes in the JSBSim xml format. They are in need of an overhaul and I can currently only import the old (v1.0?) format JSBSim files. The parsers are written as m-files. What would be interesting is to see if a matlab m-file could be written that would "parse" a simulink model of say, a flight control subsystem, and produce a JSBSim compatible fcs xml file. If RTW workshop can turn a simulink model into code, then it seems like something could be written as an m-file to do this. I've already written a Matlab GUI program that can produce a JSBSim FCS xml file, so some progress is already made on this. Brian ----- Original Message ----- From: Agostino De Marco <ago...@un...> Date: Thursday, March 5, 2009 9:02 Subject: Re: [Jsbsim-matlab] JSBSim S-Function To: jsb...@li... > This is interesting actually. Using JSBSim with Matlab may > open new and unespected perspectives. > I think that the data-driven feature of JSBSim is the most > beneficial for Matlab users. An interesting area could be > how to import the JSBSim configuration structure in a > Matlab structure. > > Agostino > > > Quoting "Jon S. Berndt" <jon...@co...>: > > > This sounds very interesting. I guess at some point I'll have to > get a demo > > version of Matlab and try this out. > > > > > > > > Jon > > > > > > > > > > > > From: b mills [mailto:bri...@in...] > > Sent: Thursday, March 05, 2009 1:06 AM > > To: jsb...@li... > > Subject: [Jsbsim-matlab] JSBSim S-Function > > > > > > > > Building off the work that Agostino has already completed, I now > have a > > JSBSim S-function running in Matlab. It is pretty rudamentary, > but it > > appears to work. I was even able to linearize it using the > Control and > > Estimations Tool Manager. As it is curently implemented. the > derivatives of > > the states are calculated by JSBSim and then integrated to > continuous states > > by Matlab. > > > > > > > > I will be working to further develop this over the next few days. > > > > > > > > Brian > > > > > > ---------------------------------------------------- > --- > Agostino De Marco, PhD > Assistant Professor > Università degli Studi di Napoli Federico II > / University of Naples Federico II / > Dipartimento di Ingegneria Aerospaziale > / Department of Aerospace Engineering / > via Claudio 21, 80125 Napoli - Italy > Tel.: +39 0817683323 > Fax: +39 0817683622 > Email: ago...@un... > Web 1: www.dpa.unina.it/adag > Web 2: www.dpa.unina.it/demarco > ------------------------------------------------------- > > > ----------------------------------------------------------------- > ------------- > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing > the Enterprise > -Strategies to boost innovation and cut costs with open source > participation-Receive a $600 discount off the registration fee > with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Jsbsim-matlab mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > |
From: Agostino De M. <ago...@un...> - 2009-03-05 14:02:35
|
This is interesting actually. Using JSBSim with Matlab may open new and unespected perspectives. I think that the data-driven feature of JSBSim is the most beneficial for Matlab users. An interesting area could be how to import the JSBSim configuration structure in a Matlab structure. Agostino Quoting "Jon S. Berndt" <jon...@co...>: > This sounds very interesting. I guess at some point I'll have to get a demo > version of Matlab and try this out. > > > > Jon > > > > > > From: b mills [mailto:bri...@in...] > Sent: Thursday, March 05, 2009 1:06 AM > To: jsb...@li... > Subject: [Jsbsim-matlab] JSBSim S-Function > > > > Building off the work that Agostino has already completed, I now have a > JSBSim S-function running in Matlab. It is pretty rudamentary, but it > appears to work. I was even able to linearize it using the Control and > Estimations Tool Manager. As it is curently implemented. the derivatives of > the states are calculated by JSBSim and then integrated to continuous states > by Matlab. > > > > I will be working to further develop this over the next few days. > > > > Brian > > ------------------------------------------------------- Agostino De Marco, PhD Assistant Professor Università degli Studi di Napoli Federico II / University of Naples Federico II / Dipartimento di Ingegneria Aerospaziale / Department of Aerospace Engineering / via Claudio 21, 80125 Napoli - Italy Tel.: +39 0817683323 Fax: +39 0817683622 Email: ago...@un... Web 1: www.dpa.unina.it/adag Web 2: www.dpa.unina.it/demarco ------------------------------------------------------- |
From: Jon S. B. <jon...@co...> - 2009-03-05 12:58:55
|
This sounds very interesting. I guess at some point I'll have to get a demo version of Matlab and try this out. Jon From: b mills [mailto:bri...@in...] Sent: Thursday, March 05, 2009 1:06 AM To: jsb...@li... Subject: [Jsbsim-matlab] JSBSim S-Function Building off the work that Agostino has already completed, I now have a JSBSim S-function running in Matlab. It is pretty rudamentary, but it appears to work. I was even able to linearize it using the Control and Estimations Tool Manager. As it is curently implemented. the derivatives of the states are calculated by JSBSim and then integrated to continuous states by Matlab. I will be working to further develop this over the next few days. Brian |
From: b m. <bri...@in...> - 2009-03-05 09:49:01
|
OK, made some revisions to the S-Function. Can now enter initialization params via the function's block parameters dialog box like any other S-function. 3 parameters are needed: "aircraft_name", [vector of 12 state variables], [vector of 6 control variables]. Still a few more things to do.... Brian |
From: b m. <bri...@in...> - 2009-03-05 07:05:47
|
Building off the work that Agostino has already completed, I now have a JSBSim S-function running in Matlab. It is pretty rudamentary, but it appears to work. I was even able to linearize it using the Control and Estimations Tool Manager. As it is curently implemented. the derivatives of the states are calculated by JSBSim and then integrated to continuous states by Matlab. I will be working to further develop this over the next few days. Brian |
From: ZY w. <xia...@ya...> - 2009-02-13 23:34:50
|
Hi, I use the simulink model got from aerosim and changed data that got from Jsbsim aircraft folder. C130 can easy to control ,but F16 has poor control response and easy to crash. I use the same simulink model, of course change the aerodynamci block according the xml data file. Is there any special items I shall notice in F16 model compare with C130? BTW,F16 has more complicate aerodynamic data and the body axes is different with C130. Thank you. ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ |
From: Bowman, D. S. <sb...@mi...> - 2009-02-04 15:28:59
|
I completely forgot about your work along these lines. Thanks, Agostino! -sb -----Original Message----- From: Agostino De Marco [mailto:ago...@un...] Sent: Wednesday, February 04, 2009 9:14 AM To: jsb...@li... Subject: Re: [Jsbsim-matlab] Flight Control code as I said in another thread, look here: http://www.dias.unina.it/demarco/Work/JSBSim_Matlab/JSBSim_Matlab.zip or you can browse the sources here: http://www.dias.unina.it/demarco/Work/JSBSim_Matlab/ Agostino Quoting "Bowman, D. Stuart" <sb...@mi...>: > Jon, the only way that I know of for Matlab to interact with C/C++ > code is for that code to be compiled into a DLL (called a mex-file > in Mathworks parlance) that gets called from Matlab. Basically, The > Mathworks provides a header file that prototypes the interface and > then the user writes the actual code to implement the interface. > Then, one compiles it (gcc, vc, or Mathwork's lcc) and calls it from > Matlab. For smaller codes, the interface is simple and easy to > create. For JSBSim, I think it would be more complicated. (I've > wanted to do it with JSBSim, but nothing is pushing it for me right > now which means it just won't get done. :) ) The other option, of > course, is one that you wrote about in an old issue of "Back of the > Envelope" in which one would use network interfaces to accomplish > the data transfer. > >> From the perspective of compiling JSBSim into a Matlab-capable DLL, >> I think that making the Run method virtual would help. But, I >> should point out that I'm no expert in this area! > > -sb > -----Original Message----- > From: Jon S. Berndt [mailto:jon...@co...] > Sent: Tuesday, February 03, 2009 12:00 PM > To: jsb...@li... > Subject: [Jsbsim-matlab] Flight Control code > > One thing I've wondered is if it would be helpful to make the FGFCS (flight > control manager) code "virtual" so that perhaps a different Run() method > could be built that would somehow "call" Matlab/Simulink, so that control > code generated there could drive JSBSim instead of the normal FGFCS::Run() > method. It wouldn't even have to me Matlab that was "called" (which I don't > know if that's even possible), but instead perhaps some autogenerated code > could be in the derived ::Run() method. > > Just a thought. > > Jon > > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the > power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Jsbsim-matlab mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the > power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Jsbsim-matlab mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > ------------------------------------------------------- Agostino De Marco, PhD Assistant Professor Università degli Studi di Napoli Federico II / University of Naples Federico II / Dipartimento di Ingegneria Aerospaziale / Department of Aerospace Engineering / via Claudio 21, 80125 Napoli - Italy Tel.: +39 0817683323 Fax: +39 0817683622 Email: ago...@un... Web 1: www.dpa.unina.it/adag Web 2: www.dpa.unina.it/demarco ------------------------------------------------------- ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Jsbsim-matlab mailing list Jsb...@li... https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab |
From: Agostino De M. <ago...@un...> - 2009-02-04 14:14:25
|
as I said in another thread, look here: http://www.dias.unina.it/demarco/Work/JSBSim_Matlab/JSBSim_Matlab.zip or you can browse the sources here: http://www.dias.unina.it/demarco/Work/JSBSim_Matlab/ Agostino Quoting "Bowman, D. Stuart" <sb...@mi...>: > Jon, the only way that I know of for Matlab to interact with C/C++ > code is for that code to be compiled into a DLL (called a mex-file > in Mathworks parlance) that gets called from Matlab. Basically, The > Mathworks provides a header file that prototypes the interface and > then the user writes the actual code to implement the interface. > Then, one compiles it (gcc, vc, or Mathwork's lcc) and calls it from > Matlab. For smaller codes, the interface is simple and easy to > create. For JSBSim, I think it would be more complicated. (I've > wanted to do it with JSBSim, but nothing is pushing it for me right > now which means it just won't get done. :) ) The other option, of > course, is one that you wrote about in an old issue of "Back of the > Envelope" in which one would use network interfaces to accomplish > the data transfer. > >> From the perspective of compiling JSBSim into a Matlab-capable DLL, >> I think that making the Run method virtual would help. But, I >> should point out that I'm no expert in this area! > > -sb > -----Original Message----- > From: Jon S. Berndt [mailto:jon...@co...] > Sent: Tuesday, February 03, 2009 12:00 PM > To: jsb...@li... > Subject: [Jsbsim-matlab] Flight Control code > > One thing I've wondered is if it would be helpful to make the FGFCS (flight > control manager) code "virtual" so that perhaps a different Run() method > could be built that would somehow "call" Matlab/Simulink, so that control > code generated there could drive JSBSim instead of the normal FGFCS::Run() > method. It wouldn't even have to me Matlab that was "called" (which I don't > know if that's even possible), but instead perhaps some autogenerated code > could be in the derived ::Run() method. > > Just a thought. > > Jon > > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the > power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Jsbsim-matlab mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the > power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Jsbsim-matlab mailing list > Jsb...@li... > https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab > ------------------------------------------------------- Agostino De Marco, PhD Assistant Professor Università degli Studi di Napoli Federico II / University of Naples Federico II / Dipartimento di Ingegneria Aerospaziale / Department of Aerospace Engineering / via Claudio 21, 80125 Napoli - Italy Tel.: +39 0817683323 Fax: +39 0817683622 Email: ago...@un... Web 1: www.dpa.unina.it/adag Web 2: www.dpa.unina.it/demarco ------------------------------------------------------- |
From: Bowman, D. S. <sb...@mi...> - 2009-02-04 13:34:27
|
Jon, the only way that I know of for Matlab to interact with C/C++ code is for that code to be compiled into a DLL (called a mex-file in Mathworks parlance) that gets called from Matlab. Basically, The Mathworks provides a header file that prototypes the interface and then the user writes the actual code to implement the interface. Then, one compiles it (gcc, vc, or Mathwork's lcc) and calls it from Matlab. For smaller codes, the interface is simple and easy to create. For JSBSim, I think it would be more complicated. (I've wanted to do it with JSBSim, but nothing is pushing it for me right now which means it just won't get done. :) ) The other option, of course, is one that you wrote about in an old issue of "Back of the Envelope" in which one would use network interfaces to accomplish the data transfer. >From the perspective of compiling JSBSim into a Matlab-capable DLL, I think that making the Run method virtual would help. But, I should point out that I'm no expert in this area! -sb -----Original Message----- From: Jon S. Berndt [mailto:jon...@co...] Sent: Tuesday, February 03, 2009 12:00 PM To: jsb...@li... Subject: [Jsbsim-matlab] Flight Control code One thing I've wondered is if it would be helpful to make the FGFCS (flight control manager) code "virtual" so that perhaps a different Run() method could be built that would somehow "call" Matlab/Simulink, so that control code generated there could drive JSBSim instead of the normal FGFCS::Run() method. It wouldn't even have to me Matlab that was "called" (which I don't know if that's even possible), but instead perhaps some autogenerated code could be in the derived ::Run() method. Just a thought. Jon ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Jsbsim-matlab mailing list Jsb...@li... https://lists.sourceforge.net/lists/listinfo/jsbsim-matlab |
From: Jon S. B. <jon...@co...> - 2009-02-03 16:59:54
|
One thing I've wondered is if it would be helpful to make the FGFCS (flight control manager) code "virtual" so that perhaps a different Run() method could be built that would somehow "call" Matlab/Simulink, so that control code generated there could drive JSBSim instead of the normal FGFCS::Run() method. It wouldn't even have to me Matlab that was "called" (which I don't know if that's even possible), but instead perhaps some autogenerated code could be in the derived ::Run() method. Just a thought. Jon |
From: Agostino De M. <ago...@un...> - 2009-02-03 12:32:24
|
Hi all, I've been working at the Matlab mex-function "MexJSBSim". You'll find all the archived stuff here: http://www.dias.unina.it/demarco/Work/JSBSim_Matlab/JSBSim_Matlab.zip or you can browse the sources here: http://www.dias.unina.it/demarco/Work/JSBSim_Matlab/ I was able to compile and debug the mex-function with Visual Studio 2008. To compile, just use the solution file MexJSBSim.sln, adjusting the include and lib directories as necessary. For example, I use Matlab 2008b installed in N:\MATLAB\R2008b\ so, in the MexJSBSim project I need to set the dirs: N:\MATLAB\R2008b\extern\include\ and N:\MATLAB\R2008b\extern\lib\win32\microsoft\ to link the Matlab libs: libmx.lib libmex.lib libmat.lib The mex-function is also linked to the static library "JSBSimLib.lib", which I made out of the latest JSBSim distribution (this project is also included in the solution). The mex-function MexJSBSim is an attempt to establish a sort of standardized way of using a JSBSim::FGFDMExec object from Matlab command line. Every suggestion or criticism is welcomed. ----------------------------------------------------------------- This is an example of output of the command: MexJSBSim('help') ----------------------------------------------------------------- >> MexJSBSim('help') function usage: result = MexJSBSim( string_directive [, string, value] ) Examples: res = MexJSBSim('help'); Prints this help text. returns 1 (always) res = MexJSBSim('open','c172r'); returns 1 if success, 0 otherwise res = MexJSBSim('get','fcs/elevator-cmd-norm') returns the value of the property, or -9999 if property not found res = MexJSBSim('set','fcs/elevator-cmd-norm',-0.5) returns 1 if success, 0 otherwise res = MexJSBSim('set','elevator-cmd-norm',-0.5) res = MexJSBSim('set','u-fps',80.5) same as above, but it scans a set of predefined, and commonly used variable names: 'u-fps', 'v-fps', 'w-fps' 'p-rad_sec', 'q-rad_sec', 'r-rad_sec' 'h-sl-ft' 'long-gc-deg' 'lat-gc-deg' 'phi-rad', 'theta-rad', 'psi-rad' 'elevator-cmd-norm' 'aileron-cmd-norm' 'rudder-cmd-norm' res = MexJSBSim('init',ic) initializes the JSBSim::FGFDMExec by means of the matlab structure ic. The structure ic must have the two fields: name and value. The Matlab user is forced to build such a structure first, then to pass it to the mex-file. Example: >> ic(1).name = 'u-fps'; ic(1).value = 80; >> ic(2).name = 'v-fps'; ic(2).value = 0; >> ic(3).name = 'w-fps'; ic(3).value = 0; >> ic(4).name = 'p-rad_sec'; ic(4).value = 0; >> MexJSBSim('init', ic); >> ----------------------------------------------------------------- This is the output of the Matlab script: test_1.m ----------------------------------------------------------------- Setting up JSBSim with standard 'aircraft', 'engine', and 'system' paths. Loading aircraft 'c172r' ... Model c172r loaded. ans = 1 Property name: 'u-fps'; Property value: 80.000000 Easy-set: true flight speed (ft/s) = 80.000000 Property name: 'v-fps'; Property value: 20.000000 Easy-set: true flight speed (ft/s) = 82.462113 Property name: 'w-fps'; Property value: 10.000000 Easy-set: true flight speed (ft/s) = 83.066239 Property name: 'p-rad_sec'; Property value: 0.100000 Easy-set: roll rate (rad/s) = 0.100000 Property name: 'q-rad_sec'; Property value: 0.200000 Easy-set: pitch rate (rad/s) = 0.200000 Property name: 'r-rad_sec'; Property value: 0.300000 Easy-set: yaw rate (rad/s) = 0.300000 Property name: 'h-sl-ft'; Property value: 3000.000000 Easy-set: altitude over sea level (mt) = 914.400000 Property name: 'long-gc-deg'; Property value: 122.000000 Easy-set: geocentric longitude (deg) = 121.999983 Property name: 'lat-gc-deg'; Property value: 47.000000 Easy-set: geocentric latitude (deg) = 46.999994 Property name: 'phi-rad'; Property value: 0.000000 Easy-set: phi -> quaternion = (1.000000,0.000000,0.000000,0.000000) Easy-set: alpha (deg) = 7.125016, beta (deg) = 13.932092, gamma (deg) = -6.914372 Property name: 'theta-rad'; Property value: 0.034907 Easy-set: phi -> quaternion = (0.999848,0.000000,0.017452,0.000000) Easy-set: alpha (deg) = 7.125016, beta (deg) = 13.932092, gamma (deg) = -4.973862 Property name: 'psi-rad'; Property value: 0.000000 Easy-set: phi -> quaternion = (0.999848,0.000000,0.017452,0.000000) Easy-set: alpha (deg) = 7.125016, beta (deg) = 13.932092, gamma (deg) = -4.973862 Property name: 'aileron-cmd-norm'; Property value: 1.000000 Easy-set: right aileron pos (deg) = -14.997170 Property name: 'elevator-cmd-norm'; Property value: -0.400000 Easy-set: elevator pos (deg) = -11.197887 Property name: 'rudder-cmd-norm'; Property value: 1.000000 Easy-set: rudder pos (deg) = 15.996982 Property name: 'fcs/throttle-cmd-norm'; Property value: 1.000000 Property name: 'fcs/mixture-cmd-norm'; Property value: 0.700000 Property name: 'set-running'; Property value: 1.000000 Easy-set: engine(s) running = 1 Vt = 83.066239 State derivatives calculated. V true 83.066239 (ft/s) [u_dot, v_dot, w_dot] = [2.450673,-24.558555,28.438848] (ft/s/s) [p_dot, q_dot, r_dot] = [1.037838,0.046871,-0.037094] (ft/s/s) [x_dot,y_dot,z_dot] = [16.762871,-64.567836,49.497482] (ft/s/s) [phi_dot,theta_dot,psi_dot] = [0.110476,0.200000,0.300183] (ft/s/s) ans = 1 ----------------------------------------------------------------- Agostino ------------------------------------------------------- Agostino De Marco, PhD Assistant Professor Università degli Studi di Napoli Federico II / University of Naples Federico II / Dipartimento di Ingegneria Aerospaziale / Department of Aerospace Engineering / Web: www.dpa.unina.it/demarco ------------------------------------------------------- |