├── .gitattributes ├── Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation ├── AppSim.m ├── Cal_Inv.m ├── ReadMe.txt ├── solve_de__ke.m ├── solve_dx__kx.slx ├── plot_aqi_figure.m ├── slprj │ ├── _jitprj │ │ ├── jitEngineAccessInfo.mat │ │ ├── s0Oiqkp2tTCsgkxeBaA78iE.l │ │ ├── s0Oiqkp2tTCsgkxeBaA78iE.mat │ │ ├── s1F3T9fN4iYlo1UbqZ8FDMF.l │ │ ├── s1F3T9fN4iYlo1UbqZ8FDMF.mat │ │ ├── s4Iwv8jBf0diM1zDQmEoX8E.l │ │ ├── s4Iwv8jBf0diM1zDQmEoX8E.mat │ │ ├── s9DmYBHW33YRnCxJelKoAYH.l │ │ ├── s9DmYBHW33YRnCxJelKoAYH.mat │ │ ├── sFl4wFSa8G4dUalo2upQ7IC.l │ │ ├── sFl4wFSa8G4dUalo2upQ7IC.mat │ │ ├── sdU6pnf2k0W1b8EzglTAtyC.l │ │ ├── sdU6pnf2k0W1b8EzglTAtyC.mat │ │ ├── sgmvxEO87BsXYVuG4PhJz5C.l │ │ ├── sgmvxEO87BsXYVuG4PhJz5C.mat │ │ ├── shjVHYvSMSS8fDs58cZ3YSF.l │ │ ├── shjVHYvSMSS8fDs58cZ3YSF.mat │ │ ├── skXZespuzKrzT5tVbFz80mB.l │ │ ├── skXZespuzKrzT5tVbFz80mB.mat │ │ ├── sr2CSdztIEDQwSt2XJ2Z1IF.l │ │ └── sr2CSdztIEDQwSt2XJ2Z1IF.mat │ └── _sfprj │ │ ├── EMLReport │ │ ├── emlReportAccessInfo.mat │ │ ├── Dm738gRcSjkzWbY8vJhlaE.mat │ │ ├── UTexMYvczmLzRdSQU1OslC.mat │ │ ├── s0Oiqkp2tTCsgkxeBaA78iE.mat │ │ ├── s1F3T9fN4iYlo1UbqZ8FDMF.mat │ │ ├── s4Iwv8jBf0diM1zDQmEoX8E.mat │ │ ├── s9DmYBHW33YRnCxJelKoAYH.mat │ │ ├── sFl4wFSa8G4dUalo2upQ7IC.mat │ │ ├── sdU6pnf2k0W1b8EzglTAtyC.mat │ │ ├── sgmvxEO87BsXYVuG4PhJz5C.mat │ │ ├── shjVHYvSMSS8fDs58cZ3YSF.mat │ │ ├── skXZespuzKrzT5tVbFz80mB.mat │ │ └── sr2CSdztIEDQwSt2XJ2Z1IF.mat │ │ ├── precompile │ │ ├── autoInferAccessInfo.mat │ │ ├── 4KyecrEPFBTjN0wJbE9MeE.mat │ │ ├── 7EG4fwoCsXyI2C8A4JnSE.mat │ │ ├── 9Iohb14SsMbWvs7FDeOdUH.mat │ │ ├── G2qT31ftq8SBjRuQx7cVJB.mat │ │ ├── L5pDoHLskQAsIAs08pNMCF.mat │ │ ├── LD1sbpLDYWw0m27MEsu5KB.mat │ │ ├── OLPpoXyLM4jTXxvAdkds3B.mat │ │ ├── ObhrlhMazEbuXCU1yZ12rB.mat │ │ ├── RsFKFwN8lNrIRMq0z8EzaB.mat │ │ ├── iIs0exyr5TrnPNDasoU6gC.mat │ │ ├── kyQXYSefdVgsnusr9qnPT.mat │ │ ├── r7OxTgBlrIk6QZAFcP9lxB.mat │ │ └── tqEI3eQWPxOpxngZLuCtKF.mat │ │ └── Attitude_Control_System_of_Flying_Vehicle │ │ └── _self │ │ └── sfun │ │ ├── info │ │ └── binfo.mat │ │ └── src │ │ ├── rtwtypeschksum.mat │ │ ├── ji │ │ ├── early_c1_sr2CSdztIEDQwSt2XJ2Z1IF.mat │ │ ├── early_c2_s9DmYBHW33YRnCxJelKoAYH.mat │ │ ├── early_c3_sFl4wFSa8G4dUalo2upQ7IC.mat │ │ ├── early_c3_sgmvxEO87BsXYVuG4PhJz5C.mat │ │ └── early_c4_s1F3T9fN4iYlo1UbqZ8FDMF.mat │ │ ├── c2_Attitude_Control_System_of_Flying_Vehicle.obj │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.exp │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.lib │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.obj │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun_registry.obj │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.mexw64.manifest │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.mol │ │ ├── rtwtypes.h │ │ ├── c2_Attitude_Control_System_of_Flying_Vehicle.h │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.bat │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.h │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.mak │ │ ├── multiword_types.h │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun_registry.c │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun.c │ │ ├── Attitude_Control_System_of_Flying_Vehicle_sfun_debug_macros.h │ │ └── c2_Attitude_Control_System_of_Flying_Vehicle.c └── Attitude_Control_System_of_Flying_Vehicle.slx └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | *.c linguist-language=MATLAB 2 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/AppSim.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | 5 | sim('Attitude_Control_System_of_Flying_Vehicle'); 6 | 7 | plot_aqi_figure; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation 2 | nonlinearity;time-scale separation;dynamic inversion 3 | 4 | 参考文献:《应用时标分离和动态逆方法设计飞行器的姿态控制系统》 5 | 6 | Written in MATLAB R2016b 7 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/Cal_Inv.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | 5 | syms theta gamma 6 | A(1,:) = [0 sin(theta) 1]; 7 | A(2,:) = [sin(gamma) cos(theta) * cos(gamma) 0]; 8 | A(3,:) = [cos(gamma) -cos(theta) * sin(gamma) 0]; 9 | 10 | B = inv(A) -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/ReadMe.txt -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/solve_de__ke.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/solve_de__ke.m -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/solve_dx__kx.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/solve_dx__kx.slx -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/plot_aqi_figure.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/plot_aqi_figure.m -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/jitEngineAccessInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/jitEngineAccessInfo.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s0Oiqkp2tTCsgkxeBaA78iE.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s0Oiqkp2tTCsgkxeBaA78iE.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s0Oiqkp2tTCsgkxeBaA78iE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s0Oiqkp2tTCsgkxeBaA78iE.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s1F3T9fN4iYlo1UbqZ8FDMF.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s1F3T9fN4iYlo1UbqZ8FDMF.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s1F3T9fN4iYlo1UbqZ8FDMF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s1F3T9fN4iYlo1UbqZ8FDMF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s4Iwv8jBf0diM1zDQmEoX8E.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s4Iwv8jBf0diM1zDQmEoX8E.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s4Iwv8jBf0diM1zDQmEoX8E.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s4Iwv8jBf0diM1zDQmEoX8E.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s9DmYBHW33YRnCxJelKoAYH.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s9DmYBHW33YRnCxJelKoAYH.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s9DmYBHW33YRnCxJelKoAYH.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/s9DmYBHW33YRnCxJelKoAYH.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sFl4wFSa8G4dUalo2upQ7IC.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sFl4wFSa8G4dUalo2upQ7IC.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sFl4wFSa8G4dUalo2upQ7IC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sFl4wFSa8G4dUalo2upQ7IC.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sdU6pnf2k0W1b8EzglTAtyC.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sdU6pnf2k0W1b8EzglTAtyC.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sdU6pnf2k0W1b8EzglTAtyC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sdU6pnf2k0W1b8EzglTAtyC.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sgmvxEO87BsXYVuG4PhJz5C.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sgmvxEO87BsXYVuG4PhJz5C.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sgmvxEO87BsXYVuG4PhJz5C.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sgmvxEO87BsXYVuG4PhJz5C.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/shjVHYvSMSS8fDs58cZ3YSF.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/shjVHYvSMSS8fDs58cZ3YSF.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/shjVHYvSMSS8fDs58cZ3YSF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/shjVHYvSMSS8fDs58cZ3YSF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/skXZespuzKrzT5tVbFz80mB.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/skXZespuzKrzT5tVbFz80mB.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/skXZespuzKrzT5tVbFz80mB.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/skXZespuzKrzT5tVbFz80mB.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sr2CSdztIEDQwSt2XJ2Z1IF.l: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sr2CSdztIEDQwSt2XJ2Z1IF.l -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sr2CSdztIEDQwSt2XJ2Z1IF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_jitprj/sr2CSdztIEDQwSt2XJ2Z1IF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/Attitude_Control_System_of_Flying_Vehicle.slx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/Attitude_Control_System_of_Flying_Vehicle.slx -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/emlReportAccessInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/emlReportAccessInfo.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/autoInferAccessInfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/autoInferAccessInfo.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/Dm738gRcSjkzWbY8vJhlaE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/Dm738gRcSjkzWbY8vJhlaE.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/UTexMYvczmLzRdSQU1OslC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/UTexMYvczmLzRdSQU1OslC.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s0Oiqkp2tTCsgkxeBaA78iE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s0Oiqkp2tTCsgkxeBaA78iE.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s1F3T9fN4iYlo1UbqZ8FDMF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s1F3T9fN4iYlo1UbqZ8FDMF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s4Iwv8jBf0diM1zDQmEoX8E.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s4Iwv8jBf0diM1zDQmEoX8E.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s9DmYBHW33YRnCxJelKoAYH.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/s9DmYBHW33YRnCxJelKoAYH.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sFl4wFSa8G4dUalo2upQ7IC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sFl4wFSa8G4dUalo2upQ7IC.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sdU6pnf2k0W1b8EzglTAtyC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sdU6pnf2k0W1b8EzglTAtyC.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sgmvxEO87BsXYVuG4PhJz5C.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sgmvxEO87BsXYVuG4PhJz5C.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/shjVHYvSMSS8fDs58cZ3YSF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/shjVHYvSMSS8fDs58cZ3YSF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/skXZespuzKrzT5tVbFz80mB.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/skXZespuzKrzT5tVbFz80mB.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sr2CSdztIEDQwSt2XJ2Z1IF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/EMLReport/sr2CSdztIEDQwSt2XJ2Z1IF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/4KyecrEPFBTjN0wJbE9MeE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/4KyecrEPFBTjN0wJbE9MeE.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/7EG4fwoCsXyI2C8A4JnSE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/7EG4fwoCsXyI2C8A4JnSE.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/9Iohb14SsMbWvs7FDeOdUH.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/9Iohb14SsMbWvs7FDeOdUH.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/G2qT31ftq8SBjRuQx7cVJB.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/G2qT31ftq8SBjRuQx7cVJB.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/L5pDoHLskQAsIAs08pNMCF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/L5pDoHLskQAsIAs08pNMCF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/LD1sbpLDYWw0m27MEsu5KB.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/LD1sbpLDYWw0m27MEsu5KB.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/OLPpoXyLM4jTXxvAdkds3B.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/OLPpoXyLM4jTXxvAdkds3B.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/ObhrlhMazEbuXCU1yZ12rB.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/ObhrlhMazEbuXCU1yZ12rB.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/RsFKFwN8lNrIRMq0z8EzaB.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/RsFKFwN8lNrIRMq0z8EzaB.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/iIs0exyr5TrnPNDasoU6gC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/iIs0exyr5TrnPNDasoU6gC.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/kyQXYSefdVgsnusr9qnPT.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/kyQXYSefdVgsnusr9qnPT.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/r7OxTgBlrIk6QZAFcP9lxB.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/r7OxTgBlrIk6QZAFcP9lxB.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/tqEI3eQWPxOpxngZLuCtKF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/precompile/tqEI3eQWPxOpxngZLuCtKF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/info/binfo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/info/binfo.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/rtwtypeschksum.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/rtwtypeschksum.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c1_sr2CSdztIEDQwSt2XJ2Z1IF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c1_sr2CSdztIEDQwSt2XJ2Z1IF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c2_s9DmYBHW33YRnCxJelKoAYH.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c2_s9DmYBHW33YRnCxJelKoAYH.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c3_sFl4wFSa8G4dUalo2upQ7IC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c3_sFl4wFSa8G4dUalo2upQ7IC.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c3_sgmvxEO87BsXYVuG4PhJz5C.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c3_sgmvxEO87BsXYVuG4PhJz5C.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c4_s1F3T9fN4iYlo1UbqZ8FDMF.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/ji/early_c4_s1F3T9fN4iYlo1UbqZ8FDMF.mat -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/c2_Attitude_Control_System_of_Flying_Vehicle.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/c2_Attitude_Control_System_of_Flying_Vehicle.obj -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.exp -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.lib -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.obj -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun_registry.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shirunqi/Attitude-Control-System-of-Flying-Vehicle-with-Dynamic-Inversion-and-Time-Scale-Separation/HEAD/Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun_registry.obj -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.mexw64.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.mol: -------------------------------------------------------------------------------- 1 | Attitude_Control_System_of_Flying_Vehicle_sfun.obj 2 | c2_Attitude_Control_System_of_Flying_Vehicle.obj 3 | Attitude_Control_System_of_Flying_Vehicle_sfun_registry.obj 4 | 5 | "E:\software\MATLAB\extern\lib\win64\microsoft\sf_runtime.lib" 6 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmx.lib" 7 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmex.lib" 8 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmat.lib" 9 | "E:\software\MATLAB\extern\lib\win64\microsoft\libfixedpoint.lib" 10 | "E:\software\MATLAB\extern\lib\win64\microsoft\libut.lib" 11 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmwmathutil.lib" 12 | "E:\software\MATLAB\extern\lib\win64\microsoft\libemlrt.lib" 13 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmwsl_log_load_blocks.lib" 14 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmwsimulink.lib" 15 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmwsl_sfcn_cov_bridge.lib" 16 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmwsl_simtarget_core.lib" 17 | "E:\software\MATLAB\extern\lib\win64\microsoft\libmwsl_simtarget_instrumentation.lib" 18 | "E:\software\MATLAB\lib\win64\libmwipp.lib" 19 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/rtwtypes.h: -------------------------------------------------------------------------------- 1 | #ifndef RTWTYPES_H 2 | #define RTWTYPES_H 3 | #include "tmwtypes.h" 4 | #include "simstruc_types.h" 5 | #ifndef POINTER_T 6 | # define POINTER_T 7 | 8 | typedef void * pointer_T; 9 | 10 | #endif 11 | 12 | /* Logical type definitions */ 13 | #if (!defined(__cplusplus)) 14 | # ifndef false 15 | # define false (0U) 16 | # endif 17 | 18 | # ifndef true 19 | # define true (1U) 20 | # endif 21 | #endif 22 | 23 | #ifndef INT64_T 24 | #define INT64_T 25 | 26 | typedef long long int64_T; 27 | 28 | #endif 29 | 30 | #ifndef UINT64_T 31 | #define UINT64_T 32 | 33 | typedef unsigned long long uint64_T; 34 | 35 | #endif 36 | 37 | /*===========================================================================* 38 | * Additional complex number type definitions * 39 | *===========================================================================*/ 40 | #ifndef CINT64_T 41 | #define CINT64_T 42 | 43 | typedef struct { 44 | int64_T re; 45 | int64_T im; 46 | } cint64_T; 47 | 48 | #endif 49 | 50 | #ifndef CUINT64_T 51 | #define CUINT64_T 52 | 53 | typedef struct { 54 | uint64_T re; 55 | uint64_T im; 56 | } cuint64_T; 57 | 58 | #endif 59 | #endif /* RTWTYPES_H */ 60 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/c2_Attitude_Control_System_of_Flying_Vehicle.h: -------------------------------------------------------------------------------- 1 | #ifndef __c2_Attitude_Control_System_of_Flying_Vehicle_h__ 2 | #define __c2_Attitude_Control_System_of_Flying_Vehicle_h__ 3 | 4 | /* Include files */ 5 | #include "sf_runtime/sfc_sf.h" 6 | #include "sf_runtime/sfc_mex.h" 7 | #include "rtwtypes.h" 8 | #include "multiword_types.h" 9 | 10 | /* Type Definitions */ 11 | #ifndef typedef_SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct 12 | #define typedef_SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct 13 | 14 | typedef struct { 15 | SimStruct *S; 16 | ChartInfoStruct chartInfo; 17 | uint32_T chartNumber; 18 | uint32_T instanceNumber; 19 | int32_T c2_sfEvent; 20 | boolean_T c2_doneDoubleBufferReInit; 21 | uint8_T c2_is_active_c2_Attitude_Control_System_of_Flying_Vehicle; 22 | real_T *c2_omega_x; 23 | real_T *c2_dtheta; 24 | real_T *c2_omega_y; 25 | real_T *c2_omega_z; 26 | real_T *c2_dphi; 27 | real_T *c2_dgamma; 28 | real_T *c2_theta; 29 | real_T *c2_gamma; 30 | } SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct; 31 | 32 | #endif /*typedef_SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*/ 33 | 34 | /* Named Constants */ 35 | 36 | /* Variable Declarations */ 37 | extern struct SfDebugInstanceStruct *sfGlobalDebugInstanceStruct; 38 | 39 | /* Variable Definitions */ 40 | 41 | /* Function Declarations */ 42 | extern const mxArray 43 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_eml_resolved_functions_info 44 | (void); 45 | 46 | /* Function Definitions */ 47 | extern void sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_check_sum 48 | (mxArray *plhs[]); 49 | extern void c2_Attitude_Control_System_of_Flying_Vehicle_method_dispatcher 50 | (SimStruct *S, int_T method, void *data); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set COMPILER=cl 3 | set COMPFLAGS=/c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE 4 | set OPTIMFLAGS=/O2 /Oy- /DNDEBUG 5 | set DEBUGFLAGS=/Z7 6 | set LINKER=link 7 | set LINKFLAGS=/nologo /manifest /export:%ENTRYPOINT% /DLL /LIBPATH:"E:\software\MATLAB\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 /EXPORT:mexFunction 8 | set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%.mexw64.pdb" 9 | set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%" 10 | set PATH=E:\software\Visual Studio\VC\Bin\amd64;E:\software\Visual Studio\VC\Bin\VCPackages;E:\software\Visual Studio\VC\..\Common7\IDE;E:\software\Visual Studio\VC\..\Common7\Tools;C:\Program Files (x86)\Windows Kits\8.1\\Bin\x64;C:\Program Files (x86)\Windows Kits\8.1\\Bin\x86;;%MATLAB_BIN%;%PATH% 11 | set INCLUDE=E:\software\Visual Studio\VC\INCLUDE;E:\software\Visual Studio\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\\include\10.0.10150.0\ucrt;C:\Program Files (x86)\Windows Kits\8.1\\include\shared;C:\Program Files (x86)\Windows Kits\8.1\\include\um;C:\Program Files (x86)\Windows Kits\8.1\\include\winrt;E:\software\MATLAB\extern\include;%INCLUDE% 12 | set LIB=E:\software\Visual Studio\VC\Lib\amd64;E:\software\Visual Studio\VC\ATLMFC\Lib\amd64;C:\Program Files (x86)\Windows Kits\10\\Lib\10.0.10150.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\8.1\\lib\winv6.3\um\x64;E:\software\MATLAB\lib\win64;%LIB% 13 | set LIBPATH=E:\software\Visual Studio\VC\Lib\amd64;E:\software\Visual Studio\VC\ATLMFC\Lib\amd64;%LIBPATH% 14 | 15 | nmake -f Attitude_Control_System_of_Flying_Vehicle_sfun.mak 16 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.h: -------------------------------------------------------------------------------- 1 | #ifndef __Attitude_Control_System_of_Flying_Vehicle_sfun_h__ 2 | #define __Attitude_Control_System_of_Flying_Vehicle_sfun_h__ 3 | 4 | /* Include files */ 5 | #define S_FUNCTION_NAME sf_sfun 6 | #include "sf_runtime/sfc_sf.h" 7 | #include "sf_runtime/sfc_mex.h" 8 | #include "sf_runtime/sf_runtime_errors.h" 9 | #include "rtwtypes.h" 10 | #include "simtarget/slSimTgtClientServerAPIBridge.h" 11 | #include "sf_runtime/sfc_sdi.h" 12 | #include "sf_runtime/sf_test_language.h" 13 | #include "multiword_types.h" 14 | #include "sf_runtime/sfc_messages.h" 15 | #include "sf_runtime/sfcdebug.h" 16 | #define rtInf (mxGetInf()) 17 | #define rtMinusInf (-(mxGetInf())) 18 | #define rtNaN (mxGetNaN()) 19 | #define rtIsNaN(X) ((int)mxIsNaN(X)) 20 | #define rtIsInf(X) ((int)mxIsInf(X)) 21 | 22 | struct SfDebugInstanceStruct; 23 | extern struct SfDebugInstanceStruct* sfGlobalDebugInstanceStruct; 24 | 25 | /* Type Definitions */ 26 | 27 | /* Named Constants */ 28 | 29 | /* Variable Declarations */ 30 | extern uint32_T _Attitude_Control_System_of_Flying_VehicleMachineNumber_; 31 | 32 | /* Variable Definitions */ 33 | 34 | /* Function Declarations */ 35 | extern void Attitude_Control_System_of_Flying_Vehicle_initializer(void); 36 | extern void Attitude_Control_System_of_Flying_Vehicle_terminator(void); 37 | 38 | /* Function Definitions */ 39 | 40 | /* We load infoStruct for rtw_optimation_info on demand in mdlSetWorkWidths and 41 | free it immediately in mdlStart. Given that this is machine-wide as 42 | opposed to chart specific, we use NULL check to make sure it gets loaded 43 | and unloaded once per machine even though the methods mdlSetWorkWidths/mdlStart 44 | are chart/instance specific. The following methods abstract this out. */ 45 | extern mxArray* load_Attitude_Control_System_of_Flying_Vehicle_optimization_info 46 | (boolean_T isRtwGen, boolean_T isModelRef, boolean_T isExternal); 47 | extern void unload_Attitude_Control_System_of_Flying_Vehicle_optimization_info 48 | (void); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.mak: -------------------------------------------------------------------------------- 1 | # ------------------- Required for MSVC nmake --------------------------------- 2 | # This file should be included at the top of a MAKEFILE as follows: 3 | 4 | 5 | CPU = AMD64 6 | 7 | MODEL = Attitude_Control_System_of_Flying_Vehicle 8 | TARGET = sfun 9 | MODULE_SRCS = c2_Attitude_Control_System_of_Flying_Vehicle.c 10 | MODEL_SRC = Attitude_Control_System_of_Flying_Vehicle_sfun.c 11 | MODEL_REG = Attitude_Control_System_of_Flying_Vehicle_sfun_registry.c 12 | MAKEFILE = Attitude_Control_System_of_Flying_Vehicle_sfun.mak 13 | MATLAB_ROOT = E:\software\MATLAB 14 | BUILDARGS = 15 | 16 | #--------------------------- Tool Specifications ------------------------------ 17 | # 18 | # 19 | MSVC_ROOT1 = $(MSDEVDIR:SharedIDE=vc) 20 | MSVC_ROOT2 = $(MSVC_ROOT1:SHAREDIDE=vc) 21 | MSVC_ROOT = $(MSVC_ROOT2:sharedide=vc) 22 | 23 | # Compiler tool locations, CC, LD, LIBCMD: 24 | CC = cl.exe 25 | LD = link.exe 26 | LIBCMD = lib.exe 27 | #------------------------------ Include/Lib Path ------------------------------ 28 | 29 | USER_INCLUDES = 30 | AUX_INCLUDES = 31 | MLSLSF_INCLUDES = \ 32 | /I "E:\software\MATLAB\extern\include" \ 33 | /I "E:\software\MATLAB\simulink\include" \ 34 | /I "E:\software\MATLAB\simulink\include\sf_runtime" \ 35 | /I "E:\software\MATLAB\stateflow\c\mex\include" \ 36 | /I "E:\software\MATLAB\rtw\c\src" \ 37 | /I "D:\document\2018_autumn\Simulation\20181227\slprj\_sfprj\Attitude_Control_System_of_Flying_Vehicle\_self\sfun\src" 38 | 39 | COMPILER_INCLUDES = /I "$(MSVC_ROOT)\include" 40 | 41 | THIRD_PARTY_INCLUDES = 42 | INCLUDE_PATH = $(USER_INCLUDES) $(AUX_INCLUDES) $(MLSLSF_INCLUDES)\ 43 | $(THIRD_PARTY_INCLUDES) 44 | LIB_PATH = "$(MSVC_ROOT)\lib" 45 | 46 | CFLAGS = /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD 47 | LDFLAGS = /nologo /dll /MANIFEST /OPT:NOREF /export:mexFunction 48 | #----------------------------- Source Files ----------------------------------- 49 | 50 | REQ_SRCS = $(MODEL_SRC) $(MODEL_REG) $(MODULE_SRCS) 51 | 52 | USER_ABS_OBJS = 53 | 54 | AUX_ABS_OBJS = 55 | 56 | THIRD_PARTY_OBJS = 57 | 58 | REQ_OBJS = $(REQ_SRCS:.cpp=.obj) 59 | REQ_OBJS2 = $(REQ_OBJS:.c=.obj) 60 | OBJS = $(REQ_OBJS2) $(USER_ABS_OBJS) $(AUX_ABS_OBJS) $(THIRD_PARTY_OBJS) 61 | OBJLIST_FILE = Attitude_Control_System_of_Flying_Vehicle_sfun.mol 62 | SFCLIB = 63 | AUX_LNK_OBJS = 64 | USER_LIBS = 65 | #--------------------------------- Rules -------------------------------------- 66 | 67 | MEX_FILE_NAME_WO_EXT = $(MODEL)_$(TARGET) 68 | MEX_FILE_NAME = $(MEX_FILE_NAME_WO_EXT).mexw64 69 | MEX_FILE_CSF = 70 | all : $(MEX_FILE_NAME) $(MEX_FILE_CSF) 71 | 72 | $(MEX_FILE_NAME) : $(MAKEFILE) $(OBJS) $(SFCLIB) $(AUX_LNK_OBJS) $(USER_LIBS) $(THIRD_PARTY_LIBS) 73 | @echo ### Linking ... 74 | $(LD) $(LDFLAGS) /OUT:$(MEX_FILE_NAME) /map:"$(MEX_FILE_NAME_WO_EXT).map"\ 75 | $(USER_LIBS) $(SFCLIB) $(AUX_LNK_OBJS)\ 76 | $(DSP_LIBS) $(THIRD_PARTY_LIBS)\ 77 | @$(OBJLIST_FILE) 78 | mt -outputresource:"$(MEX_FILE_NAME);2" -manifest "$(MEX_FILE_NAME).manifest" 79 | @echo ### Created $@ 80 | 81 | .c.obj : 82 | @echo ### Compiling "$<" 83 | $(CC) $(CFLAGS) $(INCLUDE_PATH) "$<" 84 | 85 | .cpp.obj : 86 | @echo ### Compiling "$<" 87 | $(CC) $(CFLAGS) $(INCLUDE_PATH) "$<" 88 | 89 | 90 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/multiword_types.h: -------------------------------------------------------------------------------- 1 | #ifndef MULTIWORD_TYPES_H 2 | #define MULTIWORD_TYPES_H 3 | #include "rtwtypes.h" 4 | 5 | /* 6 | * MultiWord supporting definitions 7 | */ 8 | typedef long long longlong_T; 9 | 10 | /* 11 | * MultiWord types 12 | */ 13 | typedef struct { 14 | uint64_T chunks[2]; 15 | } int128m_T; 16 | 17 | typedef struct { 18 | int128m_T re; 19 | int128m_T im; 20 | } cint128m_T; 21 | 22 | typedef struct { 23 | uint64_T chunks[2]; 24 | } uint128m_T; 25 | 26 | typedef struct { 27 | uint128m_T re; 28 | uint128m_T im; 29 | } cuint128m_T; 30 | 31 | typedef struct { 32 | uint64_T chunks[3]; 33 | } int192m_T; 34 | 35 | typedef struct { 36 | int192m_T re; 37 | int192m_T im; 38 | } cint192m_T; 39 | 40 | typedef struct { 41 | uint64_T chunks[3]; 42 | } uint192m_T; 43 | 44 | typedef struct { 45 | uint192m_T re; 46 | uint192m_T im; 47 | } cuint192m_T; 48 | 49 | typedef struct { 50 | uint64_T chunks[4]; 51 | } int256m_T; 52 | 53 | typedef struct { 54 | int256m_T re; 55 | int256m_T im; 56 | } cint256m_T; 57 | 58 | typedef struct { 59 | uint64_T chunks[4]; 60 | } uint256m_T; 61 | 62 | typedef struct { 63 | uint256m_T re; 64 | uint256m_T im; 65 | } cuint256m_T; 66 | 67 | typedef struct { 68 | uint64_T chunks[5]; 69 | } int320m_T; 70 | 71 | typedef struct { 72 | int320m_T re; 73 | int320m_T im; 74 | } cint320m_T; 75 | 76 | typedef struct { 77 | uint64_T chunks[5]; 78 | } uint320m_T; 79 | 80 | typedef struct { 81 | uint320m_T re; 82 | uint320m_T im; 83 | } cuint320m_T; 84 | 85 | typedef struct { 86 | uint64_T chunks[6]; 87 | } int384m_T; 88 | 89 | typedef struct { 90 | int384m_T re; 91 | int384m_T im; 92 | } cint384m_T; 93 | 94 | typedef struct { 95 | uint64_T chunks[6]; 96 | } uint384m_T; 97 | 98 | typedef struct { 99 | uint384m_T re; 100 | uint384m_T im; 101 | } cuint384m_T; 102 | 103 | typedef struct { 104 | uint64_T chunks[7]; 105 | } int448m_T; 106 | 107 | typedef struct { 108 | int448m_T re; 109 | int448m_T im; 110 | } cint448m_T; 111 | 112 | typedef struct { 113 | uint64_T chunks[7]; 114 | } uint448m_T; 115 | 116 | typedef struct { 117 | uint448m_T re; 118 | uint448m_T im; 119 | } cuint448m_T; 120 | 121 | typedef struct { 122 | uint64_T chunks[8]; 123 | } int512m_T; 124 | 125 | typedef struct { 126 | int512m_T re; 127 | int512m_T im; 128 | } cint512m_T; 129 | 130 | typedef struct { 131 | uint64_T chunks[8]; 132 | } uint512m_T; 133 | 134 | typedef struct { 135 | uint512m_T re; 136 | uint512m_T im; 137 | } cuint512m_T; 138 | 139 | typedef struct { 140 | uint64_T chunks[9]; 141 | } int576m_T; 142 | 143 | typedef struct { 144 | int576m_T re; 145 | int576m_T im; 146 | } cint576m_T; 147 | 148 | typedef struct { 149 | uint64_T chunks[9]; 150 | } uint576m_T; 151 | 152 | typedef struct { 153 | uint576m_T re; 154 | uint576m_T im; 155 | } cuint576m_T; 156 | 157 | typedef struct { 158 | uint64_T chunks[10]; 159 | } int640m_T; 160 | 161 | typedef struct { 162 | int640m_T re; 163 | int640m_T im; 164 | } cint640m_T; 165 | 166 | typedef struct { 167 | uint64_T chunks[10]; 168 | } uint640m_T; 169 | 170 | typedef struct { 171 | uint640m_T re; 172 | uint640m_T im; 173 | } cuint640m_T; 174 | 175 | typedef struct { 176 | uint64_T chunks[11]; 177 | } int704m_T; 178 | 179 | typedef struct { 180 | int704m_T re; 181 | int704m_T im; 182 | } cint704m_T; 183 | 184 | typedef struct { 185 | uint64_T chunks[11]; 186 | } uint704m_T; 187 | 188 | typedef struct { 189 | uint704m_T re; 190 | uint704m_T im; 191 | } cuint704m_T; 192 | 193 | typedef struct { 194 | uint64_T chunks[12]; 195 | } int768m_T; 196 | 197 | typedef struct { 198 | int768m_T re; 199 | int768m_T im; 200 | } cint768m_T; 201 | 202 | typedef struct { 203 | uint64_T chunks[12]; 204 | } uint768m_T; 205 | 206 | typedef struct { 207 | uint768m_T re; 208 | uint768m_T im; 209 | } cuint768m_T; 210 | 211 | typedef struct { 212 | uint64_T chunks[13]; 213 | } int832m_T; 214 | 215 | typedef struct { 216 | int832m_T re; 217 | int832m_T im; 218 | } cint832m_T; 219 | 220 | typedef struct { 221 | uint64_T chunks[13]; 222 | } uint832m_T; 223 | 224 | typedef struct { 225 | uint832m_T re; 226 | uint832m_T im; 227 | } cuint832m_T; 228 | 229 | typedef struct { 230 | uint64_T chunks[14]; 231 | } int896m_T; 232 | 233 | typedef struct { 234 | int896m_T re; 235 | int896m_T im; 236 | } cint896m_T; 237 | 238 | typedef struct { 239 | uint64_T chunks[14]; 240 | } uint896m_T; 241 | 242 | typedef struct { 243 | uint896m_T re; 244 | uint896m_T im; 245 | } cuint896m_T; 246 | 247 | typedef struct { 248 | uint64_T chunks[15]; 249 | } int960m_T; 250 | 251 | typedef struct { 252 | int960m_T re; 253 | int960m_T im; 254 | } cint960m_T; 255 | 256 | typedef struct { 257 | uint64_T chunks[15]; 258 | } uint960m_T; 259 | 260 | typedef struct { 261 | uint960m_T re; 262 | uint960m_T im; 263 | } cuint960m_T; 264 | 265 | typedef struct { 266 | uint64_T chunks[16]; 267 | } int1024m_T; 268 | 269 | typedef struct { 270 | int1024m_T re; 271 | int1024m_T im; 272 | } cint1024m_T; 273 | 274 | typedef struct { 275 | uint64_T chunks[16]; 276 | } uint1024m_T; 277 | 278 | typedef struct { 279 | uint1024m_T re; 280 | uint1024m_T im; 281 | } cuint1024m_T; 282 | 283 | #endif /* MULTIWORD_TYPES_H */ 284 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun_registry.c: -------------------------------------------------------------------------------- 1 | #include "Attitude_Control_System_of_Flying_Vehicle_sfun.h" 2 | #include "sf_runtime/sfcdebug.h" 3 | 4 | struct SfDebugInstanceStruct; 5 | struct SfDebugInstanceStruct* sfGlobalDebugInstanceStruct = NULL; 6 | 7 | #define PROCESS_MEX_SFUNCTION_CMD_LINE_CALL 8 | 9 | unsigned int sf_process_check_sum_call( int nlhs, mxArray * plhs[], int nrhs, 10 | const mxArray * prhs[] ) 11 | { 12 | extern unsigned int 13 | sf_Attitude_Control_System_of_Flying_Vehicle_process_check_sum_call( int 14 | nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ); 15 | if (sf_Attitude_Control_System_of_Flying_Vehicle_process_check_sum_call(nlhs, 16 | plhs,nrhs,prhs)) 17 | return 1; 18 | return 0; 19 | } 20 | 21 | unsigned int sf_process_autoinheritance_call( int nlhs, mxArray * plhs[], int 22 | nrhs, const mxArray * prhs[] ) 23 | { 24 | extern unsigned int 25 | sf_Attitude_Control_System_of_Flying_Vehicle_autoinheritance_info( int nlhs, 26 | mxArray * plhs[], int nrhs, const mxArray * prhs[] ); 27 | char commandName[64]; 28 | char machineName[128]; 29 | if (nrhs < 4) { 30 | return 0; 31 | } 32 | 33 | if (!mxIsChar(prhs[0]) || !mxIsChar(prhs[1])) 34 | return 0; 35 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 36 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 37 | if (strcmp(commandName,"get_autoinheritance_info")) 38 | return 0; 39 | mxGetString(prhs[1], machineName,sizeof(machineName)/sizeof(char)); 40 | machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0'; 41 | if (strcmp(machineName, "Attitude_Control_System_of_Flying_Vehicle") == 0) { 42 | const mxArray *newRhs[3] = { NULL, NULL, NULL }; 43 | 44 | newRhs[0] = prhs[0]; 45 | newRhs[1] = prhs[2]; 46 | newRhs[2] = prhs[3]; 47 | return sf_Attitude_Control_System_of_Flying_Vehicle_autoinheritance_info 48 | (nlhs,plhs,3,newRhs); 49 | } 50 | 51 | return 0; 52 | } 53 | 54 | unsigned int sf_process_get_third_party_uses_info_call( int nlhs, mxArray * 55 | plhs[], int nrhs, const mxArray * prhs[] ) 56 | { 57 | extern unsigned int 58 | sf_Attitude_Control_System_of_Flying_Vehicle_third_party_uses_info( int nlhs, 59 | mxArray * plhs[], int nrhs, const mxArray * prhs[] ); 60 | char commandName[64]; 61 | char machineName[128]; 62 | if (nrhs < 4) { 63 | return 0; 64 | } 65 | 66 | if (!mxIsChar(prhs[0]) || !mxIsChar(prhs[1])) 67 | return 0; 68 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 69 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 70 | if (strcmp(commandName,"get_third_party_uses_info")) 71 | return 0; 72 | mxGetString(prhs[1], machineName,sizeof(machineName)/sizeof(char)); 73 | machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0'; 74 | if (strcmp(machineName, "Attitude_Control_System_of_Flying_Vehicle") == 0) { 75 | const mxArray *newRhs[3] = { NULL, NULL, NULL }; 76 | 77 | newRhs[0] = prhs[0]; 78 | newRhs[1] = prhs[2]; 79 | newRhs[2] = prhs[3]; 80 | return sf_Attitude_Control_System_of_Flying_Vehicle_third_party_uses_info 81 | (nlhs,plhs,3,newRhs); 82 | } 83 | 84 | return 0; 85 | } 86 | 87 | unsigned int sf_process_get_jit_fallback_info_call( int nlhs, mxArray * plhs[], 88 | int nrhs, const mxArray * prhs[] ) 89 | { 90 | extern unsigned int 91 | sf_Attitude_Control_System_of_Flying_Vehicle_jit_fallback_info( int nlhs, 92 | mxArray * plhs[], int nrhs, const mxArray * prhs[] ); 93 | char commandName[64]; 94 | char machineName[128]; 95 | if (nrhs < 4) { 96 | return 0; 97 | } 98 | 99 | if (!mxIsChar(prhs[0]) || !mxIsChar(prhs[1])) 100 | return 0; 101 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 102 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 103 | if (strcmp(commandName,"get_jit_fallback_info")) 104 | return 0; 105 | mxGetString(prhs[1], machineName,sizeof(machineName)/sizeof(char)); 106 | machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0'; 107 | if (strcmp(machineName, "Attitude_Control_System_of_Flying_Vehicle") == 0) { 108 | const mxArray *newRhs[3] = { NULL, NULL, NULL }; 109 | 110 | newRhs[0] = prhs[0]; 111 | newRhs[1] = prhs[2]; 112 | newRhs[2] = prhs[3]; 113 | return sf_Attitude_Control_System_of_Flying_Vehicle_jit_fallback_info(nlhs, 114 | plhs,3,newRhs); 115 | } 116 | 117 | return 0; 118 | } 119 | 120 | unsigned int sf_process_get_updateBuildInfo_args_info_call( int nlhs, mxArray * 121 | plhs[], int nrhs, const mxArray * prhs[] ) 122 | { 123 | extern unsigned int 124 | sf_Attitude_Control_System_of_Flying_Vehicle_updateBuildInfo_args_info( int 125 | nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ); 126 | char commandName[64]; 127 | char machineName[128]; 128 | if (nrhs < 4) { 129 | return 0; 130 | } 131 | 132 | if (!mxIsChar(prhs[0]) || !mxIsChar(prhs[1])) 133 | return 0; 134 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 135 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 136 | if (strcmp(commandName,"get_updateBuildInfo_args_info")) 137 | return 0; 138 | mxGetString(prhs[1], machineName,sizeof(machineName)/sizeof(char)); 139 | machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0'; 140 | if (strcmp(machineName, "Attitude_Control_System_of_Flying_Vehicle") == 0) { 141 | const mxArray *newRhs[3] = { NULL, NULL, NULL }; 142 | 143 | newRhs[0] = prhs[0]; 144 | newRhs[1] = prhs[2]; 145 | newRhs[2] = prhs[3]; 146 | return 147 | sf_Attitude_Control_System_of_Flying_Vehicle_updateBuildInfo_args_info 148 | (nlhs,plhs,3,newRhs); 149 | } 150 | 151 | return 0; 152 | } 153 | 154 | unsigned int sf_process_get_eml_resolved_functions_info_call( int nlhs, mxArray * 155 | plhs[], int nrhs, const mxArray * prhs[] ) 156 | { 157 | extern unsigned int 158 | sf_Attitude_Control_System_of_Flying_Vehicle_get_eml_resolved_functions_info 159 | ( int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ); 160 | char commandName[64]; 161 | char machineName[128]; 162 | if (nrhs < 3) { 163 | return 0; 164 | } 165 | 166 | if (!mxIsChar(prhs[0]) || !mxIsChar(prhs[1])) 167 | return 0; 168 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 169 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 170 | if (strcmp(commandName,"get_eml_resolved_functions_info")) 171 | return 0; 172 | mxGetString(prhs[1], machineName,sizeof(machineName)/sizeof(char)); 173 | machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0'; 174 | if (strcmp(machineName, "Attitude_Control_System_of_Flying_Vehicle") == 0) { 175 | const mxArray *newRhs[2] = { NULL, NULL }; 176 | 177 | newRhs[0] = prhs[0]; 178 | newRhs[1] = prhs[2]; 179 | return 180 | sf_Attitude_Control_System_of_Flying_Vehicle_get_eml_resolved_functions_info 181 | (nlhs,plhs,2,newRhs); 182 | } 183 | 184 | return 0; 185 | } 186 | 187 | unsigned int sf_mex_unlock_call( int nlhs, mxArray * plhs[], int nrhs, const 188 | mxArray * prhs[] ) 189 | { 190 | char commandName[20]; 191 | if (nrhs<1 || !mxIsChar(prhs[0]) ) 192 | return 0; 193 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 194 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 195 | if (strcmp(commandName,"sf_mex_unlock")) 196 | return 0; 197 | while (mexIsLocked()) { 198 | mexUnlock(); 199 | } 200 | 201 | return(1); 202 | } 203 | 204 | extern unsigned int sf_debug_api(struct SfDebugInstanceStruct* debugInstance, 205 | int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ); 206 | static unsigned int sf_debug_api_wrapper( int nlhs, mxArray * plhs[], int nrhs, 207 | const mxArray * prhs[] ) 208 | { 209 | return sf_debug_api(sfGlobalDebugInstanceStruct, nlhs, plhs, nrhs, prhs); 210 | } 211 | 212 | static unsigned int ProcessMexSfunctionCmdLineCall(int nlhs, mxArray * plhs[], 213 | int nrhs, const mxArray * prhs[]) 214 | { 215 | if (sf_debug_api_wrapper(nlhs,plhs,nrhs,prhs)) 216 | return 1; 217 | if (sf_process_check_sum_call(nlhs,plhs,nrhs,prhs)) 218 | return 1; 219 | if (sf_mex_unlock_call(nlhs,plhs,nrhs,prhs)) 220 | return 1; 221 | if (sf_process_autoinheritance_call(nlhs,plhs,nrhs,prhs)) 222 | return 1; 223 | if (sf_process_get_third_party_uses_info_call(nlhs,plhs,nrhs,prhs)) 224 | return 1; 225 | if (sf_process_get_jit_fallback_info_call(nlhs,plhs,nrhs,prhs)) 226 | return 1; 227 | if (sf_process_get_updateBuildInfo_args_info_call(nlhs,plhs,nrhs,prhs)) 228 | return 1; 229 | if (sf_process_get_eml_resolved_functions_info_call(nlhs,plhs,nrhs,prhs)) 230 | return 1; 231 | mexErrMsgTxt("Unsuccessful command."); 232 | return 0; 233 | } 234 | 235 | static unsigned int sfGlobalMdlStartCallCounts = 0; 236 | unsigned int sf_machine_global_initializer_called(void) 237 | { 238 | return(sfGlobalMdlStartCallCounts > 0); 239 | } 240 | 241 | extern unsigned int 242 | sf_Attitude_Control_System_of_Flying_Vehicle_method_dispatcher(SimStruct *S, 243 | unsigned int chartFileNumber, const char* specsCksum, int_T method, void *data); 244 | unsigned int sf_machine_global_method_dispatcher(SimStruct *simstructPtr, const 245 | char *machineName, unsigned int chartFileNumber, const char* specsCksum, int_T 246 | method, void *data) 247 | { 248 | if (!strcmp(machineName,"Attitude_Control_System_of_Flying_Vehicle")) { 249 | return(sf_Attitude_Control_System_of_Flying_Vehicle_method_dispatcher 250 | (simstructPtr,chartFileNumber,specsCksum,method,data)); 251 | } 252 | 253 | return 0; 254 | } 255 | 256 | extern void Attitude_Control_System_of_Flying_Vehicle_terminator(void); 257 | void sf_machine_global_terminator(SimStruct* S) 258 | { 259 | sfGlobalMdlStartCallCounts--; 260 | if (sfGlobalMdlStartCallCounts == 0) { 261 | Attitude_Control_System_of_Flying_Vehicle_terminator(); 262 | sf_debug_terminate(sfGlobalDebugInstanceStruct); 263 | sfGlobalDebugInstanceStruct = NULL; 264 | } 265 | 266 | return; 267 | } 268 | 269 | extern void Attitude_Control_System_of_Flying_Vehicle_initializer(void); 270 | extern void Attitude_Control_System_of_Flying_Vehicle_register_exported_symbols 271 | (SimStruct* S); 272 | extern void Attitude_Control_System_of_Flying_Vehicle_debug_initialize(struct 273 | SfDebugInstanceStruct*); 274 | void sf_register_machine_exported_symbols(SimStruct* S) 275 | { 276 | Attitude_Control_System_of_Flying_Vehicle_register_exported_symbols(S); 277 | } 278 | 279 | bool callCustomFcn(char initFlag) 280 | { 281 | return false; 282 | } 283 | 284 | void sf_machine_global_initializer(SimStruct* S) 285 | { 286 | bool simModeIsRTWGen = sim_mode_is_rtw_gen(S); 287 | sfGlobalMdlStartCallCounts++; 288 | if (sfGlobalMdlStartCallCounts == 1) { 289 | if (simModeIsRTWGen) { 290 | sf_register_machine_exported_symbols(S); 291 | } 292 | 293 | sfGlobalDebugInstanceStruct = sf_debug_create_debug_instance_struct(); 294 | if (!simModeIsRTWGen) { 295 | Attitude_Control_System_of_Flying_Vehicle_debug_initialize 296 | (sfGlobalDebugInstanceStruct); 297 | } 298 | 299 | Attitude_Control_System_of_Flying_Vehicle_initializer(); 300 | } 301 | 302 | return; 303 | } 304 | 305 | #include "sf_runtime/stateflow_mdl_methods.stub" 306 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun.c: -------------------------------------------------------------------------------- 1 | /* Include files */ 2 | 3 | #include "Attitude_Control_System_of_Flying_Vehicle_sfun.h" 4 | #include "Attitude_Control_System_of_Flying_Vehicle_sfun_debug_macros.h" 5 | #include "c2_Attitude_Control_System_of_Flying_Vehicle.h" 6 | 7 | /* Type Definitions */ 8 | 9 | /* Named Constants */ 10 | 11 | /* Variable Declarations */ 12 | 13 | /* Variable Definitions */ 14 | uint32_T _Attitude_Control_System_of_Flying_VehicleMachineNumber_; 15 | 16 | /* Function Declarations */ 17 | 18 | /* Function Definitions */ 19 | void Attitude_Control_System_of_Flying_Vehicle_initializer(void) 20 | { 21 | } 22 | 23 | void Attitude_Control_System_of_Flying_Vehicle_terminator(void) 24 | { 25 | } 26 | 27 | /* SFunction Glue Code */ 28 | unsigned int sf_Attitude_Control_System_of_Flying_Vehicle_method_dispatcher 29 | (SimStruct *simstructPtr, unsigned int chartFileNumber, const char* specsCksum, 30 | int_T method, void *data) 31 | { 32 | if (chartFileNumber==2) { 33 | c2_Attitude_Control_System_of_Flying_Vehicle_method_dispatcher(simstructPtr, 34 | method, data); 35 | return 1; 36 | } 37 | 38 | return 0; 39 | } 40 | 41 | unsigned int sf_Attitude_Control_System_of_Flying_Vehicle_process_check_sum_call 42 | ( int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ) 43 | { 44 | 45 | #ifdef MATLAB_MEX_FILE 46 | 47 | char commandName[20]; 48 | if (nrhs<1 || !mxIsChar(prhs[0]) ) 49 | return 0; 50 | 51 | /* Possible call to get the checksum */ 52 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 53 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 54 | if (strcmp(commandName,"sf_get_check_sum")) 55 | return 0; 56 | plhs[0] = mxCreateDoubleMatrix( 1,4,mxREAL); 57 | if (nrhs>1 && mxIsChar(prhs[1])) { 58 | mxGetString(prhs[1], commandName,sizeof(commandName)/sizeof(char)); 59 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 60 | if (!strcmp(commandName,"machine")) { 61 | ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(4201767575U); 62 | ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(3469511991U); 63 | ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(688184872U); 64 | ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(426639782U); 65 | } else if (nrhs==3 && !strcmp(commandName,"chart")) { 66 | unsigned int chartFileNumber; 67 | chartFileNumber = (unsigned int)mxGetScalar(prhs[2]); 68 | switch (chartFileNumber) { 69 | case 2: 70 | { 71 | extern void 72 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_check_sum 73 | (mxArray *plhs[]); 74 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_check_sum(plhs); 75 | break; 76 | } 77 | 78 | default: 79 | ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(0.0); 80 | ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(0.0); 81 | ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(0.0); 82 | ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(0.0); 83 | } 84 | } else if (!strcmp(commandName,"target")) { 85 | ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(3429898665U); 86 | ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(479754071U); 87 | ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(3100092396U); 88 | ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(1773797558U); 89 | } else { 90 | return 0; 91 | } 92 | } else { 93 | ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(380090697U); 94 | ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(3792842779U); 95 | ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2557435320U); 96 | ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(3751966968U); 97 | } 98 | 99 | return 1; 100 | 101 | #else 102 | 103 | return 0; 104 | 105 | #endif 106 | 107 | } 108 | 109 | unsigned int sf_Attitude_Control_System_of_Flying_Vehicle_autoinheritance_info 110 | ( int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ) 111 | { 112 | 113 | #ifdef MATLAB_MEX_FILE 114 | 115 | char commandName[32]; 116 | char aiChksum[64]; 117 | if (nrhs<3 || !mxIsChar(prhs[0]) ) 118 | return 0; 119 | 120 | /* Possible call to get the autoinheritance_info */ 121 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 122 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 123 | if (strcmp(commandName,"get_autoinheritance_info")) 124 | return 0; 125 | mxGetString(prhs[2], aiChksum,sizeof(aiChksum)/sizeof(char)); 126 | aiChksum[(sizeof(aiChksum)/sizeof(char)-1)] = '\0'; 127 | 128 | { 129 | unsigned int chartFileNumber; 130 | chartFileNumber = (unsigned int)mxGetScalar(prhs[1]); 131 | switch (chartFileNumber) { 132 | case 2: 133 | { 134 | if (strcmp(aiChksum, "84tplOCPNkmE4ZmY8yoaPB") == 0) { 135 | extern mxArray 136 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_autoinheritance_info 137 | (void); 138 | plhs[0] = 139 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_autoinheritance_info 140 | (); 141 | break; 142 | } 143 | 144 | plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL); 145 | break; 146 | } 147 | 148 | default: 149 | plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL); 150 | } 151 | } 152 | 153 | return 1; 154 | 155 | #else 156 | 157 | return 0; 158 | 159 | #endif 160 | 161 | } 162 | 163 | unsigned int 164 | sf_Attitude_Control_System_of_Flying_Vehicle_get_eml_resolved_functions_info 165 | ( int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ) 166 | { 167 | 168 | #ifdef MATLAB_MEX_FILE 169 | 170 | char commandName[64]; 171 | if (nrhs<2 || !mxIsChar(prhs[0])) 172 | return 0; 173 | 174 | /* Possible call to get the get_eml_resolved_functions_info */ 175 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 176 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 177 | if (strcmp(commandName,"get_eml_resolved_functions_info")) 178 | return 0; 179 | 180 | { 181 | unsigned int chartFileNumber; 182 | chartFileNumber = (unsigned int)mxGetScalar(prhs[1]); 183 | switch (chartFileNumber) { 184 | case 2: 185 | { 186 | extern const mxArray 187 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_eml_resolved_functions_info 188 | (void); 189 | mxArray *persistentMxArray = (mxArray *) 190 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_eml_resolved_functions_info 191 | (); 192 | plhs[0] = mxDuplicateArray(persistentMxArray); 193 | mxDestroyArray(persistentMxArray); 194 | break; 195 | } 196 | 197 | default: 198 | plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL); 199 | } 200 | } 201 | 202 | return 1; 203 | 204 | #else 205 | 206 | return 0; 207 | 208 | #endif 209 | 210 | } 211 | 212 | unsigned int sf_Attitude_Control_System_of_Flying_Vehicle_third_party_uses_info( 213 | int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ) 214 | { 215 | char commandName[64]; 216 | char tpChksum[64]; 217 | if (nrhs<3 || !mxIsChar(prhs[0])) 218 | return 0; 219 | 220 | /* Possible call to get the third_party_uses_info */ 221 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 222 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 223 | mxGetString(prhs[2], tpChksum,sizeof(tpChksum)/sizeof(char)); 224 | tpChksum[(sizeof(tpChksum)/sizeof(char)-1)] = '\0'; 225 | if (strcmp(commandName,"get_third_party_uses_info")) 226 | return 0; 227 | 228 | { 229 | unsigned int chartFileNumber; 230 | chartFileNumber = (unsigned int)mxGetScalar(prhs[1]); 231 | switch (chartFileNumber) { 232 | case 2: 233 | { 234 | if (strcmp(tpChksum, "s9DmYBHW33YRnCxJelKoAYH") == 0) { 235 | extern mxArray 236 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_third_party_uses_info 237 | (void); 238 | plhs[0] = 239 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_third_party_uses_info 240 | (); 241 | break; 242 | } 243 | } 244 | 245 | default: 246 | plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL); 247 | } 248 | } 249 | 250 | return 1; 251 | } 252 | 253 | unsigned int sf_Attitude_Control_System_of_Flying_Vehicle_jit_fallback_info( int 254 | nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ) 255 | { 256 | char commandName[64]; 257 | char tpChksum[64]; 258 | if (nrhs<3 || !mxIsChar(prhs[0])) 259 | return 0; 260 | 261 | /* Possible call to get the jit_fallback_info */ 262 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 263 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 264 | mxGetString(prhs[2], tpChksum,sizeof(tpChksum)/sizeof(char)); 265 | tpChksum[(sizeof(tpChksum)/sizeof(char)-1)] = '\0'; 266 | if (strcmp(commandName,"get_jit_fallback_info")) 267 | return 0; 268 | 269 | { 270 | unsigned int chartFileNumber; 271 | chartFileNumber = (unsigned int)mxGetScalar(prhs[1]); 272 | switch (chartFileNumber) { 273 | case 2: 274 | { 275 | if (strcmp(tpChksum, "s9DmYBHW33YRnCxJelKoAYH") == 0) { 276 | extern mxArray 277 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_jit_fallback_info 278 | (void); 279 | plhs[0] = 280 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_jit_fallback_info(); 281 | break; 282 | } 283 | } 284 | 285 | default: 286 | plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL); 287 | } 288 | } 289 | 290 | return 1; 291 | } 292 | 293 | unsigned int 294 | sf_Attitude_Control_System_of_Flying_Vehicle_updateBuildInfo_args_info( int 295 | nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[] ) 296 | { 297 | char commandName[64]; 298 | char tpChksum[64]; 299 | if (nrhs<3 || !mxIsChar(prhs[0])) 300 | return 0; 301 | 302 | /* Possible call to get the updateBuildInfo_args_info */ 303 | mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char)); 304 | commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; 305 | mxGetString(prhs[2], tpChksum,sizeof(tpChksum)/sizeof(char)); 306 | tpChksum[(sizeof(tpChksum)/sizeof(char)-1)] = '\0'; 307 | if (strcmp(commandName,"get_updateBuildInfo_args_info")) 308 | return 0; 309 | 310 | { 311 | unsigned int chartFileNumber; 312 | chartFileNumber = (unsigned int)mxGetScalar(prhs[1]); 313 | switch (chartFileNumber) { 314 | case 2: 315 | { 316 | if (strcmp(tpChksum, "s9DmYBHW33YRnCxJelKoAYH") == 0) { 317 | extern mxArray 318 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_updateBuildInfo_args_info 319 | (void); 320 | plhs[0] = 321 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_updateBuildInfo_args_info 322 | (); 323 | break; 324 | } 325 | } 326 | 327 | default: 328 | plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL); 329 | } 330 | } 331 | 332 | return 1; 333 | } 334 | 335 | void Attitude_Control_System_of_Flying_Vehicle_debug_initialize(struct 336 | SfDebugInstanceStruct* debugInstance) 337 | { 338 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_ = 339 | sf_debug_initialize_machine(debugInstance, 340 | "Attitude_Control_System_of_Flying_Vehicle","sfun",0,4,0,0,0); 341 | sf_debug_set_machine_event_thresholds(debugInstance, 342 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,0,0); 343 | sf_debug_set_machine_data_thresholds(debugInstance, 344 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,0); 345 | } 346 | 347 | void Attitude_Control_System_of_Flying_Vehicle_register_exported_symbols 348 | (SimStruct* S) 349 | { 350 | } 351 | 352 | static mxArray* sRtwOptimizationInfoStruct= NULL; 353 | typedef struct SfOptimizationInfoFlagsTag { 354 | boolean_T isRtwGen; 355 | boolean_T isModelRef; 356 | boolean_T isExternal; 357 | } SfOptimizationInfoFlags; 358 | 359 | static SfOptimizationInfoFlags sOptimizationInfoFlags; 360 | void unload_Attitude_Control_System_of_Flying_Vehicle_optimization_info(void); 361 | mxArray* load_Attitude_Control_System_of_Flying_Vehicle_optimization_info 362 | (boolean_T isRtwGen, boolean_T isModelRef, boolean_T isExternal) 363 | { 364 | if (sOptimizationInfoFlags.isRtwGen != isRtwGen || 365 | sOptimizationInfoFlags.isModelRef != isModelRef || 366 | sOptimizationInfoFlags.isExternal != isExternal) { 367 | unload_Attitude_Control_System_of_Flying_Vehicle_optimization_info(); 368 | } 369 | 370 | sOptimizationInfoFlags.isRtwGen = isRtwGen; 371 | sOptimizationInfoFlags.isModelRef = isModelRef; 372 | sOptimizationInfoFlags.isExternal = isExternal; 373 | if (sRtwOptimizationInfoStruct==NULL) { 374 | sRtwOptimizationInfoStruct = sf_load_rtw_optimization_info( 375 | "Attitude_Control_System_of_Flying_Vehicle", 376 | "Attitude_Control_System_of_Flying_Vehicle"); 377 | mexMakeArrayPersistent(sRtwOptimizationInfoStruct); 378 | } 379 | 380 | return(sRtwOptimizationInfoStruct); 381 | } 382 | 383 | void unload_Attitude_Control_System_of_Flying_Vehicle_optimization_info(void) 384 | { 385 | if (sRtwOptimizationInfoStruct!=NULL) { 386 | mxDestroyArray(sRtwOptimizationInfoStruct); 387 | sRtwOptimizationInfoStruct = NULL; 388 | } 389 | } 390 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/Attitude_Control_System_of_Flying_Vehicle_sfun_debug_macros.h: -------------------------------------------------------------------------------- 1 | #ifndef __SF_DEBUG_MACROS_H__ 2 | #define __SF_DEBUG_MACROS_H__ 3 | extern unsigned int _Attitude_Control_System_of_Flying_VehicleMachineNumber_; 4 | #define _SFD_SET_DATA_VALUE_PTR(v1,v2)\ 5 | sf_debug_set_instance_data_value_ptr(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1,(void *)(v2),NULL); 6 | #define _SFD_UNSET_DATA_VALUE_PTR(v1)\ 7 | sf_debug_unset_instance_data_value_ptr(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1); 8 | #define _SFD_SET_DATA_VALUE_PTR_VAR_DIM(v1,v2,v3)\ 9 | sf_debug_set_instance_data_value_ptr(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1,(void *)(v2),(void *)(v3)); 10 | #define _SFD_DATA_RANGE_CHECK_MIN_MAX(dVal,dNum,objectTypeEnum,objectNumber,activeEventNumber,isFasterRuntimeOn,dMin,dMax,ssid,offset,length)\ 11 | sf_debug_data_range_error_wrapper_min_max(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 12 | CHARTINSTANCE_CHARTNUMBER,\ 13 | CHARTINSTANCE_INSTANCENUMBER,\ 14 | dNum,(double)(dVal),\ 15 | (unsigned int)objectTypeEnum,(unsigned int)objectNumber,(int)activeEventNumber,_sfTime_,(bool)isFasterRuntimeOn,(double)dMin,(double)dMax,ssid,offset,length) 16 | #define _SFD_DATA_RANGE_CHECK_MIN(dVal,dNum,objectTypeEnum,objectNumber,activeEventNumber,isFasterRuntimeOn,dMin,ssid,offset,length)\ 17 | sf_debug_data_range_error_wrapper_min(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 18 | CHARTINSTANCE_CHARTNUMBER,\ 19 | CHARTINSTANCE_INSTANCENUMBER,\ 20 | dNum,(double)(dVal),\ 21 | (unsigned int)objectTypeEnum,(unsigned int)objectNumber,(int)activeEventNumber,_sfTime_,(bool)isFasterRuntimeOn,(double)dMin,ssid,offset,length) 22 | #define _SFD_DATA_RANGE_CHECK_MAX(dVal,dNum,objectTypeEnum,objectNumber,activeEventNumber,isFasterRuntimeOn,dMax,ssid,offset,length)\ 23 | sf_debug_data_range_error_wrapper_max(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 24 | CHARTINSTANCE_CHARTNUMBER,\ 25 | CHARTINSTANCE_INSTANCENUMBER,\ 26 | dNum,(double)(dVal),\ 27 | (unsigned int)objectTypeEnum,(unsigned int)objectNumber,(int)activeEventNumber,_sfTime_,(bool)isFasterRuntimeOn,(double)dMax,ssid,offset,length) 28 | #define _SFD_DATA_RANGE_CHECK(dVal,dNum,objectTypeEnum,objectNumber,activeEventNumber,isFasterRuntimeOn)\ 29 | sf_debug_data_range_wrapper(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 30 | CHARTINSTANCE_CHARTNUMBER,\ 31 | CHARTINSTANCE_INSTANCENUMBER,\ 32 | dNum,(double)(dVal),\ 33 | (unsigned int)objectTypeEnum,(unsigned int)objectNumber,(int)activeEventNumber,_sfTime_,(bool)isFasterRuntimeOn) 34 | #define _SFD_DATA_READ_BEFORE_WRITE_ERROR(dNum,objectTypeEnum,objectNumber,activeEventNumber,isFasterRuntimeOn)\ 35 | sf_debug_read_before_write_error(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 36 | CHARTINSTANCE_CHARTNUMBER,\ 37 | CHARTINSTANCE_INSTANCENUMBER,\ 38 | (unsigned int)(dNum),\ 39 | (unsigned int)objectTypeEnum,(unsigned int)objectNumber,(int)activeEventNumber,_sfTime_,(bool)isFasterRuntimeOn) 40 | #define _SFD_ARRAY_BOUNDS_CHECK(v1,v2,v3,v4,v5,v6) \ 41 | sf_debug_data_array_bounds_error_check(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 42 | CHARTINSTANCE_CHARTNUMBER,\ 43 | CHARTINSTANCE_INSTANCENUMBER,\ 44 | (v1),(int)(v2),(int)(v3),(int)(v4),(int)(v5),(int)(v6)) 45 | #define _SFD_RUNTIME_SIZE_MISMATCH_CHECK(v1,v2,v3,v4,v5) \ 46 | sf_debug_data_runtime_size_mismatch_error_check(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 47 | CHARTINSTANCE_CHARTNUMBER,\ 48 | CHARTINSTANCE_INSTANCENUMBER,\ 49 | (v1),(v2),(unsigned int)(v3),(int)(v4),(int)(v5)) 50 | #define _SFD_EML_ARRAY_BOUNDS_CHECK(v1,v2,v3,v4,v5,v6) \ 51 | sf_debug_eml_data_array_bounds_error_check(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 52 | CHARTINSTANCE_CHARTNUMBER,\ 53 | CHARTINSTANCE_INSTANCENUMBER,\ 54 | (v1),(int)(v2),(int)(v3),(int)(v4),(int)(v5),(int)(v6)) 55 | #ifdef INT_TYPE_64_IS_SUPPORTED 56 | #define _SFD_EML_ARRAY_BOUNDS_CHECK_INT64(v1,v2,v3,v4,v5,v6) \ 57 | sf_debug_eml_data_array_bounds_error_check_int64(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 58 | CHARTINSTANCE_CHARTNUMBER,\ 59 | CHARTINSTANCE_INSTANCENUMBER,\ 60 | (v1),(int64_T)(v2),(int)(v3),(int)(v4),(int)(v5),(int)(v6)) 61 | #endif 62 | #define _SFD_INTEGER_CHECK(v1,v2) \ 63 | sf_debug_integer_check(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 64 | CHARTINSTANCE_CHARTNUMBER,\ 65 | CHARTINSTANCE_INSTANCENUMBER,\ 66 | (v1),(double)(v2)) 67 | #define _SFD_NOT_NAN_CHECK(v1,v2) \ 68 | sf_debug_not_nan_check(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 69 | CHARTINSTANCE_CHARTNUMBER,\ 70 | CHARTINSTANCE_INSTANCENUMBER,\ 71 | (v1),(double)(v2)) 72 | #define _SFD_NON_NEGATIVE_CHECK(v1,v2) \ 73 | sf_debug_non_negative_check(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 74 | CHARTINSTANCE_CHARTNUMBER,\ 75 | CHARTINSTANCE_INSTANCENUMBER,\ 76 | (v1),(double)(v2)) 77 | #define _SFD_CAST_TO_UINT8(v1) \ 78 | sf_debug_cast_to_uint8_T(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 79 | CHARTINSTANCE_CHARTNUMBER,\ 80 | CHARTINSTANCE_INSTANCENUMBER,\ 81 | (v1),0,0) 82 | #define _SFD_CAST_TO_UINT16(v1) \ 83 | sf_debug_cast_to_uint16_T(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 84 | CHARTINSTANCE_CHARTNUMBER,\ 85 | CHARTINSTANCE_INSTANCENUMBER,\ 86 | (v1),0,0) 87 | #define _SFD_CAST_TO_UINT32(v1) \ 88 | sf_debug_cast_to_uint32_T(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 89 | CHARTINSTANCE_CHARTNUMBER,\ 90 | CHARTINSTANCE_INSTANCENUMBER,\ 91 | (v1),0,0) 92 | #define _SFD_CAST_TO_INT8(v1) \ 93 | sf_debug_cast_to_int8_T(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 94 | CHARTINSTANCE_CHARTNUMBER,\ 95 | CHARTINSTANCE_INSTANCENUMBER,\ 96 | (v1),0,0) 97 | #define _SFD_CAST_TO_INT16(v1) \ 98 | sf_debug_cast_to_int16_T(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 99 | CHARTINSTANCE_CHARTNUMBER,\ 100 | CHARTINSTANCE_INSTANCENUMBER,\ 101 | (v1),0,0) 102 | #define _SFD_CAST_TO_INT32(v1) \ 103 | sf_debug_cast_to_int32_T(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 104 | CHARTINSTANCE_CHARTNUMBER,\ 105 | CHARTINSTANCE_INSTANCENUMBER,\ 106 | (v1),0,0) 107 | #define _SFD_CAST_TO_SINGLE(v1) \ 108 | sf_debug_cast_to_real32_T(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 109 | CHARTINSTANCE_CHARTNUMBER,\ 110 | CHARTINSTANCE_INSTANCENUMBER,\ 111 | (v1),0,0) 112 | #define _SFD_ANIMATE() sf_debug_animate(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 113 | CHARTINSTANCE_CHARTNUMBER,\ 114 | CHARTINSTANCE_INSTANCENUMBER) 115 | #define _SFD_CHART_CALL(v1,v2,v3,v4) sf_debug_call(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 116 | CHARTINSTANCE_CHARTNUMBER,\ 117 | CHARTINSTANCE_INSTANCENUMBER,\ 118 | CHART_OBJECT,v1,v2,v3,v4,\ 119 | 0,NULL,_sfTime_,1) 120 | #define _SFD_MESSAGE_POST_CALL(v1) sf_debug_register_message_post_receive_info(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 121 | CHARTINSTANCE_CHARTNUMBER,\ 122 | CHARTINSTANCE_INSTANCENUMBER,\ 123 | v1,_sfTime_,1) 124 | #define _SFD_MESSAGE_RECEIVE_CALL(v1) sf_debug_register_message_post_receive_info(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 125 | CHARTINSTANCE_CHARTNUMBER,\ 126 | CHARTINSTANCE_INSTANCENUMBER,\ 127 | v1,_sfTime_,0) 128 | #define _SFD_CC_CALL(v2,v3,v4) _SFD_CHART_CALL(CHART_OBJECT,v2,v3,v4) 129 | #define _SFD_CS_CALL(v2,v3,v4) _SFD_CHART_CALL(STATE_OBJECT,v2,v3,v4) 130 | #define _SFD_CT_CALL(v2,v3,v4) _SFD_CHART_CALL(TRANSITION_OBJECT,v2,v3,v4) 131 | #define _SFD_CE_CALL(v2,v3,v4) _SFD_CHART_CALL(EVENT_OBJECT,v2,v3,v4) 132 | #define _SFD_CM_CALL(v2,v3,v4) _SFD_CHART_CALL(MESSAGE_OBJECT,v2,v3,v4) 133 | #define _SFD_EML_CALL(v1,v2,v3) eml_debug_line_call(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 134 | CHARTINSTANCE_CHARTNUMBER,\ 135 | CHARTINSTANCE_INSTANCENUMBER,\ 136 | v1,v2,\ 137 | v3,_sfTime_,0) 138 | #define _SFD_SCRIPT_TRANSLATION(v1,v2,v3,v4) sf_debug_set_script_translation(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 139 | v1,v2,v3,v4) 140 | #define _SFD_SCRIPT_CALL(v1,v2,v3) eml_debug_line_call(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 141 | CHARTINSTANCE_CHARTNUMBER,\ 142 | CHARTINSTANCE_INSTANCENUMBER,\ 143 | v1,v2,\ 144 | v3,_sfTime_,1) 145 | #define _SFD_CCP_CALL(v3,v4,v5,v6) sf_debug_call(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 146 | CHARTINSTANCE_CHARTNUMBER,\ 147 | CHARTINSTANCE_INSTANCENUMBER,\ 148 | CHART_OBJECT,TRANSITION_OBJECT,TRANSITION_GUARD_COVERAGE_TAG,v3,v6,\ 149 | v4,NULL,_sfTime_,(unsigned int)(v5)) 150 | #define _SFD_STATE_TEMPORAL_THRESHOLD(v1,v2,v4) sf_debug_temporal_threshold(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 151 | CHARTINSTANCE_CHARTNUMBER,\ 152 | CHARTINSTANCE_INSTANCENUMBER,\ 153 | (unsigned int)(v1),(v2),STATE_OBJECT,(v4)) 154 | #define _SFD_TRANS_TEMPORAL_THRESHOLD(v1,v2,v4) sf_debug_temporal_threshold(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 155 | CHARTINSTANCE_CHARTNUMBER,\ 156 | CHARTINSTANCE_INSTANCENUMBER,\ 157 | (unsigned int)(v1),(v2),TRANSITION_OBJECT,(v4)) 158 | #define CV_EVAL(v1,v2,v3,v4) cv_eval_point(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 159 | CHARTINSTANCE_CHARTNUMBER,\ 160 | CHARTINSTANCE_INSTANCENUMBER,\ 161 | (v1),(v2),(v3),(v4)) 162 | #define CV_CHART_EVAL(v2,v3,v4) CV_EVAL(CHART_OBJECT,(v2),(v3),(v4)) 163 | #define CV_STATE_EVAL(v2,v3,v4) CV_EVAL(STATE_OBJECT,(v2),(v3),(v4)) 164 | #define CV_TRANSITION_EVAL(v1,v2) cv_eval_point(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 165 | CHARTINSTANCE_CHARTNUMBER,\ 166 | CHARTINSTANCE_INSTANCENUMBER,\ 167 | TRANSITION_OBJECT,(v1),0,((v2)!=0)) 168 | #define CV_RELATIONAL_EVAL(v1,v2,v3,v4,v5,v6,v7,v8) cv_eval_relational(sfGlobalDebugInstanceStruct,_Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 169 | CHARTINSTANCE_CHARTNUMBER,\ 170 | CHARTINSTANCE_INSTANCENUMBER,\ 171 | (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8)) 172 | #define CV_BASIC_BLOCK_EVAL(v1,v2,v3) cv_eval_basic_block(sfGlobalDebugInstanceStruct,_Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 173 | CHARTINSTANCE_CHARTNUMBER,\ 174 | CHARTINSTANCE_INSTANCENUMBER,\ 175 | (v1),(v2),(v3)) 176 | #define CV_SATURATION_EVAL(v1,v2,v3,v4,v5) cv_eval_saturation(sfGlobalDebugInstanceStruct,_Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 177 | CHARTINSTANCE_CHARTNUMBER,\ 178 | CHARTINSTANCE_INSTANCENUMBER,\ 179 | (v1),(v2),(v3),(v4),(v5)) 180 | #define CV_SATURATION_ACCUM(v1,v2,v3,v4) cv_saturation_accum(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 181 | CHARTINSTANCE_CHARTNUMBER,\ 182 | CHARTINSTANCE_INSTANCENUMBER,\ 183 | (v1),(v2),(v3),(v4)) 184 | #define CV_TESTOBJECTIVE_EVAL(v1,v2,v3,v4) cv_eval_testobjective(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 185 | CHARTINSTANCE_CHARTNUMBER,\ 186 | CHARTINSTANCE_INSTANCENUMBER,\ 187 | (v1),(v2),(v3),(v4)) 188 | 189 | /* Coverage Macros for MATLAB */ 190 | #define CV_EML_EVAL(v1,v2,v3,v4,v5) cv_eml_eval(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 191 | CHARTINSTANCE_CHARTNUMBER,\ 192 | CHARTINSTANCE_INSTANCENUMBER,\ 193 | (v1),(v2),(v3),(v4),(int)(v5)) 194 | #define CV_EML_FCN(v2,v3) CV_EML_EVAL(CV_EML_FCN_CHECK,(v2),1,(v3),0) 195 | #define CV_EML_TESTOBJECTIVE(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_TESTOBJECTIVE_CHECK,(v2),(v3),(v4),((v5) != 0)) 196 | #define CV_EML_SATURATION(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_SATURATION_CHECK,(v2),(v3),(v4),((v5) != 0)) 197 | #define CV_EML_SATURATION_ACCUM(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_SATURATION_ACCUM_CHECK,(v2),(v3),(v4),(v5)) 198 | #define CV_EML_IF(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_IF_CHECK,(v2),(v3),(v4),((v5) != 0)) 199 | #define CV_EML_FOR(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_FOR_CHECK,(v2),(v3),(v4),(v5)) 200 | #define CV_EML_WHILE(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_WHILE_CHECK,(v2),(v3),(v4),((v5) != 0)) 201 | #define CV_EML_SWITCH(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_SWITCH_CHECK,(v2),(v3),(v4),(v5)) 202 | #define CV_EML_COND(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_COND_CHECK,(v2),(v3),(v4),((v5) != 0)) 203 | #define CV_EML_MCDC(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_MCDC_CHECK,(v2),(v3),(v4),(v5)) 204 | #define CV_SCRIPT_EVAL(v1,v2,v3,v4) cv_script_eval(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 205 | CHARTINSTANCE_CHARTNUMBER,\ 206 | CHARTINSTANCE_INSTANCENUMBER,\ 207 | (v1),(v2),(v3),(int)(v4)) 208 | #define CV_SCRIPT_FCN(v2,v3) CV_SCRIPT_EVAL(CV_SCRIPT_FCN_CHECK,(v2),(v3),0) 209 | #define CV_SCRIPT_TESTOBJECTIVE(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_TESTOBJECTIVE_CHECK,(v2),(v3),((v4) != 0)) 210 | #define CV_SCRIPT_SATURATION(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_SATURATION_CHECK,(v2),(v3),((v4) != 0)) 211 | #define CV_SCRIPT_SATURATION_ACCUM(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_SATURATION_ACCUM_CHECK,(v2),(v3),(v4)) 212 | #define CV_SCRIPT_IF(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_IF_CHECK,(v2),(v3),((v4) != 0)) 213 | #define CV_SCRIPT_FOR(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_FOR_CHECK,(v2),(v3),(v4)) 214 | #define CV_SCRIPT_WHILE(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_WHILE_CHECK,(v2),(v3),((v4) != 0)) 215 | #define CV_SCRIPT_SWITCH(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_SWITCH_CHECK,(v2),(v3),(v4)) 216 | #define CV_SCRIPT_COND(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_COND_CHECK,(v2),(v3),((v4) != 0)) 217 | #define CV_SCRIPT_MCDC(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_MCDC_CHECK,(v2),(v3),(v4)) 218 | 219 | #define _SFD_CV_INIT_EML(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12) cv_eml_init_script(sfGlobalDebugInstanceStruct, \ 220 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 221 | CHARTINSTANCE_CHARTNUMBER,\ 222 | CHARTINSTANCE_INSTANCENUMBER,\ 223 | (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10),(v11),(v12)) 224 | 225 | #define _SFD_CV_INIT_EML_FCN(v1,v2,v3,v4,v5,v6) cv_eml_init_fcn(sfGlobalDebugInstanceStruct, \ 226 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 227 | CHARTINSTANCE_CHARTNUMBER,\ 228 | CHARTINSTANCE_INSTANCENUMBER,\ 229 | (v1),(v2),(v3),(v4),(v5),(v6)) 230 | 231 | #define _SFD_CV_INIT_EML_BASIC_BLOCK(v1,v2,v3,v4,v5) cv_eml_init_basic_block(sfGlobalDebugInstanceStruct, \ 232 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 233 | CHARTINSTANCE_CHARTNUMBER,\ 234 | CHARTINSTANCE_INSTANCENUMBER,\ 235 | (v1),(v2),(v3),(v4),(v5)) 236 | 237 | #define _SFD_CV_INIT_EML_TESTOBJECTIVE(v1,v2,v3,v4,v5,v6,v7) cv_eml_init_testobjective(sfGlobalDebugInstanceStruct, \ 238 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 239 | CHARTINSTANCE_CHARTNUMBER,\ 240 | CHARTINSTANCE_INSTANCENUMBER,\ 241 | (v1),(v2),(v3),(v4),(v5),(v6),(v7)) 242 | 243 | #define _SFD_CV_INIT_EML_SATURATION(v1,v2,v3,v4,v5,v6) cv_eml_init_saturation(sfGlobalDebugInstanceStruct, \ 244 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 245 | CHARTINSTANCE_CHARTNUMBER,\ 246 | CHARTINSTANCE_INSTANCENUMBER,\ 247 | (v1),(v2),(v3),(v4),(v5),(v6)) 248 | 249 | #define _SFD_CV_INIT_EML_IF(v1,v2,v3,v4,v5,v6,v7) cv_eml_init_if(sfGlobalDebugInstanceStruct, \ 250 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 251 | CHARTINSTANCE_CHARTNUMBER,\ 252 | CHARTINSTANCE_INSTANCENUMBER,\ 253 | (v1),(v2),(v3),(v4),(v5),(v6),(v7)) 254 | 255 | #define _SFD_CV_INIT_EML_FOR(v1,v2,v3,v4,v5,v6) cv_eml_init_for(sfGlobalDebugInstanceStruct, \ 256 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 257 | CHARTINSTANCE_CHARTNUMBER,\ 258 | CHARTINSTANCE_INSTANCENUMBER,\ 259 | (v1),(v2),(v3),(v4),(v5),(v6)) 260 | 261 | #define _SFD_CV_INIT_EML_WHILE(v1,v2,v3,v4,v5,v6) cv_eml_init_while(sfGlobalDebugInstanceStruct, \ 262 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 263 | CHARTINSTANCE_CHARTNUMBER,\ 264 | CHARTINSTANCE_INSTANCENUMBER,\ 265 | (v1),(v2),(v3),(v4),(v5),(v6)) 266 | 267 | #define _SFD_CV_INIT_EML_MCDC(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11) cv_eml_init_mcdc(sfGlobalDebugInstanceStruct, \ 268 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 269 | CHARTINSTANCE_CHARTNUMBER,\ 270 | CHARTINSTANCE_INSTANCENUMBER,\ 271 | (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10),(v11)) 272 | 273 | #define _SFD_CV_INIT_EML_RELATIONAL(v1,v2,v3,v4,v5,v6,v7) cv_eml_init_relational(sfGlobalDebugInstanceStruct, \ 274 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 275 | CHARTINSTANCE_CHARTNUMBER,\ 276 | CHARTINSTANCE_INSTANCENUMBER,\ 277 | (v1),(v2),(v3),(v4),(v5),(v6),(v7)) 278 | 279 | #define _SFD_CV_INIT_EML_SWITCH(v1,v2,v3,v4,v5,v6,v7,v8,v9) cv_eml_init_switch(sfGlobalDebugInstanceStruct, \ 280 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 281 | CHARTINSTANCE_CHARTNUMBER,\ 282 | CHARTINSTANCE_INSTANCENUMBER,\ 283 | (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9)) 284 | 285 | #define _SFD_CV_INIT_SCRIPT(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11) cv_script_init_script(sfGlobalDebugInstanceStruct, \ 286 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 287 | CHARTINSTANCE_CHARTNUMBER,\ 288 | CHARTINSTANCE_INSTANCENUMBER,\ 289 | (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10),(v11)) 290 | 291 | #define _SFD_CV_INIT_SCRIPT_FCN(v1,v2,v3,v4,v5,v6) cv_script_init_fcn(sfGlobalDebugInstanceStruct, \ 292 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 293 | CHARTINSTANCE_CHARTNUMBER,\ 294 | CHARTINSTANCE_INSTANCENUMBER,\ 295 | (v1),(v2),(v3),(v4),(v5),(v6)) 296 | 297 | #define _SFD_CV_INIT_SCRIPT_BASIC_BLOCK(v1,v2,v3,v4,v5) cv_script_init_basic_block(sfGlobalDebugInstanceStruct, \ 298 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 299 | CHARTINSTANCE_CHARTNUMBER,\ 300 | CHARTINSTANCE_INSTANCENUMBER,\ 301 | (v1),(v2),(v3),(v4),(v5)) 302 | 303 | #define _SFD_CV_INIT_SCRIPT_TESTOBJECTIVE(v1,v2,v3,v4,v5,v6) cv_script_init_testobjective(sfGlobalDebugInstanceStruct, \ 304 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 305 | CHARTINSTANCE_CHARTNUMBER,\ 306 | CHARTINSTANCE_INSTANCENUMBER,\ 307 | (v1),(v2),(v3),(v4),(v5),(v6)) 308 | 309 | #define _SFD_CV_INIT_SCRIPT_SATURATION(v1,v2,v3,v4,v5) cv_script_init_saturation(sfGlobalDebugInstanceStruct, \ 310 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 311 | CHARTINSTANCE_CHARTNUMBER,\ 312 | CHARTINSTANCE_INSTANCENUMBER,\ 313 | (v1),(v2),(v3),(v4),(v5)) 314 | 315 | #define _SFD_CV_INIT_SCRIPT_IF(v1,v2,v3,v4,v5,v6) cv_script_init_if(sfGlobalDebugInstanceStruct, \ 316 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 317 | CHARTINSTANCE_CHARTNUMBER,\ 318 | CHARTINSTANCE_INSTANCENUMBER,\ 319 | (v1),(v2),(v3),(v4),(v5),(v6)) 320 | 321 | #define _SFD_CV_INIT_SCRIPT_FOR(v1,v2,v3,v4,v5) cv_script_init_for(sfGlobalDebugInstanceStruct, \ 322 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 323 | CHARTINSTANCE_CHARTNUMBER,\ 324 | CHARTINSTANCE_INSTANCENUMBER,\ 325 | (v1),(v2),(v3),(v4),(v5)) 326 | 327 | #define _SFD_CV_INIT_SCRIPT_WHILE(v1,v2,v3,v4,v5) cv_script_init_while(sfGlobalDebugInstanceStruct, \ 328 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 329 | CHARTINSTANCE_CHARTNUMBER,\ 330 | CHARTINSTANCE_INSTANCENUMBER,\ 331 | (v1),(v2),(v3),(v4),(v5)) 332 | 333 | #define _SFD_CV_INIT_SCRIPT_MCDC(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10) cv_script_init_mcdc(sfGlobalDebugInstanceStruct, \ 334 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 335 | CHARTINSTANCE_CHARTNUMBER,\ 336 | CHARTINSTANCE_INSTANCENUMBER,\ 337 | (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10)) 338 | 339 | #define _SFD_CV_INIT_SCRIPT_RELATIONAL(v1,v2,v3,v4,v5,v6) cv_script_init_relational(sfGlobalDebugInstanceStruct, \ 340 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 341 | CHARTINSTANCE_CHARTNUMBER,\ 342 | CHARTINSTANCE_INSTANCENUMBER,\ 343 | (v1),(v2),(v3),(v4),(v5),(v6)) 344 | 345 | #define _SFD_CV_INIT_SCRIPT_SWITCH(v1,v2,v3,v4,v5,v6,v7,v8) cv_script_init_switch(sfGlobalDebugInstanceStruct, \ 346 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 347 | CHARTINSTANCE_CHARTNUMBER,\ 348 | CHARTINSTANCE_INSTANCENUMBER,\ 349 | (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8)) 350 | 351 | 352 | #define _SFD_SET_DATA_PROPS(dataNumber,dataScope,isInputData,isOutputData,dataName)\ 353 | sf_debug_set_chart_data_props(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,\ 354 | (dataNumber),(dataScope),(isInputData),(isOutputData),(dataName)) 355 | #define _SFD_SET_DATA_COMPILED_PROPS(dataNumber,dataType,numDims,dimArray,isFixedPoint,isSigned,wordLength,bias,slope,exponent,complexity,mexOutFcn, mexInFcn)\ 356 | sf_debug_set_chart_data_compiled_props(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,\ 357 | (dataNumber),(dataType),(numDims),(dimArray),(isFixedPoint),(isSigned),(wordLength),(bias),(slope),(exponent),(complexity),(mexOutFcn),(mexInFcn)) 358 | #define _SFD_STATE_INFO(v1,v2,v3)\ 359 | sf_debug_set_chart_state_info(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2),(v3)) 360 | #define _SFD_CH_SUBSTATE_INDEX(v1,v2)\ 361 | sf_debug_set_chart_substate_index(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2)) 362 | #define _SFD_ST_SUBSTATE_INDEX(v1,v2,v3)\ 363 | sf_debug_set_chart_state_substate_index(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2),(v3)) 364 | #define _SFD_ST_SUBSTATE_COUNT(v1,v2)\ 365 | sf_debug_set_chart_state_substate_count(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2)) 366 | #define _SFD_DATA_CHANGE_EVENT_COUNT(v1,v2) \ 367 | sf_debug_set_number_of_data_with_change_event_for_chart(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,\ 368 | (v1),(v2)) 369 | #define _SFD_STATE_ENTRY_EVENT_COUNT(v1,v2) \ 370 | sf_debug_set_number_of_states_with_entry_event_for_chart(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,\ 371 | (v1),(v2)) 372 | #define _SFD_STATE_EXIT_EVENT_COUNT(v1,v2) \ 373 | sf_debug_set_number_of_states_with_exit_event_for_chart(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,\ 374 | (v1),(v2)) 375 | #define _SFD_EVENT_SCOPE(v1,v2)\ 376 | sf_debug_set_chart_event_scope(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 377 | CHARTINSTANCE_CHARTNUMBER,(v1),(v2)) 378 | 379 | #define _SFD_CH_SUBSTATE_COUNT(v1) \ 380 | sf_debug_set_chart_substate_count(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1)) 381 | #define _SFD_CH_SUBSTATE_DECOMP(v1) \ 382 | sf_debug_set_chart_decomposition(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1)) 383 | 384 | #define _SFD_CV_INIT_CHART(v1,v2,v3,v4)\ 385 | sf_debug_cv_init_chart(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,\ 386 | CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4)) 387 | 388 | #define _SFD_CV_INIT_STATE(v1,v2,v3,v4,v5,v6,v7,v8)\ 389 | sf_debug_cv_init_state(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,CHARTINSTANCE_CHARTNUMBER,\ 390 | CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8)) 391 | 392 | #define _SFD_CV_INIT_TRANSITION_SATURATION(v1,v2,v3,v4)\ 393 | sf_debug_cv_init_saturation(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 394 | CHARTINSTANCE_CHARTNUMBER,\ 395 | CHARTINSTANCE_INSTANCENUMBER,\ 396 | TRANSITION_OBJECT,(v1),(v2),(v3),(v4)) 397 | 398 | #define _SFD_CV_INIT_TRANSITION_RELATIONALOP(v1,v2,v3,v4,v5,v6)\ 399 | sf_debug_cv_init_relationalop(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 400 | CHARTINSTANCE_CHARTNUMBER,\ 401 | CHARTINSTANCE_INSTANCENUMBER,\ 402 | TRANSITION_OBJECT,(v1),(v2),(v3),(v4),(v5),(v6)) 403 | 404 | #define _SFD_CV_INIT_STATE_SATURATION(v1,v2,v3,v4)\ 405 | sf_debug_cv_init_saturation(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 406 | CHARTINSTANCE_CHARTNUMBER,\ 407 | CHARTINSTANCE_INSTANCENUMBER,\ 408 | STATE_OBJECT, (v1),(v2),(v3),(v4)) 409 | 410 | #define _SFD_CV_INIT_TRANSITION_TESTOBJECTIVE(v1,v2,v3,v4)\ 411 | sf_debug_cv_init_testobjectives(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 412 | CHARTINSTANCE_CHARTNUMBER,\ 413 | CHARTINSTANCE_INSTANCENUMBER,\ 414 | TRANSITION_OBJECT,(v1),(v2),(v3),(v4)) 415 | 416 | #define _SFD_CV_INIT_STATE_TESTOBJECTIVE(v1,v2,v3,v4)\ 417 | sf_debug_cv_init_testobjectives(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 418 | CHARTINSTANCE_CHARTNUMBER,\ 419 | CHARTINSTANCE_INSTANCENUMBER,\ 420 | STATE_OBJECT, (v1),(v2),(v3),(v4)) 421 | 422 | #define _SFD_CV_INIT_TRANS(v1,v2,v3,v4,v5,v6)\ 423 | sf_debug_cv_init_trans(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 424 | CHARTINSTANCE_CHARTNUMBER,\ 425 | CHARTINSTANCE_INSTANCENUMBER,\ 426 | (v1),(v2),(v3),(v4),(v5),(v6)) 427 | #endif 428 | 429 | #define _SFD_SET_MACHINE_DATA_VALUE_PTR(v0,v1,v2) sf_debug_set_machine_data_value_ptr(sfGlobalDebugInstanceStruct,v0,v1,v2) 430 | #define _SFD_STORE_CURRENT_STATE_CONFIGURATION(v0,v1,v2) sf_debug_store_current_state_configuration(sfGlobalDebugInstanceStruct,v0,v1,v2) 431 | #define _SFD_RESTORE_PREVIOUS_STATE_CONFIGURATION(v0,v1,v2) sf_debug_restore_previous_state_configuration(sfGlobalDebugInstanceStruct,v0,v1,v2) 432 | #define _SFD_RESTORE_PREVIOUS_STATE_CONFIGURATION2(v0,v1,v2) sf_debug_restore_previous_state_configuration2(sfGlobalDebugInstanceStruct,v0,v1,v2) 433 | #define _SFD_SYMBOL_SCOPE_PUSH(v0,v1) sf_debug_symbol_scope_push(sfGlobalDebugInstanceStruct,v0,v1) 434 | #define _SFD_SYMBOL_SCOPE_PUSH_EML(v0,v1,v2,v3,v4) sf_debug_symbol_scope_push_eml(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4) 435 | #define _SFD_SYMBOL_SCOPE_POP() sf_debug_symbol_scope_pop(sfGlobalDebugInstanceStruct) 436 | #define _SFD_SYMBOL_SCOPE_ADD(v0,v1,v2) sf_debug_symbol_scope_add(sfGlobalDebugInstanceStruct,v0,v1,v2) 437 | #define _SFD_SYMBOL_SCOPE_ADD_IMPORTABLE(v0,v1,v2,v3) sf_debug_symbol_scope_add_importable(sfGlobalDebugInstanceStruct,v0,v1,v2,v3) 438 | #define _SFD_SYMBOL_SCOPE_ADD_EML(v0,v1,v2) sf_debug_symbol_scope_add_eml(sfGlobalDebugInstanceStruct,v0,v1,v2) 439 | #define _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(v0,v1,v2,v3) sf_debug_symbol_scope_add_eml_importable(sfGlobalDebugInstanceStruct,v0,v1,v2,v3) 440 | #define _SFD_SYMBOL_SCOPE_ADD_DYN(v0,v1,v2,v3,v4,v5) sf_debug_symbol_scope_add_dyn(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4,v5) 441 | #define _SFD_SYMBOL_SCOPE_ADD_DYN_IMPORTABLE(v0,v1,v2,v3,v4,v5,v6) sf_debug_symbol_scope_add_dyn_importable(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4,v5,v6) 442 | #define _SFD_SYMBOL_SCOPE_ADD_EML_DYN(v0,v1,v2,v3,v4,v5) sf_debug_symbol_scope_add_eml_dyn(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4,v5) 443 | #define _SFD_SYMBOL_SCOPE_ADD_EML_DYN_IMPORTABLE(v0,v1,v2,v3,v4,v5,v6) sf_debug_symbol_scope_add_eml_dyn_importable(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4,v5,v6) 444 | #define _SFD_SYMBOL_SCOPE_ADD_EML_DYN_EMX(v0,v1,v2,v3,v4,v5,v6,v7) sf_debug_symbol_scope_add_eml_dyn_emx(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4,v5,v6,v7) 445 | #define _SFD_SYMBOL_SCOPE_ADD_EML_DYN_EMX_IMPORTABLE(v0,v1,v2,v3,v4,v5,v6,v7,v8) sf_debug_symbol_scope_add_eml_dyn_emx_importable(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4,v5,v6,v7,v8) 446 | #define _SFD_SYMBOL_SCOPE_ADD_VERBOSE(v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14) sf_debug_symbol_scope_add_verbose(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14) 447 | #define _SFD_SYMBOL_SWITCH(v0,v1) sf_debug_symbol_switch(sfGlobalDebugInstanceStruct,v0,v1) 448 | #define _SFD_CHECK_FOR_STATE_INCONSISTENCY(v0,v1,v2) sf_debug_check_for_state_inconsistency(sfGlobalDebugInstanceStruct,v0,v1,v2) 449 | #define _SFD_REPORT_STATE_INCONSISTENCY_ERROR(objectTypeEnum,objectNumber,activeEventNumber,isFasterRuntimeOn) \ 450 | sf_debug_report_state_inconsistency_error(sfGlobalDebugInstanceStruct, _Attitude_Control_System_of_Flying_VehicleMachineNumber_,\ 451 | CHARTINSTANCE_CHARTNUMBER,\ 452 | CHARTINSTANCE_INSTANCENUMBER,\ 453 | (unsigned int)objectTypeEnum,(unsigned int)objectNumber,(int)activeEventNumber,_sfTime_,(bool)isFasterRuntimeOn) 454 | #define _SFD_SET_HONOR_BREAKPOINTS(v0) sf_debug_set_honor_breakpoints(sfGlobalDebugInstanceStruct, v0) 455 | #define _SFD_GET_ANIMATION() sf_debug_get_animation(sfGlobalDebugInstanceStruct) 456 | #define _SFD_SET_ANIMATION(v0) sf_debug_set_animation(sfGlobalDebugInstanceStruct,v0) 457 | #define _SFD_SIZE_EQ_CHECK_1D(v0,v1) sf_debug_size_eq_check_1d(sfGlobalDebugInstanceStruct,v0,v1) 458 | #define _SFD_SIZE_EQ_CHECK_ND(v0,v1,v2) sf_debug_size_eq_check_nd(sfGlobalDebugInstanceStruct,v0,v1,v2) 459 | #define _SFD_DIM_SIZE_EQ_CHECK(v0,v1,v2) sf_debug_dim_size_eq_check(sfGlobalDebugInstanceStruct,v0,v1,v2) 460 | #define _SFD_DIM_SIZE_GEQ_CHECK(v0,v1,v2) sf_debug_dim_size_geq_check(sfGlobalDebugInstanceStruct,v0,v1,v2) 461 | #define _SFD_SUB_ASSIGN_SIZE_CHECK_ND(v0,v1,v2,v3) sf_debug_sub_assign_size_check_nd(sfGlobalDebugInstanceStruct,v0,v1,v2,v3) 462 | #define _SFD_FOR_LOOP_VECTOR_CHECK(v0,v1,v2,v3,v4) sf_debug_for_loop_vector_check(sfGlobalDebugInstanceStruct,v0,v1,v2,v3,v4) 463 | #define _SFD_RUNTIME_ERROR_MSGID(v0) sf_debug_runtime_error_msgid(sfGlobalDebugInstanceStruct,v0) 464 | #define _SFD_OVERFLOW_DETECTION(sfDebugOverflowType,sfDebugObjectTypeEnum,ssId,length,offset,objectNumber,activeEventNumber,isFasterRuntimeOn) sf_debug_overflow_detection(sfGlobalDebugInstanceStruct,\ 465 | sfDebugOverflowType, CHARTINSTANCE_INSTANCENUMBER, sfDebugObjectTypeEnum,\ 466 | (unsigned int)ssId, length, offset, (unsigned int)objectNumber,(int)activeEventNumber,_sfTime_,(bool)isFasterRuntimeOn) 467 | -------------------------------------------------------------------------------- /Design Method to Attitude Control System of Flying Vehicle with Dynamic Inversion and Time-Scale Separation/slprj/_sfprj/Attitude_Control_System_of_Flying_Vehicle/_self/sfun/src/c2_Attitude_Control_System_of_Flying_Vehicle.c: -------------------------------------------------------------------------------- 1 | /* Include files */ 2 | 3 | #include "Attitude_Control_System_of_Flying_Vehicle_sfun.h" 4 | #include "c2_Attitude_Control_System_of_Flying_Vehicle.h" 5 | #include "mwmathutil.h" 6 | #define CHARTINSTANCE_CHARTNUMBER (chartInstance->chartNumber) 7 | #define CHARTINSTANCE_INSTANCENUMBER (chartInstance->instanceNumber) 8 | #include "Attitude_Control_System_of_Flying_Vehicle_sfun_debug_macros.h" 9 | #define _SF_MEX_LISTEN_FOR_CTRL_C(S) sf_mex_listen_for_ctrl_c_with_debugger(S, sfGlobalDebugInstanceStruct); 10 | 11 | static void chart_debug_initialization(SimStruct *S, unsigned int 12 | fullDebuggerInitialization); 13 | static void chart_debug_initialize_data_addresses(SimStruct *S); 14 | static const mxArray* sf_opaque_get_hover_data_for_msg(void *chartInstance, 15 | int32_T msgSSID); 16 | 17 | /* Type Definitions */ 18 | 19 | /* Named Constants */ 20 | #define CALL_EVENT (-1) 21 | 22 | /* Variable Declarations */ 23 | 24 | /* Variable Definitions */ 25 | static real_T _sfTime_; 26 | static const char * c2_debug_family_names[13] = { "omega", "A", "angle", 27 | "nargin", "nargout", "omega_x", "omega_y", "omega_z", "theta", "gamma", 28 | "dtheta", "dphi", "dgamma" }; 29 | 30 | /* Function Declarations */ 31 | static void initialize_c2_Attitude_Control_System_of_Flying_Vehicle 32 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 33 | static void initialize_params_c2_Attitude_Control_System_of_Flying_Vehicle 34 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 35 | static void enable_c2_Attitude_Control_System_of_Flying_Vehicle 36 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 37 | static void disable_c2_Attitude_Control_System_of_Flying_Vehicle 38 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 39 | static void c2_update_debugger_state_c2_Attitude_Control_System_of_Flying_Ve 40 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 41 | static const mxArray *get_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle 42 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 43 | static void set_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle 44 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 45 | const mxArray *c2_st); 46 | static void finalize_c2_Attitude_Control_System_of_Flying_Vehicle 47 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 48 | static void sf_gateway_c2_Attitude_Control_System_of_Flying_Vehicle 49 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 50 | static void mdl_start_c2_Attitude_Control_System_of_Flying_Vehicle 51 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 52 | static void initSimStructsc2_Attitude_Control_System_of_Flying_Vehicle 53 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 54 | static void init_script_number_translation(uint32_T c2_machineNumber, uint32_T 55 | c2_chartNumber, uint32_T c2_instanceNumber); 56 | static const mxArray *c2_sf_marshallOut(void *chartInstanceVoid, void *c2_inData); 57 | static real_T c2_emlrt_marshallIn 58 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 59 | const mxArray *c2_b_dgamma, const char_T *c2_identifier); 60 | static real_T c2_b_emlrt_marshallIn 61 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 62 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId); 63 | static void c2_sf_marshallIn(void *chartInstanceVoid, const mxArray 64 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData); 65 | static const mxArray *c2_b_sf_marshallOut(void *chartInstanceVoid, void 66 | *c2_inData); 67 | static void c2_c_emlrt_marshallIn 68 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 69 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId, real_T c2_y[3]); 70 | static void c2_b_sf_marshallIn(void *chartInstanceVoid, const mxArray 71 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData); 72 | static const mxArray *c2_c_sf_marshallOut(void *chartInstanceVoid, void 73 | *c2_inData); 74 | static void c2_d_emlrt_marshallIn 75 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 76 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId, real_T c2_y[9]); 77 | static void c2_c_sf_marshallIn(void *chartInstanceVoid, const mxArray 78 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData); 79 | static const mxArray *c2_d_sf_marshallOut(void *chartInstanceVoid, void 80 | *c2_inData); 81 | static int32_T c2_e_emlrt_marshallIn 82 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 83 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId); 84 | static void c2_d_sf_marshallIn(void *chartInstanceVoid, const mxArray 85 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData); 86 | static uint8_T c2_f_emlrt_marshallIn 87 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 88 | const mxArray *c2_b_is_active_c2_Attitude_Control_System_of_Flying_Vehicle, 89 | const char_T *c2_identifier); 90 | static uint8_T c2_g_emlrt_marshallIn 91 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 92 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId); 93 | static void init_dsm_address_info 94 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 95 | static void init_simulink_io_address 96 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance); 97 | 98 | /* Function Definitions */ 99 | static void initialize_c2_Attitude_Control_System_of_Flying_Vehicle 100 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 101 | { 102 | if (sf_is_first_init_cond(chartInstance->S)) { 103 | initSimStructsc2_Attitude_Control_System_of_Flying_Vehicle(chartInstance); 104 | chart_debug_initialize_data_addresses(chartInstance->S); 105 | } 106 | 107 | chartInstance->c2_sfEvent = CALL_EVENT; 108 | _sfTime_ = sf_get_time(chartInstance->S); 109 | chartInstance->c2_is_active_c2_Attitude_Control_System_of_Flying_Vehicle = 0U; 110 | } 111 | 112 | static void initialize_params_c2_Attitude_Control_System_of_Flying_Vehicle 113 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 114 | { 115 | (void)chartInstance; 116 | } 117 | 118 | static void enable_c2_Attitude_Control_System_of_Flying_Vehicle 119 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 120 | { 121 | _sfTime_ = sf_get_time(chartInstance->S); 122 | } 123 | 124 | static void disable_c2_Attitude_Control_System_of_Flying_Vehicle 125 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 126 | { 127 | _sfTime_ = sf_get_time(chartInstance->S); 128 | } 129 | 130 | static void c2_update_debugger_state_c2_Attitude_Control_System_of_Flying_Ve 131 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 132 | { 133 | (void)chartInstance; 134 | } 135 | 136 | static const mxArray *get_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle 137 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 138 | { 139 | const mxArray *c2_st; 140 | const mxArray *c2_y = NULL; 141 | real_T c2_hoistedGlobal; 142 | const mxArray *c2_b_y = NULL; 143 | real_T c2_b_hoistedGlobal; 144 | const mxArray *c2_c_y = NULL; 145 | real_T c2_c_hoistedGlobal; 146 | const mxArray *c2_d_y = NULL; 147 | uint8_T c2_d_hoistedGlobal; 148 | const mxArray *c2_e_y = NULL; 149 | c2_st = NULL; 150 | c2_st = NULL; 151 | c2_y = NULL; 152 | sf_mex_assign(&c2_y, sf_mex_createcellmatrix(4, 1), false); 153 | c2_hoistedGlobal = *chartInstance->c2_dgamma; 154 | c2_b_y = NULL; 155 | sf_mex_assign(&c2_b_y, sf_mex_create("y", &c2_hoistedGlobal, 0, 0U, 0U, 0U, 0), 156 | false); 157 | sf_mex_setcell(c2_y, 0, c2_b_y); 158 | c2_b_hoistedGlobal = *chartInstance->c2_dphi; 159 | c2_c_y = NULL; 160 | sf_mex_assign(&c2_c_y, sf_mex_create("y", &c2_b_hoistedGlobal, 0, 0U, 0U, 0U, 161 | 0), false); 162 | sf_mex_setcell(c2_y, 1, c2_c_y); 163 | c2_c_hoistedGlobal = *chartInstance->c2_dtheta; 164 | c2_d_y = NULL; 165 | sf_mex_assign(&c2_d_y, sf_mex_create("y", &c2_c_hoistedGlobal, 0, 0U, 0U, 0U, 166 | 0), false); 167 | sf_mex_setcell(c2_y, 2, c2_d_y); 168 | c2_d_hoistedGlobal = 169 | chartInstance->c2_is_active_c2_Attitude_Control_System_of_Flying_Vehicle; 170 | c2_e_y = NULL; 171 | sf_mex_assign(&c2_e_y, sf_mex_create("y", &c2_d_hoistedGlobal, 3, 0U, 0U, 0U, 172 | 0), false); 173 | sf_mex_setcell(c2_y, 3, c2_e_y); 174 | sf_mex_assign(&c2_st, c2_y, false); 175 | return c2_st; 176 | } 177 | 178 | static void set_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle 179 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 180 | const mxArray *c2_st) 181 | { 182 | const mxArray *c2_u; 183 | chartInstance->c2_doneDoubleBufferReInit = true; 184 | c2_u = sf_mex_dup(c2_st); 185 | *chartInstance->c2_dgamma = c2_emlrt_marshallIn(chartInstance, sf_mex_dup 186 | (sf_mex_getcell("dgamma", c2_u, 0)), "dgamma"); 187 | *chartInstance->c2_dphi = c2_emlrt_marshallIn(chartInstance, sf_mex_dup 188 | (sf_mex_getcell("dphi", c2_u, 1)), "dphi"); 189 | *chartInstance->c2_dtheta = c2_emlrt_marshallIn(chartInstance, sf_mex_dup 190 | (sf_mex_getcell("dtheta", c2_u, 2)), "dtheta"); 191 | chartInstance->c2_is_active_c2_Attitude_Control_System_of_Flying_Vehicle = 192 | c2_f_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell( 193 | "is_active_c2_Attitude_Control_System_of_Flying_Vehicle", c2_u, 3)), 194 | "is_active_c2_Attitude_Control_System_of_Flying_Vehicle"); 195 | sf_mex_destroy(&c2_u); 196 | c2_update_debugger_state_c2_Attitude_Control_System_of_Flying_Ve(chartInstance); 197 | sf_mex_destroy(&c2_st); 198 | } 199 | 200 | static void finalize_c2_Attitude_Control_System_of_Flying_Vehicle 201 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 202 | { 203 | (void)chartInstance; 204 | } 205 | 206 | static void sf_gateway_c2_Attitude_Control_System_of_Flying_Vehicle 207 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 208 | { 209 | real_T c2_hoistedGlobal; 210 | real_T c2_b_hoistedGlobal; 211 | real_T c2_c_hoistedGlobal; 212 | real_T c2_d_hoistedGlobal; 213 | real_T c2_e_hoistedGlobal; 214 | real_T c2_b_omega_x; 215 | real_T c2_b_omega_y; 216 | real_T c2_b_omega_z; 217 | real_T c2_b_theta; 218 | real_T c2_b_gamma; 219 | uint32_T c2_debug_family_var_map[13]; 220 | real_T c2_omega[3]; 221 | real_T c2_A[9]; 222 | real_T c2_angle[3]; 223 | real_T c2_nargin = 5.0; 224 | real_T c2_nargout = 3.0; 225 | real_T c2_b_dtheta; 226 | real_T c2_b_dphi; 227 | real_T c2_b_dgamma; 228 | real_T c2_c_omega_x[3]; 229 | int32_T c2_i0; 230 | int32_T c2_i1; 231 | real_T c2_x; 232 | real_T c2_b_x; 233 | real_T c2_c_x; 234 | real_T c2_d_x; 235 | real_T c2_e_x; 236 | real_T c2_f_x; 237 | real_T c2_g_x; 238 | real_T c2_h_x; 239 | real_T c2_b_A; 240 | real_T c2_B; 241 | real_T c2_i_x; 242 | real_T c2_y; 243 | real_T c2_j_x; 244 | real_T c2_b_y; 245 | real_T c2_c_y; 246 | real_T c2_k_x; 247 | real_T c2_l_x; 248 | real_T c2_m_x; 249 | real_T c2_n_x; 250 | real_T c2_c_A; 251 | real_T c2_b_B; 252 | real_T c2_o_x; 253 | real_T c2_d_y; 254 | real_T c2_p_x; 255 | real_T c2_e_y; 256 | real_T c2_f_y; 257 | real_T c2_q_x; 258 | real_T c2_r_x; 259 | real_T c2_s_x; 260 | real_T c2_t_x; 261 | real_T c2_u_x; 262 | real_T c2_v_x; 263 | real_T c2_w_x; 264 | real_T c2_x_x; 265 | int32_T c2_i2; 266 | int32_T c2_i3; 267 | real_T c2_a[9]; 268 | int32_T c2_i4; 269 | real_T c2_b[3]; 270 | int32_T c2_i5; 271 | int32_T c2_i6; 272 | int32_T c2_i7; 273 | _SFD_SYMBOL_SCOPE_PUSH(0U, 0U); 274 | _sfTime_ = sf_get_time(chartInstance->S); 275 | _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 1U, chartInstance->c2_sfEvent); 276 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_gamma, 4U, 1U, 0U, 277 | chartInstance->c2_sfEvent, false); 278 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_theta, 3U, 1U, 0U, 279 | chartInstance->c2_sfEvent, false); 280 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_omega_z, 2U, 1U, 0U, 281 | chartInstance->c2_sfEvent, false); 282 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_omega_y, 1U, 1U, 0U, 283 | chartInstance->c2_sfEvent, false); 284 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_omega_x, 0U, 1U, 0U, 285 | chartInstance->c2_sfEvent, false); 286 | chartInstance->c2_sfEvent = CALL_EVENT; 287 | _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 1U, chartInstance->c2_sfEvent); 288 | c2_hoistedGlobal = *chartInstance->c2_omega_x; 289 | c2_b_hoistedGlobal = *chartInstance->c2_omega_y; 290 | c2_c_hoistedGlobal = *chartInstance->c2_omega_z; 291 | c2_d_hoistedGlobal = *chartInstance->c2_theta; 292 | c2_e_hoistedGlobal = *chartInstance->c2_gamma; 293 | c2_b_omega_x = c2_hoistedGlobal; 294 | c2_b_omega_y = c2_b_hoistedGlobal; 295 | c2_b_omega_z = c2_c_hoistedGlobal; 296 | c2_b_theta = c2_d_hoistedGlobal; 297 | c2_b_gamma = c2_e_hoistedGlobal; 298 | _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 13U, 13U, c2_debug_family_names, 299 | c2_debug_family_var_map); 300 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(c2_omega, 0U, c2_b_sf_marshallOut, 301 | c2_b_sf_marshallIn); 302 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(c2_A, 1U, c2_c_sf_marshallOut, 303 | c2_c_sf_marshallIn); 304 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(c2_angle, 2U, c2_b_sf_marshallOut, 305 | c2_b_sf_marshallIn); 306 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_nargin, 3U, c2_sf_marshallOut, 307 | c2_sf_marshallIn); 308 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_nargout, 4U, c2_sf_marshallOut, 309 | c2_sf_marshallIn); 310 | _SFD_SYMBOL_SCOPE_ADD_EML(&c2_b_omega_x, 5U, c2_sf_marshallOut); 311 | _SFD_SYMBOL_SCOPE_ADD_EML(&c2_b_omega_y, 6U, c2_sf_marshallOut); 312 | _SFD_SYMBOL_SCOPE_ADD_EML(&c2_b_omega_z, 7U, c2_sf_marshallOut); 313 | _SFD_SYMBOL_SCOPE_ADD_EML(&c2_b_theta, 8U, c2_sf_marshallOut); 314 | _SFD_SYMBOL_SCOPE_ADD_EML(&c2_b_gamma, 9U, c2_sf_marshallOut); 315 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_b_dtheta, 10U, c2_sf_marshallOut, 316 | c2_sf_marshallIn); 317 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_b_dphi, 11U, c2_sf_marshallOut, 318 | c2_sf_marshallIn); 319 | _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_b_dgamma, 12U, c2_sf_marshallOut, 320 | c2_sf_marshallIn); 321 | CV_EML_FCN(0, 0); 322 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 4); 323 | c2_c_omega_x[0] = c2_b_omega_x; 324 | c2_c_omega_x[1] = c2_b_omega_y; 325 | c2_c_omega_x[2] = c2_b_omega_z; 326 | for (c2_i0 = 0; c2_i0 < 3; c2_i0++) { 327 | c2_omega[c2_i0] = c2_c_omega_x[c2_i0]; 328 | } 329 | 330 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 5); 331 | for (c2_i1 = 0; c2_i1 < 9; c2_i1++) { 332 | c2_A[c2_i1] = 0.0; 333 | } 334 | 335 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 6); 336 | c2_x = c2_b_gamma; 337 | c2_b_x = c2_x; 338 | c2_b_x = muDoubleScalarSin(c2_b_x); 339 | c2_c_x = c2_b_gamma; 340 | c2_d_x = c2_c_x; 341 | c2_d_x = muDoubleScalarCos(c2_d_x); 342 | c2_A[0] = 0.0; 343 | c2_A[3] = c2_b_x; 344 | c2_A[6] = c2_d_x; 345 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 7); 346 | c2_e_x = c2_b_gamma; 347 | c2_f_x = c2_e_x; 348 | c2_f_x = muDoubleScalarCos(c2_f_x); 349 | c2_g_x = c2_b_theta; 350 | c2_h_x = c2_g_x; 351 | c2_h_x = muDoubleScalarCos(c2_h_x); 352 | c2_b_A = c2_f_x; 353 | c2_B = c2_h_x; 354 | c2_i_x = c2_b_A; 355 | c2_y = c2_B; 356 | c2_j_x = c2_i_x; 357 | c2_b_y = c2_y; 358 | c2_c_y = c2_j_x / c2_b_y; 359 | c2_k_x = c2_b_gamma; 360 | c2_l_x = c2_k_x; 361 | c2_l_x = muDoubleScalarSin(c2_l_x); 362 | c2_m_x = c2_b_theta; 363 | c2_n_x = c2_m_x; 364 | c2_n_x = muDoubleScalarCos(c2_n_x); 365 | c2_c_A = -c2_l_x; 366 | c2_b_B = c2_n_x; 367 | c2_o_x = c2_c_A; 368 | c2_d_y = c2_b_B; 369 | c2_p_x = c2_o_x; 370 | c2_e_y = c2_d_y; 371 | c2_f_y = c2_p_x / c2_e_y; 372 | c2_A[1] = 0.0; 373 | c2_A[4] = c2_c_y; 374 | c2_A[7] = c2_f_y; 375 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 8); 376 | c2_q_x = c2_b_theta; 377 | c2_r_x = c2_q_x; 378 | c2_r_x = muDoubleScalarTan(c2_r_x); 379 | c2_s_x = c2_b_gamma; 380 | c2_t_x = c2_s_x; 381 | c2_t_x = muDoubleScalarCos(c2_t_x); 382 | c2_u_x = c2_b_theta; 383 | c2_v_x = c2_u_x; 384 | c2_v_x = muDoubleScalarTan(c2_v_x); 385 | c2_w_x = c2_b_gamma; 386 | c2_x_x = c2_w_x; 387 | c2_x_x = muDoubleScalarSin(c2_x_x); 388 | c2_A[2] = 0.0; 389 | c2_A[5] = -c2_r_x * c2_t_x; 390 | c2_A[8] = c2_v_x * c2_x_x; 391 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 10); 392 | for (c2_i2 = 0; c2_i2 < 9; c2_i2++) { 393 | c2_a[c2_i2] = c2_A[c2_i2]; 394 | } 395 | 396 | for (c2_i3 = 0; c2_i3 < 3; c2_i3++) { 397 | c2_b[c2_i3] = c2_omega[c2_i3]; 398 | } 399 | 400 | for (c2_i4 = 0; c2_i4 < 3; c2_i4++) { 401 | c2_angle[c2_i4] = 0.0; 402 | } 403 | 404 | for (c2_i5 = 0; c2_i5 < 3; c2_i5++) { 405 | c2_angle[c2_i5] = 0.0; 406 | c2_i6 = 0; 407 | for (c2_i7 = 0; c2_i7 < 3; c2_i7++) { 408 | c2_angle[c2_i5] += c2_a[c2_i6 + c2_i5] * c2_b[c2_i7]; 409 | c2_i6 += 3; 410 | } 411 | } 412 | 413 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 12); 414 | c2_b_dtheta = c2_angle[0]; 415 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 13); 416 | c2_b_dphi = c2_angle[1]; 417 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 14); 418 | c2_b_dgamma = c2_angle[2]; 419 | _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, -14); 420 | _SFD_SYMBOL_SCOPE_POP(); 421 | *chartInstance->c2_dtheta = c2_b_dtheta; 422 | *chartInstance->c2_dphi = c2_b_dphi; 423 | *chartInstance->c2_dgamma = c2_b_dgamma; 424 | _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 1U, chartInstance->c2_sfEvent); 425 | _SFD_SYMBOL_SCOPE_POP(); 426 | _SFD_CHECK_FOR_STATE_INCONSISTENCY 427 | (_Attitude_Control_System_of_Flying_VehicleMachineNumber_, 428 | chartInstance->chartNumber, chartInstance->instanceNumber); 429 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_dtheta, 5U, 1U, 0U, 430 | chartInstance->c2_sfEvent, false); 431 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_dphi, 6U, 1U, 0U, 432 | chartInstance->c2_sfEvent, false); 433 | _SFD_DATA_RANGE_CHECK(*chartInstance->c2_dgamma, 7U, 1U, 0U, 434 | chartInstance->c2_sfEvent, false); 435 | } 436 | 437 | static void mdl_start_c2_Attitude_Control_System_of_Flying_Vehicle 438 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 439 | { 440 | (void)chartInstance; 441 | } 442 | 443 | static void initSimStructsc2_Attitude_Control_System_of_Flying_Vehicle 444 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 445 | { 446 | (void)chartInstance; 447 | } 448 | 449 | static void init_script_number_translation(uint32_T c2_machineNumber, uint32_T 450 | c2_chartNumber, uint32_T c2_instanceNumber) 451 | { 452 | (void)c2_machineNumber; 453 | (void)c2_chartNumber; 454 | (void)c2_instanceNumber; 455 | } 456 | 457 | static const mxArray *c2_sf_marshallOut(void *chartInstanceVoid, void *c2_inData) 458 | { 459 | const mxArray *c2_mxArrayOutData; 460 | real_T c2_u; 461 | const mxArray *c2_y = NULL; 462 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 463 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 464 | chartInstanceVoid; 465 | c2_mxArrayOutData = NULL; 466 | c2_mxArrayOutData = NULL; 467 | c2_u = *(real_T *)c2_inData; 468 | c2_y = NULL; 469 | sf_mex_assign(&c2_y, sf_mex_create("y", &c2_u, 0, 0U, 0U, 0U, 0), false); 470 | sf_mex_assign(&c2_mxArrayOutData, c2_y, false); 471 | return c2_mxArrayOutData; 472 | } 473 | 474 | static real_T c2_emlrt_marshallIn 475 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 476 | const mxArray *c2_b_dgamma, const char_T *c2_identifier) 477 | { 478 | real_T c2_y; 479 | emlrtMsgIdentifier c2_thisId; 480 | c2_thisId.fIdentifier = c2_identifier; 481 | c2_thisId.fParent = NULL; 482 | c2_thisId.bParentIsCell = false; 483 | c2_y = c2_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_b_dgamma), 484 | &c2_thisId); 485 | sf_mex_destroy(&c2_b_dgamma); 486 | return c2_y; 487 | } 488 | 489 | static real_T c2_b_emlrt_marshallIn 490 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 491 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId) 492 | { 493 | real_T c2_y; 494 | real_T c2_d0; 495 | (void)chartInstance; 496 | sf_mex_import(c2_parentId, sf_mex_dup(c2_u), &c2_d0, 1, 0, 0U, 0, 0U, 0); 497 | c2_y = c2_d0; 498 | sf_mex_destroy(&c2_u); 499 | return c2_y; 500 | } 501 | 502 | static void c2_sf_marshallIn(void *chartInstanceVoid, const mxArray 503 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData) 504 | { 505 | const mxArray *c2_b_dgamma; 506 | const char_T *c2_identifier; 507 | emlrtMsgIdentifier c2_thisId; 508 | real_T c2_y; 509 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 510 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 511 | chartInstanceVoid; 512 | c2_b_dgamma = sf_mex_dup(c2_mxArrayInData); 513 | c2_identifier = c2_varName; 514 | c2_thisId.fIdentifier = c2_identifier; 515 | c2_thisId.fParent = NULL; 516 | c2_thisId.bParentIsCell = false; 517 | c2_y = c2_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_b_dgamma), 518 | &c2_thisId); 519 | sf_mex_destroy(&c2_b_dgamma); 520 | *(real_T *)c2_outData = c2_y; 521 | sf_mex_destroy(&c2_mxArrayInData); 522 | } 523 | 524 | static const mxArray *c2_b_sf_marshallOut(void *chartInstanceVoid, void 525 | *c2_inData) 526 | { 527 | const mxArray *c2_mxArrayOutData; 528 | int32_T c2_i8; 529 | const mxArray *c2_y = NULL; 530 | real_T c2_u[3]; 531 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 532 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 533 | chartInstanceVoid; 534 | c2_mxArrayOutData = NULL; 535 | c2_mxArrayOutData = NULL; 536 | for (c2_i8 = 0; c2_i8 < 3; c2_i8++) { 537 | c2_u[c2_i8] = (*(real_T (*)[3])c2_inData)[c2_i8]; 538 | } 539 | 540 | c2_y = NULL; 541 | sf_mex_assign(&c2_y, sf_mex_create("y", c2_u, 0, 0U, 1U, 0U, 1, 3), false); 542 | sf_mex_assign(&c2_mxArrayOutData, c2_y, false); 543 | return c2_mxArrayOutData; 544 | } 545 | 546 | static void c2_c_emlrt_marshallIn 547 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 548 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId, real_T c2_y[3]) 549 | { 550 | real_T c2_dv0[3]; 551 | int32_T c2_i9; 552 | (void)chartInstance; 553 | sf_mex_import(c2_parentId, sf_mex_dup(c2_u), c2_dv0, 1, 0, 0U, 1, 0U, 1, 3); 554 | for (c2_i9 = 0; c2_i9 < 3; c2_i9++) { 555 | c2_y[c2_i9] = c2_dv0[c2_i9]; 556 | } 557 | 558 | sf_mex_destroy(&c2_u); 559 | } 560 | 561 | static void c2_b_sf_marshallIn(void *chartInstanceVoid, const mxArray 562 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData) 563 | { 564 | const mxArray *c2_angle; 565 | const char_T *c2_identifier; 566 | emlrtMsgIdentifier c2_thisId; 567 | real_T c2_y[3]; 568 | int32_T c2_i10; 569 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 570 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 571 | chartInstanceVoid; 572 | c2_angle = sf_mex_dup(c2_mxArrayInData); 573 | c2_identifier = c2_varName; 574 | c2_thisId.fIdentifier = c2_identifier; 575 | c2_thisId.fParent = NULL; 576 | c2_thisId.bParentIsCell = false; 577 | c2_c_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_angle), &c2_thisId, c2_y); 578 | sf_mex_destroy(&c2_angle); 579 | for (c2_i10 = 0; c2_i10 < 3; c2_i10++) { 580 | (*(real_T (*)[3])c2_outData)[c2_i10] = c2_y[c2_i10]; 581 | } 582 | 583 | sf_mex_destroy(&c2_mxArrayInData); 584 | } 585 | 586 | static const mxArray *c2_c_sf_marshallOut(void *chartInstanceVoid, void 587 | *c2_inData) 588 | { 589 | const mxArray *c2_mxArrayOutData; 590 | int32_T c2_i11; 591 | int32_T c2_i12; 592 | const mxArray *c2_y = NULL; 593 | int32_T c2_i13; 594 | real_T c2_u[9]; 595 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 596 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 597 | chartInstanceVoid; 598 | c2_mxArrayOutData = NULL; 599 | c2_mxArrayOutData = NULL; 600 | c2_i11 = 0; 601 | for (c2_i12 = 0; c2_i12 < 3; c2_i12++) { 602 | for (c2_i13 = 0; c2_i13 < 3; c2_i13++) { 603 | c2_u[c2_i13 + c2_i11] = (*(real_T (*)[9])c2_inData)[c2_i13 + c2_i11]; 604 | } 605 | 606 | c2_i11 += 3; 607 | } 608 | 609 | c2_y = NULL; 610 | sf_mex_assign(&c2_y, sf_mex_create("y", c2_u, 0, 0U, 1U, 0U, 2, 3, 3), false); 611 | sf_mex_assign(&c2_mxArrayOutData, c2_y, false); 612 | return c2_mxArrayOutData; 613 | } 614 | 615 | static void c2_d_emlrt_marshallIn 616 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 617 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId, real_T c2_y[9]) 618 | { 619 | real_T c2_dv1[9]; 620 | int32_T c2_i14; 621 | (void)chartInstance; 622 | sf_mex_import(c2_parentId, sf_mex_dup(c2_u), c2_dv1, 1, 0, 0U, 1, 0U, 2, 3, 3); 623 | for (c2_i14 = 0; c2_i14 < 9; c2_i14++) { 624 | c2_y[c2_i14] = c2_dv1[c2_i14]; 625 | } 626 | 627 | sf_mex_destroy(&c2_u); 628 | } 629 | 630 | static void c2_c_sf_marshallIn(void *chartInstanceVoid, const mxArray 631 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData) 632 | { 633 | const mxArray *c2_A; 634 | const char_T *c2_identifier; 635 | emlrtMsgIdentifier c2_thisId; 636 | real_T c2_y[9]; 637 | int32_T c2_i15; 638 | int32_T c2_i16; 639 | int32_T c2_i17; 640 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 641 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 642 | chartInstanceVoid; 643 | c2_A = sf_mex_dup(c2_mxArrayInData); 644 | c2_identifier = c2_varName; 645 | c2_thisId.fIdentifier = c2_identifier; 646 | c2_thisId.fParent = NULL; 647 | c2_thisId.bParentIsCell = false; 648 | c2_d_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_A), &c2_thisId, c2_y); 649 | sf_mex_destroy(&c2_A); 650 | c2_i15 = 0; 651 | for (c2_i16 = 0; c2_i16 < 3; c2_i16++) { 652 | for (c2_i17 = 0; c2_i17 < 3; c2_i17++) { 653 | (*(real_T (*)[9])c2_outData)[c2_i17 + c2_i15] = c2_y[c2_i17 + c2_i15]; 654 | } 655 | 656 | c2_i15 += 3; 657 | } 658 | 659 | sf_mex_destroy(&c2_mxArrayInData); 660 | } 661 | 662 | const mxArray 663 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_eml_resolved_functions_info 664 | (void) 665 | { 666 | const mxArray *c2_nameCaptureInfo = NULL; 667 | c2_nameCaptureInfo = NULL; 668 | sf_mex_assign(&c2_nameCaptureInfo, sf_mex_create("nameCaptureInfo", NULL, 0, 669 | 0U, 1U, 0U, 2, 0, 1), false); 670 | return c2_nameCaptureInfo; 671 | } 672 | 673 | static const mxArray *c2_d_sf_marshallOut(void *chartInstanceVoid, void 674 | *c2_inData) 675 | { 676 | const mxArray *c2_mxArrayOutData; 677 | int32_T c2_u; 678 | const mxArray *c2_y = NULL; 679 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 680 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 681 | chartInstanceVoid; 682 | c2_mxArrayOutData = NULL; 683 | c2_mxArrayOutData = NULL; 684 | c2_u = *(int32_T *)c2_inData; 685 | c2_y = NULL; 686 | sf_mex_assign(&c2_y, sf_mex_create("y", &c2_u, 6, 0U, 0U, 0U, 0), false); 687 | sf_mex_assign(&c2_mxArrayOutData, c2_y, false); 688 | return c2_mxArrayOutData; 689 | } 690 | 691 | static int32_T c2_e_emlrt_marshallIn 692 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 693 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId) 694 | { 695 | int32_T c2_y; 696 | int32_T c2_i18; 697 | (void)chartInstance; 698 | sf_mex_import(c2_parentId, sf_mex_dup(c2_u), &c2_i18, 1, 6, 0U, 0, 0U, 0); 699 | c2_y = c2_i18; 700 | sf_mex_destroy(&c2_u); 701 | return c2_y; 702 | } 703 | 704 | static void c2_d_sf_marshallIn(void *chartInstanceVoid, const mxArray 705 | *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData) 706 | { 707 | const mxArray *c2_b_sfEvent; 708 | const char_T *c2_identifier; 709 | emlrtMsgIdentifier c2_thisId; 710 | int32_T c2_y; 711 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance; 712 | chartInstance = (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 713 | chartInstanceVoid; 714 | c2_b_sfEvent = sf_mex_dup(c2_mxArrayInData); 715 | c2_identifier = c2_varName; 716 | c2_thisId.fIdentifier = c2_identifier; 717 | c2_thisId.fParent = NULL; 718 | c2_thisId.bParentIsCell = false; 719 | c2_y = c2_e_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_b_sfEvent), 720 | &c2_thisId); 721 | sf_mex_destroy(&c2_b_sfEvent); 722 | *(int32_T *)c2_outData = c2_y; 723 | sf_mex_destroy(&c2_mxArrayInData); 724 | } 725 | 726 | static uint8_T c2_f_emlrt_marshallIn 727 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 728 | const mxArray *c2_b_is_active_c2_Attitude_Control_System_of_Flying_Vehicle, 729 | const char_T *c2_identifier) 730 | { 731 | uint8_T c2_y; 732 | emlrtMsgIdentifier c2_thisId; 733 | c2_thisId.fIdentifier = c2_identifier; 734 | c2_thisId.fParent = NULL; 735 | c2_thisId.bParentIsCell = false; 736 | c2_y = c2_g_emlrt_marshallIn(chartInstance, sf_mex_dup 737 | (c2_b_is_active_c2_Attitude_Control_System_of_Flying_Vehicle), &c2_thisId); 738 | sf_mex_destroy(&c2_b_is_active_c2_Attitude_Control_System_of_Flying_Vehicle); 739 | return c2_y; 740 | } 741 | 742 | static uint8_T c2_g_emlrt_marshallIn 743 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance, 744 | const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId) 745 | { 746 | uint8_T c2_y; 747 | uint8_T c2_u0; 748 | (void)chartInstance; 749 | sf_mex_import(c2_parentId, sf_mex_dup(c2_u), &c2_u0, 1, 3, 0U, 0, 0U, 0); 750 | c2_y = c2_u0; 751 | sf_mex_destroy(&c2_u); 752 | return c2_y; 753 | } 754 | 755 | static void init_dsm_address_info 756 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 757 | { 758 | (void)chartInstance; 759 | } 760 | 761 | static void init_simulink_io_address 762 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance) 763 | { 764 | chartInstance->c2_omega_x = (real_T *)ssGetInputPortSignal_wrapper 765 | (chartInstance->S, 0); 766 | chartInstance->c2_dtheta = (real_T *)ssGetOutputPortSignal_wrapper 767 | (chartInstance->S, 1); 768 | chartInstance->c2_omega_y = (real_T *)ssGetInputPortSignal_wrapper 769 | (chartInstance->S, 1); 770 | chartInstance->c2_omega_z = (real_T *)ssGetInputPortSignal_wrapper 771 | (chartInstance->S, 2); 772 | chartInstance->c2_dphi = (real_T *)ssGetOutputPortSignal_wrapper 773 | (chartInstance->S, 2); 774 | chartInstance->c2_dgamma = (real_T *)ssGetOutputPortSignal_wrapper 775 | (chartInstance->S, 3); 776 | chartInstance->c2_theta = (real_T *)ssGetInputPortSignal_wrapper 777 | (chartInstance->S, 3); 778 | chartInstance->c2_gamma = (real_T *)ssGetInputPortSignal_wrapper 779 | (chartInstance->S, 4); 780 | } 781 | 782 | /* SFunction Glue Code */ 783 | #ifdef utFree 784 | #undef utFree 785 | #endif 786 | 787 | #ifdef utMalloc 788 | #undef utMalloc 789 | #endif 790 | 791 | #ifdef __cplusplus 792 | 793 | extern "C" void *utMalloc(size_t size); 794 | extern "C" void utFree(void*); 795 | 796 | #else 797 | 798 | extern void *utMalloc(size_t size); 799 | extern void utFree(void*); 800 | 801 | #endif 802 | 803 | void sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_check_sum(mxArray * 804 | plhs[]) 805 | { 806 | ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(1437682065U); 807 | ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(2191542217U); 808 | ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(1658232278U); 809 | ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(849998990U); 810 | } 811 | 812 | mxArray* sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_post_codegen_info 813 | (void); 814 | mxArray 815 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_autoinheritance_info(void) 816 | { 817 | const char *autoinheritanceFields[] = { "checksum", "inputs", "parameters", 818 | "outputs", "locals", "postCodegenInfo" }; 819 | 820 | mxArray *mxAutoinheritanceInfo = mxCreateStructMatrix(1, 1, sizeof 821 | (autoinheritanceFields)/sizeof(autoinheritanceFields[0]), 822 | autoinheritanceFields); 823 | 824 | { 825 | mxArray *mxChecksum = mxCreateString("84tplOCPNkmE4ZmY8yoaPB"); 826 | mxSetField(mxAutoinheritanceInfo,0,"checksum",mxChecksum); 827 | } 828 | 829 | { 830 | const char *dataFields[] = { "size", "type", "complexity" }; 831 | 832 | mxArray *mxData = mxCreateStructMatrix(1,5,3,dataFields); 833 | 834 | { 835 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 836 | double *pr = mxGetPr(mxSize); 837 | mxSetField(mxData,0,"size",mxSize); 838 | } 839 | 840 | { 841 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 842 | 843 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 844 | (typeFields[0]),typeFields); 845 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 846 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 847 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 848 | mxSetField(mxData,0,"type",mxType); 849 | } 850 | 851 | mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0)); 852 | 853 | { 854 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 855 | double *pr = mxGetPr(mxSize); 856 | mxSetField(mxData,1,"size",mxSize); 857 | } 858 | 859 | { 860 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 861 | 862 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 863 | (typeFields[0]),typeFields); 864 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 865 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 866 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 867 | mxSetField(mxData,1,"type",mxType); 868 | } 869 | 870 | mxSetField(mxData,1,"complexity",mxCreateDoubleScalar(0)); 871 | 872 | { 873 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 874 | double *pr = mxGetPr(mxSize); 875 | mxSetField(mxData,2,"size",mxSize); 876 | } 877 | 878 | { 879 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 880 | 881 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 882 | (typeFields[0]),typeFields); 883 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 884 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 885 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 886 | mxSetField(mxData,2,"type",mxType); 887 | } 888 | 889 | mxSetField(mxData,2,"complexity",mxCreateDoubleScalar(0)); 890 | 891 | { 892 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 893 | double *pr = mxGetPr(mxSize); 894 | mxSetField(mxData,3,"size",mxSize); 895 | } 896 | 897 | { 898 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 899 | 900 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 901 | (typeFields[0]),typeFields); 902 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 903 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 904 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 905 | mxSetField(mxData,3,"type",mxType); 906 | } 907 | 908 | mxSetField(mxData,3,"complexity",mxCreateDoubleScalar(0)); 909 | 910 | { 911 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 912 | double *pr = mxGetPr(mxSize); 913 | mxSetField(mxData,4,"size",mxSize); 914 | } 915 | 916 | { 917 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 918 | 919 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 920 | (typeFields[0]),typeFields); 921 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 922 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 923 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 924 | mxSetField(mxData,4,"type",mxType); 925 | } 926 | 927 | mxSetField(mxData,4,"complexity",mxCreateDoubleScalar(0)); 928 | mxSetField(mxAutoinheritanceInfo,0,"inputs",mxData); 929 | } 930 | 931 | { 932 | mxSetField(mxAutoinheritanceInfo,0,"parameters",mxCreateDoubleMatrix(0,0, 933 | mxREAL)); 934 | } 935 | 936 | { 937 | const char *dataFields[] = { "size", "type", "complexity" }; 938 | 939 | mxArray *mxData = mxCreateStructMatrix(1,3,3,dataFields); 940 | 941 | { 942 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 943 | double *pr = mxGetPr(mxSize); 944 | mxSetField(mxData,0,"size",mxSize); 945 | } 946 | 947 | { 948 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 949 | 950 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 951 | (typeFields[0]),typeFields); 952 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 953 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 954 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 955 | mxSetField(mxData,0,"type",mxType); 956 | } 957 | 958 | mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0)); 959 | 960 | { 961 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 962 | double *pr = mxGetPr(mxSize); 963 | mxSetField(mxData,1,"size",mxSize); 964 | } 965 | 966 | { 967 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 968 | 969 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 970 | (typeFields[0]),typeFields); 971 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 972 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 973 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 974 | mxSetField(mxData,1,"type",mxType); 975 | } 976 | 977 | mxSetField(mxData,1,"complexity",mxCreateDoubleScalar(0)); 978 | 979 | { 980 | mxArray *mxSize = mxCreateDoubleMatrix(1,0,mxREAL); 981 | double *pr = mxGetPr(mxSize); 982 | mxSetField(mxData,2,"size",mxSize); 983 | } 984 | 985 | { 986 | const char *typeFields[] = { "base", "fixpt", "isFixedPointType" }; 987 | 988 | mxArray *mxType = mxCreateStructMatrix(1,1,sizeof(typeFields)/sizeof 989 | (typeFields[0]),typeFields); 990 | mxSetField(mxType,0,"base",mxCreateDoubleScalar(10)); 991 | mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL)); 992 | mxSetField(mxType,0,"isFixedPointType",mxCreateDoubleScalar(0)); 993 | mxSetField(mxData,2,"type",mxType); 994 | } 995 | 996 | mxSetField(mxData,2,"complexity",mxCreateDoubleScalar(0)); 997 | mxSetField(mxAutoinheritanceInfo,0,"outputs",mxData); 998 | } 999 | 1000 | { 1001 | mxSetField(mxAutoinheritanceInfo,0,"locals",mxCreateDoubleMatrix(0,0,mxREAL)); 1002 | } 1003 | 1004 | { 1005 | mxArray* mxPostCodegenInfo = 1006 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_post_codegen_info(); 1007 | mxSetField(mxAutoinheritanceInfo,0,"postCodegenInfo",mxPostCodegenInfo); 1008 | } 1009 | 1010 | return(mxAutoinheritanceInfo); 1011 | } 1012 | 1013 | mxArray *sf_c2_Attitude_Control_System_of_Flying_Vehicle_third_party_uses_info 1014 | (void) 1015 | { 1016 | mxArray * mxcell3p = mxCreateCellMatrix(1,0); 1017 | return(mxcell3p); 1018 | } 1019 | 1020 | mxArray *sf_c2_Attitude_Control_System_of_Flying_Vehicle_jit_fallback_info(void) 1021 | { 1022 | const char *infoFields[] = { "fallbackType", "fallbackReason", 1023 | "hiddenFallbackType", "hiddenFallbackReason", "incompatibleSymbol" }; 1024 | 1025 | mxArray *mxInfo = mxCreateStructMatrix(1, 1, 5, infoFields); 1026 | mxArray *fallbackType = mxCreateString("pre"); 1027 | mxArray *fallbackReason = mxCreateString("hasBreakpoints"); 1028 | mxArray *hiddenFallbackType = mxCreateString("none"); 1029 | mxArray *hiddenFallbackReason = mxCreateString(""); 1030 | mxArray *incompatibleSymbol = mxCreateString(""); 1031 | mxSetField(mxInfo, 0, infoFields[0], fallbackType); 1032 | mxSetField(mxInfo, 0, infoFields[1], fallbackReason); 1033 | mxSetField(mxInfo, 0, infoFields[2], hiddenFallbackType); 1034 | mxSetField(mxInfo, 0, infoFields[3], hiddenFallbackReason); 1035 | mxSetField(mxInfo, 0, infoFields[4], incompatibleSymbol); 1036 | return mxInfo; 1037 | } 1038 | 1039 | mxArray 1040 | *sf_c2_Attitude_Control_System_of_Flying_Vehicle_updateBuildInfo_args_info 1041 | (void) 1042 | { 1043 | mxArray *mxBIArgs = mxCreateCellMatrix(1,0); 1044 | return mxBIArgs; 1045 | } 1046 | 1047 | mxArray* sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_post_codegen_info 1048 | (void) 1049 | { 1050 | const char* fieldNames[] = { "exportedFunctionsUsedByThisChart", 1051 | "exportedFunctionsChecksum" }; 1052 | 1053 | mwSize dims[2] = { 1, 1 }; 1054 | 1055 | mxArray* mxPostCodegenInfo = mxCreateStructArray(2, dims, sizeof(fieldNames)/ 1056 | sizeof(fieldNames[0]), fieldNames); 1057 | 1058 | { 1059 | mxArray* mxExportedFunctionsChecksum = mxCreateString(""); 1060 | mwSize exp_dims[2] = { 0, 1 }; 1061 | 1062 | mxArray* mxExportedFunctionsUsedByThisChart = mxCreateCellArray(2, exp_dims); 1063 | mxSetField(mxPostCodegenInfo, 0, "exportedFunctionsUsedByThisChart", 1064 | mxExportedFunctionsUsedByThisChart); 1065 | mxSetField(mxPostCodegenInfo, 0, "exportedFunctionsChecksum", 1066 | mxExportedFunctionsChecksum); 1067 | } 1068 | 1069 | return mxPostCodegenInfo; 1070 | } 1071 | 1072 | static const mxArray 1073 | *sf_get_sim_state_info_c2_Attitude_Control_System_of_Flying_Vehicle(void) 1074 | { 1075 | const char *infoFields[] = { "chartChecksum", "varInfo" }; 1076 | 1077 | mxArray *mxInfo = mxCreateStructMatrix(1, 1, 2, infoFields); 1078 | const char *infoEncStr[] = { 1079 | "100 S1x4'type','srcId','name','auxInfo'{{M[1],M[9],T\"dgamma\",},{M[1],M[8],T\"dphi\",},{M[1],M[5],T\"dtheta\",},{M[8],M[0],T\"is_active_c2_Attitude_Control_System_of_Flying_Vehicle\",}}" 1080 | }; 1081 | 1082 | mxArray *mxVarInfo = sf_mex_decode_encoded_mx_struct_array(infoEncStr, 4, 10); 1083 | mxArray *mxChecksum = mxCreateDoubleMatrix(1, 4, mxREAL); 1084 | sf_c2_Attitude_Control_System_of_Flying_Vehicle_get_check_sum(&mxChecksum); 1085 | mxSetField(mxInfo, 0, infoFields[0], mxChecksum); 1086 | mxSetField(mxInfo, 0, infoFields[1], mxVarInfo); 1087 | return mxInfo; 1088 | } 1089 | 1090 | static void chart_debug_initialization(SimStruct *S, unsigned int 1091 | fullDebuggerInitialization) 1092 | { 1093 | if (!sim_mode_is_rtw_gen(S)) { 1094 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance = 1095 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 1096 | sf_get_chart_instance_ptr(S); 1097 | if (ssIsFirstInitCond(S) && fullDebuggerInitialization==1) { 1098 | /* do this only if simulation is starting */ 1099 | { 1100 | unsigned int chartAlreadyPresent; 1101 | chartAlreadyPresent = sf_debug_initialize_chart 1102 | (sfGlobalDebugInstanceStruct, 1103 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_, 1104 | 2, 1105 | 1, 1106 | 1, 1107 | 0, 1108 | 8, 1109 | 0, 1110 | 0, 1111 | 0, 1112 | 0, 1113 | 0, 1114 | &chartInstance->chartNumber, 1115 | &chartInstance->instanceNumber, 1116 | (void *)S); 1117 | 1118 | /* Each instance must initialize its own list of scripts */ 1119 | init_script_number_translation 1120 | (_Attitude_Control_System_of_Flying_VehicleMachineNumber_, 1121 | chartInstance->chartNumber,chartInstance->instanceNumber); 1122 | if (chartAlreadyPresent==0) { 1123 | /* this is the first instance */ 1124 | sf_debug_set_chart_disable_implicit_casting 1125 | (sfGlobalDebugInstanceStruct, 1126 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_, 1127 | chartInstance->chartNumber,1); 1128 | sf_debug_set_chart_event_thresholds(sfGlobalDebugInstanceStruct, 1129 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_, 1130 | chartInstance->chartNumber, 1131 | 0, 1132 | 0, 1133 | 0); 1134 | _SFD_SET_DATA_PROPS(0,1,1,0,"omega_x"); 1135 | _SFD_SET_DATA_PROPS(1,1,1,0,"omega_y"); 1136 | _SFD_SET_DATA_PROPS(2,1,1,0,"omega_z"); 1137 | _SFD_SET_DATA_PROPS(3,1,1,0,"theta"); 1138 | _SFD_SET_DATA_PROPS(4,1,1,0,"gamma"); 1139 | _SFD_SET_DATA_PROPS(5,2,0,1,"dtheta"); 1140 | _SFD_SET_DATA_PROPS(6,2,0,1,"dphi"); 1141 | _SFD_SET_DATA_PROPS(7,2,0,1,"dgamma"); 1142 | _SFD_STATE_INFO(0,0,2); 1143 | _SFD_CH_SUBSTATE_COUNT(0); 1144 | _SFD_CH_SUBSTATE_DECOMP(0); 1145 | } 1146 | 1147 | _SFD_CV_INIT_CHART(0,0,0,0); 1148 | 1149 | { 1150 | _SFD_CV_INIT_STATE(0,0,0,0,0,0,NULL,NULL); 1151 | } 1152 | 1153 | _SFD_CV_INIT_TRANS(0,0,NULL,NULL,0,NULL); 1154 | 1155 | /* Initialization of MATLAB Function Model Coverage */ 1156 | _SFD_CV_INIT_EML(0,1,1,0,0,0,0,0,0,0,0,0); 1157 | _SFD_CV_INIT_EML_FCN(0,0,"eML_blk_kernel",11,-1,473); 1158 | _SFD_SET_DATA_COMPILED_PROPS(0,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1159 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)NULL); 1160 | _SFD_SET_DATA_COMPILED_PROPS(1,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1161 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)NULL); 1162 | _SFD_SET_DATA_COMPILED_PROPS(2,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1163 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)NULL); 1164 | _SFD_SET_DATA_COMPILED_PROPS(3,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1165 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)NULL); 1166 | _SFD_SET_DATA_COMPILED_PROPS(4,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1167 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)NULL); 1168 | _SFD_SET_DATA_COMPILED_PROPS(5,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1169 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)c2_sf_marshallIn); 1170 | _SFD_SET_DATA_COMPILED_PROPS(6,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1171 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)c2_sf_marshallIn); 1172 | _SFD_SET_DATA_COMPILED_PROPS(7,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0, 1173 | (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)c2_sf_marshallIn); 1174 | } 1175 | } else { 1176 | sf_debug_reset_current_state_configuration(sfGlobalDebugInstanceStruct, 1177 | _Attitude_Control_System_of_Flying_VehicleMachineNumber_, 1178 | chartInstance->chartNumber,chartInstance->instanceNumber); 1179 | } 1180 | } 1181 | } 1182 | 1183 | static void chart_debug_initialize_data_addresses(SimStruct *S) 1184 | { 1185 | if (!sim_mode_is_rtw_gen(S)) { 1186 | SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *chartInstance = 1187 | (SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 1188 | sf_get_chart_instance_ptr(S); 1189 | if (ssIsFirstInitCond(S)) { 1190 | /* do this only if simulation is starting and after we know the addresses of all data */ 1191 | { 1192 | _SFD_SET_DATA_VALUE_PTR(0U, chartInstance->c2_omega_x); 1193 | _SFD_SET_DATA_VALUE_PTR(5U, chartInstance->c2_dtheta); 1194 | _SFD_SET_DATA_VALUE_PTR(1U, chartInstance->c2_omega_y); 1195 | _SFD_SET_DATA_VALUE_PTR(2U, chartInstance->c2_omega_z); 1196 | _SFD_SET_DATA_VALUE_PTR(6U, chartInstance->c2_dphi); 1197 | _SFD_SET_DATA_VALUE_PTR(7U, chartInstance->c2_dgamma); 1198 | _SFD_SET_DATA_VALUE_PTR(3U, chartInstance->c2_theta); 1199 | _SFD_SET_DATA_VALUE_PTR(4U, chartInstance->c2_gamma); 1200 | } 1201 | } 1202 | } 1203 | } 1204 | 1205 | static const char* sf_get_instance_specialization(void) 1206 | { 1207 | return "s9DmYBHW33YRnCxJelKoAYH"; 1208 | } 1209 | 1210 | static void sf_opaque_initialize_c2_Attitude_Control_System_of_Flying_Vehicle 1211 | (void *chartInstanceVar) 1212 | { 1213 | chart_debug_initialization 1214 | (((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1215 | chartInstanceVar)->S,0); 1216 | initialize_params_c2_Attitude_Control_System_of_Flying_Vehicle 1217 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1218 | chartInstanceVar); 1219 | initialize_c2_Attitude_Control_System_of_Flying_Vehicle 1220 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1221 | chartInstanceVar); 1222 | } 1223 | 1224 | static void sf_opaque_enable_c2_Attitude_Control_System_of_Flying_Vehicle(void 1225 | *chartInstanceVar) 1226 | { 1227 | enable_c2_Attitude_Control_System_of_Flying_Vehicle 1228 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1229 | chartInstanceVar); 1230 | } 1231 | 1232 | static void sf_opaque_disable_c2_Attitude_Control_System_of_Flying_Vehicle(void * 1233 | chartInstanceVar) 1234 | { 1235 | disable_c2_Attitude_Control_System_of_Flying_Vehicle 1236 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1237 | chartInstanceVar); 1238 | } 1239 | 1240 | static void sf_opaque_gateway_c2_Attitude_Control_System_of_Flying_Vehicle(void * 1241 | chartInstanceVar) 1242 | { 1243 | sf_gateway_c2_Attitude_Control_System_of_Flying_Vehicle 1244 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1245 | chartInstanceVar); 1246 | } 1247 | 1248 | static const mxArray* 1249 | sf_opaque_get_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle(SimStruct* 1250 | S) 1251 | { 1252 | return get_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle 1253 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct *) 1254 | sf_get_chart_instance_ptr(S)); /* raw sim ctx */ 1255 | } 1256 | 1257 | static void sf_opaque_set_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle 1258 | (SimStruct* S, const mxArray *st) 1259 | { 1260 | set_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle 1261 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1262 | sf_get_chart_instance_ptr(S), st); 1263 | } 1264 | 1265 | static void sf_opaque_terminate_c2_Attitude_Control_System_of_Flying_Vehicle 1266 | (void *chartInstanceVar) 1267 | { 1268 | if (chartInstanceVar!=NULL) { 1269 | SimStruct *S = 1270 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1271 | chartInstanceVar)->S; 1272 | if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { 1273 | sf_clear_rtw_identifier(S); 1274 | unload_Attitude_Control_System_of_Flying_Vehicle_optimization_info(); 1275 | } 1276 | 1277 | finalize_c2_Attitude_Control_System_of_Flying_Vehicle 1278 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1279 | chartInstanceVar); 1280 | utFree(chartInstanceVar); 1281 | if (ssGetUserData(S)!= NULL) { 1282 | sf_free_ChartRunTimeInfo(S); 1283 | } 1284 | 1285 | ssSetUserData(S,NULL); 1286 | } 1287 | } 1288 | 1289 | static void sf_opaque_init_subchart_simstructs(void *chartInstanceVar) 1290 | { 1291 | initSimStructsc2_Attitude_Control_System_of_Flying_Vehicle 1292 | ((SFc2_Attitude_Control_System_of_Flying_VehicleInstanceStruct*) 1293 | chartInstanceVar); 1294 | } 1295 | 1296 | extern unsigned int sf_machine_global_initializer_called(void); 1297 | static void mdlProcessParameters_c2_Attitude_Control_System_of_Flying_Vehicle 1298 | (SimStruct *S) 1299 | { 1300 | int i; 1301 | for (i=0;ichartInfo.chartInstance = chartInstance; 1399 | chartInstance->chartInfo.isEMLChart = 1; 1400 | chartInstance->chartInfo.chartInitialized = 0; 1401 | chartInstance->chartInfo.sFunctionGateway = 1402 | sf_opaque_gateway_c2_Attitude_Control_System_of_Flying_Vehicle; 1403 | chartInstance->chartInfo.initializeChart = 1404 | sf_opaque_initialize_c2_Attitude_Control_System_of_Flying_Vehicle; 1405 | chartInstance->chartInfo.terminateChart = 1406 | sf_opaque_terminate_c2_Attitude_Control_System_of_Flying_Vehicle; 1407 | chartInstance->chartInfo.enableChart = 1408 | sf_opaque_enable_c2_Attitude_Control_System_of_Flying_Vehicle; 1409 | chartInstance->chartInfo.disableChart = 1410 | sf_opaque_disable_c2_Attitude_Control_System_of_Flying_Vehicle; 1411 | chartInstance->chartInfo.getSimState = 1412 | sf_opaque_get_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle; 1413 | chartInstance->chartInfo.setSimState = 1414 | sf_opaque_set_sim_state_c2_Attitude_Control_System_of_Flying_Vehicle; 1415 | chartInstance->chartInfo.getSimStateInfo = 1416 | sf_get_sim_state_info_c2_Attitude_Control_System_of_Flying_Vehicle; 1417 | chartInstance->chartInfo.zeroCrossings = NULL; 1418 | chartInstance->chartInfo.outputs = NULL; 1419 | chartInstance->chartInfo.derivatives = NULL; 1420 | chartInstance->chartInfo.mdlRTW = 1421 | mdlRTW_c2_Attitude_Control_System_of_Flying_Vehicle; 1422 | chartInstance->chartInfo.mdlStart = 1423 | mdlStart_c2_Attitude_Control_System_of_Flying_Vehicle; 1424 | chartInstance->chartInfo.mdlSetWorkWidths = 1425 | mdlSetWorkWidths_c2_Attitude_Control_System_of_Flying_Vehicle; 1426 | chartInstance->chartInfo.callGetHoverDataForMsg = NULL; 1427 | chartInstance->chartInfo.extModeExec = NULL; 1428 | chartInstance->chartInfo.restoreLastMajorStepConfiguration = NULL; 1429 | chartInstance->chartInfo.restoreBeforeLastMajorStepConfiguration = NULL; 1430 | chartInstance->chartInfo.storeCurrentConfiguration = NULL; 1431 | chartInstance->chartInfo.callAtomicSubchartUserFcn = NULL; 1432 | chartInstance->chartInfo.callAtomicSubchartAutoFcn = NULL; 1433 | chartInstance->chartInfo.debugInstance = sfGlobalDebugInstanceStruct; 1434 | chartInstance->S = S; 1435 | sf_init_ChartRunTimeInfo(S, &(chartInstance->chartInfo), false, 0); 1436 | init_dsm_address_info(chartInstance); 1437 | init_simulink_io_address(chartInstance); 1438 | if (!sim_mode_is_rtw_gen(S)) { 1439 | } 1440 | 1441 | chart_debug_initialization(S,1); 1442 | mdl_start_c2_Attitude_Control_System_of_Flying_Vehicle(chartInstance); 1443 | } 1444 | 1445 | void c2_Attitude_Control_System_of_Flying_Vehicle_method_dispatcher(SimStruct *S, 1446 | int_T method, void *data) 1447 | { 1448 | switch (method) { 1449 | case SS_CALL_MDL_START: 1450 | mdlStart_c2_Attitude_Control_System_of_Flying_Vehicle(S); 1451 | break; 1452 | 1453 | case SS_CALL_MDL_SET_WORK_WIDTHS: 1454 | mdlSetWorkWidths_c2_Attitude_Control_System_of_Flying_Vehicle(S); 1455 | break; 1456 | 1457 | case SS_CALL_MDL_PROCESS_PARAMETERS: 1458 | mdlProcessParameters_c2_Attitude_Control_System_of_Flying_Vehicle(S); 1459 | break; 1460 | 1461 | default: 1462 | /* Unhandled method */ 1463 | sf_mex_error_message("Stateflow Internal Error:\n" 1464 | "Error calling c2_Attitude_Control_System_of_Flying_Vehicle_method_dispatcher.\n" 1465 | "Can't handle method %d.\n", method); 1466 | break; 1467 | } 1468 | } 1469 | --------------------------------------------------------------------------------