From: b m. <bri...@in...> - 2009-04-07 20:59:28
|
Hi David, Are you sure about it being slower? Do you have your Simulink Parameters set up for a sample time of 1/120 ? Brian ----- Original Message ----- From: "Roberts, David J." <dro...@mi...> Date: Tuesday, April 7, 2009 13:39 Subject: [Jsbsim-matlab] compiling mex file for S-Function To: "jsb...@li..." <jsb...@li...> > Brian, > > Stuart pointed me towards your mathworks submission. I > tried your sfuntest3.mdl and it works nicely. I'm > interested in making use of it. > > I noticed it is slower than JSBSim. I think this is > probably due to use of the GetPropertyValue() method at > 120hz. From looking at JSBSim source I notice that > comments suggest using the GetNode() function and then using the > node's getDoubleValue() function for calls at 120hz. > > I'm going to try to modify JSBSimInterface.cpp & > JSBSimInterface.h to incorporate this. Do you have > the mex statement that you used to compile JSBSim_SFunction.mexw32? > > I tried with the following statement: > > mex -g JSBSim_SFunction.cpp JSBSimInterface.cpp MexJSBSim.cpp > SfunInterface.cpp stdafx.cpp -I"..\JSBSim\src\" - > L"..\JSBSim\lib\" > When I do this I get an error concerning MexJSBSim.cpp at line > 111. The compiler spits out: 'JSBSimInterface::Open' : > cannot convert parameter 1 from 'const mxArray *' to 'std::string'. > > Is there a compile option that I'm forgetting that handles data > type conversions? > > Regards, > > David Roberts > > |