From: Agostino De M. <ago...@un...> - 2009-04-07 20:30:40
|
David, that project is compiled with MS Visual Studio 2008 Express. That might be a bad thing for someone. For others that is one good example of mex files done with the popular IDE from MS. It helps a lot when you have big a project. Agostino Quoting "Roberts, David J." <dro...@mi...>: > 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 > > ------------------------------------------------------- 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 ------------------------------------------------------- |