JSBSim入门教程07.02:编译Simulink模块并使用

系列索引:JSBSim入门教程索引

JSBSim

从官网下载JSBSim-1.2.0-setup.exe并按照标准流程安装。

Matlab

先按照Matlab入门教程07:安装与配置安装Matlab2023b(2024.3.17我能找到的最新版)。

打开Matlab,配置编译器

1
2
3
4
5
6
>> mex -setup CPP
MEX 配置为使用 'Microsoft Visual C++ 2019' 以进行 C++ 语言编译。

要选择不同的 C++ 编译器,请从以下选项中选择一种命令:
Microsoft Visual C++ 2019 mex -setup:'C:\Program Files\MATLAB\R2023b\bin\win64\mexopts\msvcpp2019.xml' C++
Microsoft Visual C++ 2022 mex -setup:'C:\Program Files\MATLAB\R2023b\bin\win64\mexopts\msvcpp2022.xml' C++

默认使用VS2019

进入JSBSim安装目录C:\Users\Administrator\AppData\Local\JSBSim\matlab

工作目录

编译

执行命令编译模块

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
>> JSBSimSimulinkCompile
Compiling S-function from JSBSim...
详尽模式已开。
... 正在查找编译器 'Microsoft Visual C++ 2019'...
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value'...是('C:\Program Files (x86)\Microsoft Visual Studio\2019\Community')。
... 正在执行命令 'set "vcroot=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"&for /f "delims= " %a in ('type "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%'...是('C:\Program Files (x86)\Microsoft Visual Studio\2019\Community')。
... 正在查找注册表设置 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder...否。
... 正在查找注册表设置 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder...否。
... 正在查找注册表设置 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder...是('C:\Program Files (x86)\Windows Kits\10\')。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value'...是('C:\Program Files (x86)\Microsoft Visual Studio\2019\Community')。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value'...是('C:\Program Files (x86)\Microsoft Visual Studio\2019\Community')。
... 正在执行命令 'set "vcroot=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"&for /f "delims= " %a in ('type "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a'...是('C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133')。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value'...否。
... 正在查找环境变量 'ProgramFiles(x86)'...是('C:\Program Files (x86)')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'...是。
... 正在执行命令 '"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value'...是('C:\Program Files (x86)\Microsoft Visual Studio\2019\Community')。
... 正在查找文件 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat'...是。
... 正在查找文件夹 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build'...是。
... 正在查找注册表设置 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' KitsRoot10...是('C:\Program Files (x86)\Windows Kits\10\')。
... 正在查找注册表设置 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' KitsRoot10...是('C:\Program Files (x86)\Windows Kits\10\')。
... 正在执行命令 'echo off&set "sdkversion="&(for /f %a IN ('dir "C:\Program Files (x86)\Windows Kits\10\include\" /b /ad-h /on') do ( @if exist "C:\Program Files (x86)\Windows Kits\10\include\%a\ucrt\" set "sdkversion=%a" ))&call echo %sdkversion%'...是('10.0.22621.0')。
找到已安装的编译器 'Microsoft Visual C++ 2019'
设置 PATH = C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools;C:\Program Files (x86)\Windows Kits\10\\Bin\10.0.22621.0\x64;C:\Program Files (x86)\Windows Kits\10\\Bin\10.0.22621.0\x86;C:\Program Files (x86)\Windows Kits\10\\Bin\x64;C:\Program Files (x86)\Windows Kits\10\\Bin\x86;;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Presagis\Suite22\Ondulus_IR_22_0\bin;C:\Presagis\Suite22\Ondulus_Radar_22_0\bin\vc140_x64_r;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\NVIDIA Corporation\Nsight Compute 2023.3.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Program Files\MariaDB 11.2\bin;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\mrdr_utils\Binaries;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\mrdr_rtk\bin;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\mrdr\Binaries;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\osal\Binaries;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\types\Binaries;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\mrdi\Binaries;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\rdge\bin\ms141_64_r;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\ofapi\bin\vc140_x64_r;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\mrdr_grk\Binaries;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\qt\vc140_x64;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Presagis\Suite22\Ondulus_Radar_22_0\packages\qt\vc140_x64\bin;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Qt\5.15.2\msvc2019_64\bin;C:\ffmpeg-6.1.1-full_build-shared\bin;C:\Qt\Tools\CMake_64\bin;C:\vcpkg;D:\Apps\osg-3.6.5\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\MATLAB\R2023b\runtime\win64;C:\Program Files\MATLAB\R2023b\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\.dotnet\tools
设置 INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\atlmfc\include;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\winrt;C:\Program Files\MATLAB\R2023b\extern\include;
设置 LIB = C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\atlmfc\lib\x64;C:\Program Files (x86)\Windows Kits\10\\Lib\10.0.22621.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\um\x64;C:\Program Files\MATLAB\R2023b\lib\win64;
设置 LIBPATH = C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\atlmfc\lib\x64;
Options file details
-------------------------------------------------------------------
Compiler location: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\
Options file: C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2023b\mex_C++_win64.xml
CMDLINE200 : link /nologo /manifest /DLL /EXPORT:mexFunction /EXPORT:mexfilerequiredapiversion C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSim_SFunction.obj C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSimInterface.obj C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\cpp_mexapi_version.obj wsock32.lib ws2_32.lib JSBSim.lib /LIBPATH:..\lib /LIBPATH:"C:\Program Files\MATLAB\R2023b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libMatlabDataArray.lib libMatlabEngine.lib /out:JSBSim_SFunction.mexw64
CMDLINE250 : mt -outputresource:JSBSim_SFunction.mexw64;2 -manifest "JSBSim_SFunction.mexw64.manifest"
CMDLINE300 : del "JSBSim_SFunction.exp" "JSBSim_SFunction.lib" "JSBSim_SFunction.mexw64.manifest" "JSBSim_SFunction.ilk"
COMPILER : cl
COMPFLAGS : /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK
COMPDEFINES : /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE
MATLABMEX : /DMATLAB_MEX_FILE
OPTIMFLAGS : /O2 /Oy- /DNDEBUG
INCLUDE : -I"..\include" -I"C:\Program Files\MATLAB\R2023b\extern\include" -I"C:\Program Files\MATLAB\R2023b\simulink\include"
DEBUGFLAGS : /Z7
LINKER : link
LINKFLAGS : /nologo /manifest
LINKTYPE : /DLL
LINKEXPORT : /EXPORT:mexFunction
LINKEXPORTVER : /EXPORT:mexFunction /EXPORT:mexfilerequiredapiversion
LINKLIBS : wsock32.lib ws2_32.lib JSBSim.lib /LIBPATH:..\lib /LIBPATH:"C:\Program Files\MATLAB\R2023b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libMatlabDataArray.lib libMatlabEngine.lib
LINKDEBUGFLAGS : /debug /PDB:"JSBSim_SFunction.mexw64.pdb"
LINKOPTIMFLAGS :
OBJEXT : .obj
LDEXT : .mexw64
SETENV : set COMPILER=cl
set COMPFLAGS=/c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE
set OPTIMFLAGS=/O2 /Oy- /DNDEBUG
set DEBUGFLAGS=/Z7
set LINKER=link
set LINKFLAGS=/nologo /manifest /export:%ENTRYPOINT% /DLL wsock32.lib ws2_32.lib libJSBSim.lib JSBSim.lib /LIBPATH:..\lib /LIBPATH:"C:\Program Files\MATLAB\R2023b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libMatlabDataArray.lib libMatlabEngine.lib /EXPORT:mexFunction
set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%.mexw64.pdb"
set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
VCROOT : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
SDKROOT : C:\Program Files (x86)\Windows Kits\10\
VSINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
VCINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133
VCVARSALLDIR : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
KITSROOT : C:\Program Files (x86)\Windows Kits\10\
SDKVERSION : 10.0.22621.0
MATLABROOT : C:\Program Files\MATLAB\R2023b
ARCH : win64
SRC : "C:\Users\Administrator\AppData\Local\JSBSim\matlab\JSBSim_SFunction.cpp";"C:\Users\Administrator\AppData\Local\JSBSim\matlab\JSBSimInterface.cpp";"C:\Program Files\MATLAB\R2023b\extern\version\cpp_mexapi_version.cpp"
OBJ : C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSim_SFunction.obj;C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSimInterface.obj;C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\cpp_mexapi_version.obj
OBJS : C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSim_SFunction.obj C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSimInterface.obj C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\cpp_mexapi_version.obj
SRCROOT : C:\Users\Administrator\AppData\Local\JSBSim\matlab\JSBSim_SFunction
DEF : C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSim_SFunction.def
EXP : "JSBSim_SFunction.exp"
LIB : "JSBSim_SFunction.lib"
EXE : JSBSim_SFunction.mexw64
ILK : "JSBSim_SFunction.ilk"
MANIFEST : "JSBSim_SFunction.mexw64.manifest"
TEMPNAME : JSBSim_SFunction
EXEDIR :
EXENAME : JSBSim_SFunction
OPTIM : /O2 /Oy- /DNDEBUG
LINKOPTIM :
CMDLINE100_0 : cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK /O2 /Oy- /DNDEBUG /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -I"..\include" -I"C:\Program Files\MATLAB\R2023b\extern\include" -I"C:\Program Files\MATLAB\R2023b\simulink\include" "C:\Users\Administrator\AppData\Local\JSBSim\matlab\JSBSim_SFunction.cpp" /FoC:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSim_SFunction.obj
CMDLINE100_1 : cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK /O2 /Oy- /DNDEBUG /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -I"..\include" -I"C:\Program Files\MATLAB\R2023b\extern\include" -I"C:\Program Files\MATLAB\R2023b\simulink\include" "C:\Users\Administrator\AppData\Local\JSBSim\matlab\JSBSimInterface.cpp" /FoC:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSimInterface.obj
CMDLINE100_2 : cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK /O2 /Oy- /DNDEBUG /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -I"..\include" -I"C:\Program Files\MATLAB\R2023b\extern\include" -I"C:\Program Files\MATLAB\R2023b\simulink\include" "C:\Program Files\MATLAB\R2023b\extern\version\cpp_mexapi_version.cpp" /FoC:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\cpp_mexapi_version.obj
-------------------------------------------------------------------
使用 'Microsoft Visual C++ 2019' 编译。
cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK /O2 /Oy- /DNDEBUG /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -I"..\include" -I"C:\Program Files\MATLAB\R2023b\extern\include" -I"C:\Program Files\MATLAB\R2023b\simulink\include" "C:\Users\Administrator\AppData\Local\JSBSim\matlab\JSBSim_SFunction.cpp" /FoC:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSim_SFunction.obj
JSBSim_SFunction.cpp

cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK /O2 /Oy- /DNDEBUG /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -I"..\include" -I"C:\Program Files\MATLAB\R2023b\extern\include" -I"C:\Program Files\MATLAB\R2023b\simulink\include" "C:\Users\Administrator\AppData\Local\JSBSim\matlab\JSBSimInterface.cpp" /FoC:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSimInterface.obj
JSBSimInterface.cpp

cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /DJSBSIM_STATIC_LINK /O2 /Oy- /DNDEBUG /DMX_COMPAT_64 /DMATLAB_MEXCMD_RELEASE=R2017b /DUSE_MEX_CMD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -I"..\include" -I"C:\Program Files\MATLAB\R2023b\extern\include" -I"C:\Program Files\MATLAB\R2023b\simulink\include" "C:\Program Files\MATLAB\R2023b\extern\version\cpp_mexapi_version.cpp" /FoC:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\cpp_mexapi_version.obj
cpp_mexapi_version.cpp

{
"bundle.symbolic_name" : "d199f483-fce0-4676-a737-deaced279bf7",
"mw" :
{
"mex" :
{
"apiVersion" : 730,
"release" : "R2023b",
"threadpoolSafe" : 0
}
}
}


C:\Program Files\MATLAB\R2023b\bin\win64\usResourceCompiler3.exe --manifest-add C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\\mw_mex_tempmex_manifest.json --bundle-name mexVersioning --out-file C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\\mw_mex_tempmex_bundle.zip
C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\rc.exe /fo C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\\mw_mex_tempmex_res.res C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\\mw_mex_tempmex_rc.rc

link /nologo /manifest /DLL /EXPORT:mexFunction /EXPORT:mexfilerequiredapiversion C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSim_SFunction.obj C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\JSBSimInterface.obj C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\cpp_mexapi_version.obj wsock32.lib ws2_32.lib JSBSim.lib /LIBPATH:..\lib /LIBPATH:"C:\Program Files\MATLAB\R2023b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libMatlabDataArray.lib libMatlabEngine.lib /out:JSBSim_SFunction.mexw64 C:\Users\ADMINI~1\AppData\Local\Temp\mex_85144263941429_17540\\mw_mex_tempmex_res.res
ÕýÔÚ´´½¨¿â JSBSim_SFunction.lib ºÍ¶ÔÏó JSBSim_SFunction.exp

mt -outputresource:JSBSim_SFunction.mexw64;2 -manifest "JSBSim_SFunction.mexw64.manifest"
Microsoft (R) Manifest Tool

Copyright (c) Microsoft Corporation.

All rights reserved.


del "JSBSim_SFunction.exp" "JSBSim_SFunction.lib" "JSBSim_SFunction.mexw64.manifest" "JSBSim_SFunction.ilk"
MEX 已成功完成。
Finished.

模块

测试

将…/matlab/TestJSBSim.m、ex737cruise.slx、mexw64、ex737cruise_io.xml文件复制到JSBSim根目录,以便让m文件可以使用JSBSim.exe和相关配置文件。

双击打开slx文件

模块

执行测试程序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
>> TestJSBSim
Run 737 example
Current directory: C:\Users\Administrator\AppData\Local\JSBSimI/O config input: ex737cruise_io

JSBSim S-Function is initializing...



JSBSim Flight Dynamics Model v1.2.0 [GitHub build 1191/commit 4864e7389676bc0e9ac487b087650db74a31204c] Nov 5 2023 13:53:35
[JSBSim-ML v2.0]

JSBSim startup beginning ...

Simulation dt set to 0.008333
Setting up JSBSim with standard 'aircraft', 'engine', and 'system' paths.
Loading aircraft '737' ...
Reading Aircraft Configuration File: 737
Version: 2.0


This aircraft model is a BETA release!!!

This aircraft model probably will not fly as expected.

Use this model for development purposes ONLY!!!

Description: Models a Boeing 737.
Model Author: Dave Culp
Creation Date: 2006-01-04
Version: $Revision: 1.43 $

Aircraft Metrics:
WingArea: 1171
WingSpan: 94.7
Incidence: 0
Chord: 12.31
H. Tail Area: 348
H. Tail Arm: 48.04
V. Tail Area: 297
V. Tail Arm: 44.5
Eyepoint (x, y, z): 80 , -30 , 70
Ref Pt (x, y, z): 625 , 0 , 24
Visual Ref Pt (x, y, z): 0 , 0 , 0

Mass and Balance:
baseIxx: 562000 slug-ft2
baseIyy: 1.473e+06 slug-ft2
baseIzz: 1.894e+06 slug-ft2
baseIxy: -0 slug-ft2
baseIxz: 8000 slug-ft2
baseIyz: -0 slug-ft2
Empty Weight: 83000 lbm
CG (x, y, z): 639 , 0 , -40

Ground Reactions:
BOGEY Nose Gear
Location: 158 , 0 , -84
Spring Constant: 90000
Damping Constant: 4000 (linear)
Rebound Damping Constant: 8000 (linear)
Dynamic Friction: 0.5
Static Friction: 0.8
Rolling Friction: 0.02
Steering Type: STEERABLE
Grouping: NONE
Max Steer Angle: 35
Retractable: 1
BOGEY Left Main Gear
Location: 648 , -100 , -84
Spring Constant: 120000
Damping Constant: 10000 (linear)
Rebound Damping Constant: 20000 (linear)
Dynamic Friction: 0.5
Static Friction: 0.8
Rolling Friction: 0.02
Steering Type: FIXED
Grouping: LEFT
Max Steer Angle: 0
Retractable: 1
BOGEY Right Main Gear
Location: 648 , 100 , -84
Spring Constant: 120000
Damping Constant: 10000 (linear)
Rebound Damping Constant: 20000 (linear)
Dynamic Friction: 0.5
Static Friction: 0.8
Rolling Friction: 0.02
Steering Type: FIXED
Grouping: RIGHT
Max Steer Angle: 0
Retractable: 1

Propulsion:
(FUEL) tank holds 10200 lbs. FUEL
currently at 98.0392% of maximum capacity
Tank location (X, Y, Z): 520, -80, -18
Effective radius: 0 inches
Initial temperature: -9999 Fahrenheit
Priority: 1
(FUEL) tank holds 10200 lbs. FUEL
currently at 98.0392% of maximum capacity
Tank location (X, Y, Z): 520, 80, -18
Effective radius: 0 inches
Initial temperature: -9999 Fahrenheit
Priority: 1
(FUEL) tank holds 15000 lbs. FUEL
currently at 26.6667% of maximum capacity
Tank location (X, Y, Z): 480, 0, -18
Effective radius: 0 inches
Initial temperature: -9999 Fahrenheit
Priority: 1
2 dimensional table with 6 rows, 8 columns.
-10000.0000 0.0000 10000.0000 20000.0000 30000.0000 40000.0000 50000.0000 60000.0000
0.0000 0.0420 0.0436 0.0528 0.0694 0.0899 0.1183 0.1467 0.0000
0.2000 0.0500 0.0501 0.0335 0.0544 0.0797 0.1049 0.1342 0.0000
0.4000 0.0040 0.0047 0.0020 0.0272 0.0595 0.0891 0.1203 0.0000
0.6000 0.0000 0.0000 0.0000 0.0000 0.0276 0.0718 0.1073 0.0000
0.8000 0.0000 0.0000 0.0000 0.0000 0.0174 0.0468 0.0900 0.0000
1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0422 0.0700 0.0000
Function: propulsion/engine[0]/IdleThrust
2 dimensional table with 7 rows, 8 columns.
-10000.0000 0.0000 10000.0000 20000.0000 30000.0000 40000.0000 50000.0000 60000.0000
0.0000 1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 0.0000
0.2000 1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 0.0000
0.4000 1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 0.0000
0.6000 1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 0.0000
0.8000 1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 0.0000
1.0000 1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 0.0000
1.2000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Function: propulsion/engine[0]/MilThrust
X = 540.0000
Y = -193.0000
Z = -40.0000
Pitch = 0.0000 degrees
Yaw = 0.0000 degrees
2 dimensional table with 6 rows, 8 columns.
-10000.0000 0.0000 10000.0000 20000.0000 30000.0000 40000.0000 50000.0000 60000.0000
0.0000 0.0420 0.0436 0.0528 0.0694 0.0899 0.1183 0.1467 0.0000
0.2000 0.0500 0.0501 0.0335 0.0544 0.0797 0.1049 0.1342 0.0000
0.4000 0.0040 0.0047 0.0020 0.0272 0.0595 0.0891 0.1203 0.0000
0.6000 0.0000 0.0000 0.0000 0.0000 0.0276 0.0718 0.1073 0.0000
0.8000 0.0000 0.0000 0.0000 0.0000 0.0174 0.0468 0.0900 0.0000
1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0422 0.0700 0.0000
Function: propulsion/engine[1]/IdleThrust
2 dimensional table with 7 rows, 8 columns.
-10000.0000 0.0000 10000.0000 20000.0000 30000.0000 40000.0000 50000.0000 60000.0000
0.0000 1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 0.0000
0.2000 1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 0.0000
0.4000 1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 0.0000
0.6000 1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 0.0000
0.8000 1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 0.0000
1.0000 1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 0.0000
1.2000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Function: propulsion/engine[1]/MilThrust
X = 540.0000
Y = 193.0000
Z = -40.0000
Pitch = 0.0000 degrees
Yaw = 0.0000 degrees

FCS: FCS: 737

Channel Pitch

Loading Component "Pitch Trim Sum" of type: SUMMER
Minimum limit: constant value -1.000000
Maximum limit: constant value 1.000000
INPUTS:
elevator-cmd-norm
pitch-trim-cmd-norm
OUTPUT: pitch-trim-sum

Loading Component "Elevator Control" of type: AEROSURFACE_SCALE
INPUT: pitch-trim-sum
GAIN: constant value 1.000000
OUTPUT: elevator-pos-rad
OUTPUT: elevator-control
In/Out Mapping:
Input MIN: -1.0000
Input MAX: 1.0000
Output MIN: -0.3000
Output MAX: 0.3000

Loading Component "Elevator Normalized" of type: AEROSURFACE_SCALE
INPUT: elevator-pos-rad
GAIN: constant value 1.000000
OUTPUT: elevator-pos-norm
OUTPUT: elevator-normalized
In/Out Mapping:
Input MIN: -0.3000
Input MAX: 0.3000
Output MIN: -1.0000
Output MAX: 1.0000

Channel Roll

Loading Component "Roll Trim Sum" of type: SUMMER
Minimum limit: constant value -1.000000
Maximum limit: constant value 1.000000
INPUTS:
aileron-cmd-norm
roll-trim-cmd-norm
OUTPUT: roll-trim-sum

Loading Component "Left Aileron Control" of type: AEROSURFACE_SCALE
INPUT: roll-trim-sum
GAIN: constant value 1.000000
OUTPUT: left-aileron-pos-rad
OUTPUT: left-aileron-control
In/Out Mapping:
Input MIN: -1.0000
Input MAX: 1.0000
Output MIN: -0.3500
Output MAX: 0.3500

Loading Component "Right Aileron Control" of type: AEROSURFACE_SCALE
INPUT: -roll-trim-sum
GAIN: constant value 1.000000
OUTPUT: right-aileron-pos-rad
OUTPUT: right-aileron-control
In/Out Mapping:
Input MIN: -1.0000
Input MAX: 1.0000
Output MIN: -0.3500
Output MAX: 0.3500

Loading Component "Left aileron Normalized" of type: AEROSURFACE_SCALE
INPUT: left-aileron-pos-rad
GAIN: constant value 1.000000
OUTPUT: left-aileron-pos-norm
OUTPUT: left-aileron-normalized
In/Out Mapping:
Input MIN: -0.3500
Input MAX: 0.3500
Output MIN: -1.0000
Output MAX: 1.0000

Loading Component "Right aileron Normalized" of type: AEROSURFACE_SCALE
INPUT: right-aileron-pos-rad
GAIN: constant value 1.000000
OUTPUT: right-aileron-pos-norm
OUTPUT: right-aileron-normalized
In/Out Mapping:
Input MIN: -0.3500
Input MAX: 0.3500
Output MIN: -1.0000
Output MAX: 1.0000

Channel Yaw

Loading Component "Rudder Command Sum" of type: SUMMER
Minimum limit: constant value -1.000000
Maximum limit: constant value 1.000000
INPUTS:
rudder-cmd-norm
yaw-trim-cmd-norm
OUTPUT: rudder-command-sum

Loading Component "Yaw Damper" of type: SCHEDULED_GAIN
1 dimensional table with 3 rows.
0.0000 0.0000
0.1000 0.0000
0.1100 1.0000
INPUT: r-aero-rad_sec
GAIN: constant value 1.000000
OUTPUT: yaw-damper
Scheduled by table:
1 dimensional table with 3 rows.
0.0000 0.0000
0.1000 0.0000
0.1100 1.0000

Loading Component "Yaw Damper Final" of type: SCHEDULED_GAIN
1 dimensional table with 3 rows.
0.0000 0.0000
0.1000 0.0000
0.1100 1.0000
INPUT: yaw-damper
GAIN: constant value 1.000000
OUTPUT: yaw-damper-final
Scheduled by table:
1 dimensional table with 3 rows.
0.0000 0.0000
0.1000 0.0000
0.1100 1.0000

Loading Component "Rudder Sum" of type: SUMMER
Minimum limit: constant value -1.000000
Maximum limit: constant value 1.000000
INPUTS:
rudder-command-sum
yaw-damper-final
OUTPUT: rudder-sum

Loading Component "Rudder Control" of type: AEROSURFACE_SCALE
INPUT: rudder-sum
GAIN: constant value 1.000000
OUTPUT: rudder-pos-rad
OUTPUT: rudder-control
In/Out Mapping:
Input MIN: -1.0000
Input MAX: 1.0000
Output MIN: -0.3500
Output MAX: 0.3500

Loading Component "Rudder Normalized" of type: AEROSURFACE_SCALE
INPUT: rudder-pos-rad
GAIN: constant value 1.000000
OUTPUT: rudder-pos-norm
OUTPUT: rudder-normalized
In/Out Mapping:
Input MIN: -0.3500
Input MAX: 0.3500
Output MIN: -1.0000
Output MAX: 1.0000

Channel Flaps

Loading Component "Flaps Control" of type: KINEMATIC
INPUT: flap-cmd-norm
DETENTS: 9
0.0000 0.0000
0.1250 5.0000
0.2500 4.0000
0.3750 3.0000
0.5000 2.0000
0.6250 2.0000
0.7500 2.0000
0.8750 2.0000
1.0000 2.0000
OUTPUT: flap-pos-norm
OUTPUT: flaps-control

Channel Landing Gear

Loading Component "Gear Control" of type: KINEMATIC
INPUT: gear-cmd-norm
DETENTS: 2
0.0000 0.0000
1.0000 5.0000
OUTPUT: gear-pos-norm
OUTPUT: gear-control

Channel Flight Spoilers

Loading Component "Flight Spoilers Control" of type: KINEMATIC
INPUT: speedbrake-cmd-norm
DETENTS: 2
0.0000 0.0000
1.0000 0.6000
OUTPUT: speedbrake-pos-norm
OUTPUT: flight-spoilers-control

Channel Ground Spoilers

Loading Component "Ground Spoilers Control" of type: KINEMATIC
INPUT: spoiler-cmd-norm
DETENTS: 2
0.0000 0.0000
1.0000 0.6000
OUTPUT: spoiler-pos-norm
OUTPUT: ground-spoilers-control
1 dimensional table with 10 rows.
0.0000 0.0480
0.1000 0.5150
0.1500 0.6290
0.2000 0.7090
0.3000 0.8150
0.4000 0.8820
0.5000 0.9280
0.6000 0.9620
0.7000 0.9880
0.8000 1.0000
Function: aero/function/kCDge
1 dimensional table with 13 rows.
0.0000 1.2030
0.1000 1.1270
0.1500 1.0900
0.2000 1.0730
0.3000 1.0460
0.4000 1.0280
0.5000 1.0190
0.6000 1.0130
0.7000 1.0080
0.8000 1.0060
0.9000 1.0030
1.0000 1.0020
1.1000 1.0000
Function: aero/function/kCLge
1 dimensional table with 2 rows.
0.0000 1.0000
0.1000 0.8500
Function: aero/function/kCLsb
1 dimensional table with 2 rows.
0.0000 1.0000
0.1000 0.6000
Function: aero/function/kCLsp

Aerodynamics (Lift|Side|Drag axes):

1 dimensional table with 5 rows.
-1.5700 1.5000
-0.2600 0.0420
0.0000 0.0210
0.2600 0.0420
1.5700 1.5000
Function: aero/coefficient/CD0
Function: aero/coefficient/CDi
1 dimensional table with 4 rows.
0.0000 0.0000
0.7900 0.0000
1.1000 0.0230
1.8000 0.0150
Function: aero/coefficient/CDmach
Function: aero/coefficient/CDflap
Function: aero/coefficient/CDgear
Function: aero/coefficient/CDsb
Function: aero/coefficient/CDsp
1 dimensional table with 5 rows.
-1.5700 1.2300
-0.2600 0.0500
0.0000 0.0000
0.2600 0.0500
1.5700 1.2300
Function: aero/coefficient/CDbeta
Function: aero/coefficient/CDde
Function: aero/coefficient/CYb
1 dimensional table with 4 rows.
-0.2000 -0.6800
0.0000 0.2000
0.2300 1.2000
0.4600 0.2000
Function: aero/coefficient/CLalpha
Function: aero/coefficient/dCLflap
Function: aero/coefficient/CLde
Function: aero/coefficient/Clb
Function: aero/coefficient/Clp
Function: aero/coefficient/Clr
1 dimensional table with 2 rows.
0.0000 0.1000
2.0000 0.0330
Function: aero/coefficient/Clda
Function: aero/coefficient/Cldr
Function: aero/coefficient/Cmalpha
1 dimensional table with 2 rows.
0.0000 -1.2000
2.0000 -0.3000
Function: aero/coefficient/Cmde
Function: aero/coefficient/Cmq
Function: aero/coefficient/Cmadot
Function: aero/coefficient/Cnb
Function: aero/coefficient/Cnr
Function: aero/coefficient/Cndr

Input data set: 0

Input data set: 1

Declared properties

'737' Aircraft File has been successfully loaded!
Reset file: 'cruise_init' .
Winsock DLL loaded ...
Creating input TCP socket on port 5137
Successfully bound to TCP input socket on port 5137

Winsock DLL loaded ...
Creating input UDP socket on port 5139
Successfully bound to UDP input socket on port 5139


Mass Properties Report (English units: lbf, in, slug-ft^2)
Weight CG-X CG-Y CG-Z Ixx Iyy Izz Ixy Ixz Iyz
Base Vehicle 83000.0 639.0 0.0 -40.0 562000.0 1473000.0 1894000.0 -0.0 8000.0 -0.0
0 Fuel 10000 520 -80 -18 0 0 0
1 Fuel 10000 520 80 -18 0 0 0
2 Fuel 4000 480 0 -18 0 0 0

Total: 107000.0 610.8 0.0 -35.1 591572.3 1539552.7 1986235.4 0.0 19109.1 0.0

End of vehicle configuration loading.
-------------------------------------------------------------------------------

Simulation completed.
Remember to reset the program by typing clearSF in the matlab command window!
JSBSim S-Function Reset

simulink的值自动填充

仿真结果


JSBSim入门教程07.02:编译Simulink模块并使用
https://blog.jackeylea.com/jsbsim/how-to-build-simulink-function/
作者
JackeyLea
发布于
2024年3月19日
许可协议