forked from JSBSim-Team/jsbsim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check the S-Function build with GitHub Actions.
- Loading branch information
Showing
5 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
find_package(Matlab) | ||
|
||
if(Matlab_FOUND) | ||
matlab_add_mex(NAME JSBSim_SFunction SRC JSBSim_SFunction.cpp JSBSimInterface.cpp | ||
LINK_TO libJSBSim) | ||
target_include_directories(JSBSim_SFunction PUBLIC ${CMAKE_SOURCE_DIR}/src | ||
${Matlab_ROOT_DIR}/simulink/include) | ||
endif(Matlab_FOUND) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
disp('Run 737 example'); | ||
fprintf('Current directory: %s', pwd) | ||
sim('ex737cruise'); | ||
clear functions; | ||
clear all; | ||
disp('JSBSim S-Function Reset'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
Short instruction to how to use the S-function to integrate JSBSim with Simulink | ||
Short instruction to how to use the S-function to integrate JSBSim with Simulink | ||
|
||
1. Build and install JSBSim. | ||
2. Open Matlab and navigate to the JSBSim folder. | ||
3. Open JSBSimSimulinkCompile and uncomment either the Linux or Windows mex row. | ||
4. Run JSBSimSimulinkCompile in the Matlab command window. Note that the compiler needed is gcc8. | ||
5. Open the Simulink example ex737cruise.slx and press run. | ||
6. Once the simulation is completed, run the clearSF.m file before running the Simulink program again. | ||
1. Build and install JSBSim. | ||
2. Open Matlab and navigate to the JSBSim folder. | ||
3. Open JSBSimSimulinkCompile and uncomment either the Linux or Windows mex row. | ||
4. Run JSBSimSimulinkCompile in the Matlab command window. Note that the compiler needed is gcc8. | ||
5. Open the Simulink example ex737cruise.slx and press run. | ||
6. Once the simulation is completed, run the clearSF.m file before running the Simulink program again. | ||
|
||
|
||
|
||
NOTE: | ||
* clearSF.m needs to be run after each Simulation. | ||
NOTE: | ||
* clearSF.m needs to be run after each Simulation. | ||
* The simulation can either be run from a script or from input from Simulink. | ||
|