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
|