From: Roberts, D. J. <dro...@mi...> - 2009-04-07 17:38:55
|
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 |