Simulink UCGN Hello World
From UcgnWiki
(→Prerequisites) |
|||
Line 24: | Line 24: | ||
* Java JRE 1.6 or newer | * Java JRE 1.6 or newer | ||
- | * Matlab R2009b, Simulink 7.4 | + | * Matlab R2009b, Simulink 7.4 |
- | + | (most of the testing has been done using Simulink 7.4. Settings in the file SlcConfiguration.xml check for simulink version, but you can override it by performing a global search and replace, replacing 7.4 with your version in SlcConfiguration.xml) | |
== Setup == | == Setup == | ||
Line 68: | Line 68: | ||
TST_HelloWorldModel_Calculate(FCS_FlightControlSystem_StatusStructuredType *FcsStatus, /* Input */ | TST_HelloWorldModel_Calculate(FCS_FlightControlSystem_StatusStructuredType *FcsStatus, /* Input */ | ||
GBL_Types_Double TerrainElevationM, /* Input */ | GBL_Types_Double TerrainElevationM, /* Input */ | ||
- | + | GBL_Definitions_EjectionCmdEnumeratedType *PilotRecommendation); /* Output */ | |
</source> | </source> | ||
Line 99: | Line 99: | ||
if (FcsStatus->InAir && (FcsStatus->LeftEngFailed || FcsStatus->RightEngFailed) && LowAltitude) { | if (FcsStatus->InAir && (FcsStatus->LeftEngFailed || FcsStatus->RightEngFailed) && LowAltitude) { | ||
- | *(PilotRecommendation) = | + | *(PilotRecommendation) = GBL_Definitions_EjectionCmd_EjectAsap; |
} /* end of if */ | } /* end of if */ | ||
else { | else { | ||
- | *(PilotRecommendation) = | + | *(PilotRecommendation) = GBL_Definitions_EjectionCmd_DontEject; |
} /* end of else */ | } /* end of else */ |