Model { Name "aerosonde_dist" Version 5.0 SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "user" WideLines off ShowLineDimensions on ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ExecutionOrder off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Mon Jul 01 17:09:14 2002" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "jonathan How" ModifiedDateFormat "%" LastModifiedDate "Mon Oct 25 18:46:42 2004" ModelVersionFormat "1.%" ConfigurationManager "none" SimParamPage "Solver" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off ExtModeMexFile "ext_comm" ExtModeBatchMode off ExtModeTrigType "manual" ExtModeTrigMode "normal" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse on RTWExpressionDepthLimit 5 SimulationMode "normal" Solver "ode4" SolverMode "SingleTasking" StartTime "0.0" StopTime "200" MaxOrder 5 MaxStep "auto" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "0.008" RelTol "1e-3" AbsTol "auto" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" LoadExternalInput off ExternalInput "[t, u]" LoadInitialState off InitialState "xInitial" SaveTime off TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput off OutputSaveName "yout" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" Decimation "1" LimitDataPoints off MaxDataPoints "1000" SignalLoggingName "sigsOut" ConsistencyChecking "none" ArrayBoundsChecking "none" AlgebraicLoopMsg "warning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" CheckForMatrixSingularity "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterPrecisionLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" SignalLabelMismatchMsg "none" UnconnectedInputMsg "none" UnconnectedOutputMsg "none" UnconnectedLineMsg "none" SfunCompatibilityCheckMsg "none" RTWInlineParameters off BlockReductionOpt off BooleanDataType off ConditionallyExecuteInputs on ParameterPooling on OptimizeBlockIOStorage on ZeroCross on AssertionControl "UseLocalSettings" ProdHWDeviceType "Microprocessor" ProdHWWordLengths "8,16,32,32" RTWSystemTargetFile "grt.tlc" RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off RTWRetainRTWFile off TLCProfiler off TLCDebug off TLCCoverage off TLCAssertion off BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Abs SaturateOnIntegerOverflow on ZeroCross on } Block { BlockType Clock DisplayTime off } Block { BlockType Constant Value "1" VectorParams1D on ShowAdditionalParam off OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" } Block { BlockType DataTypeConversion DataType "auto" SaturateOnIntegerOverflow on } Block { BlockType Demux Outputs "4" DisplayOption "none" BusSelectionMode off } Block { BlockType Derivative } Block { BlockType Display Format "short" Decimation "10" Floating off SampleTime "-1" } Block { BlockType Fcn Expr "sin(u[1])" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ShowAdditionalParam off ParameterDataTypeMode "Same as input" ParameterDataType "sfix(16)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "2^0" OutDataTypeMode "Same as input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Inport Port "1" PortDimensions "-1" SampleTime "-1" ShowAdditionalParam off LatchInput off DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" Interpolate on } Block { BlockType Integrator ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" ZeroCross on } Block { BlockType Logic Operator "AND" Inputs "2" ShowAdditionalParam off AllPortsSameDT on OutDataTypeMode "Logical (see Advanced Sim. Parameters)" LogicDataType "uint(8)" } Block { BlockType Lookup InputValues "[-4:5]" OutputValues " rand(1,10)-0.5" ShowAdditionalParam off LookUpMeth "Interpolation-Extrapolation" OutDataTypeMode "Same as input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Lookup2D RowIndex "[0 1]" ColumnIndex "[0 1]" OutputValues "[0 0;0 0]" ShowAdditionalParam off LookUpMeth "Interpolation-Extrapolation" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Math Operator "exp" OutputSignalType "auto" } Block { BlockType Mux Inputs "4" DisplayOption "none" } Block { BlockType Outport Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType RandomNumber Mean "0" Variance "1" Seed "0" SampleTime "-1" VectorParams1D on } Block { BlockType RelationalOperator Operator ">=" ShowAdditionalParam off InputSameDT on LogicOutDataTypeMode "Logical (see Advanced Sim. Parameters)" LogicDataType "uint(8)" ZeroCross on } Block { BlockType Saturate UpperLimit "0.5" LowerLimit "-0.5" LinearizeAsGain on ZeroCross on } Block { BlockType Selector InputType "Vector" ElementSrc "Internal" Elements "1" RowSrc "Internal" Rows "1" ColumnSrc "Internal" Columns "1" InputPortWidth "-1" } Block { BlockType "S-Function" FunctionName "system" PortCounts "[]" SFunctionModules "''" } Block { BlockType Signum ZeroCross on } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType Stop } Block { BlockType SubSystem ShowPortLabels on Permissions "ReadWrite" RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Switch Criteria "u2 >= Threshold" Threshold "0" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on } Block { BlockType Terminator } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" } Block { BlockType Trigonometry Operator "sin" OutputSignalType "auto" } Block { BlockType UnitDelay X0 "0" SampleTime "1" RTWStateStorageClass "Auto" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "aerosonde_dist" Location [-1513, 177, -298, 1051] Open on ModelBrowserVisibility off ModelBrowserWidth 212 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "120" ReportName "simulink-default.rpt" Block { BlockType Display Name "AOA" Ports [1] Position [755, 201, 840, 229] BackgroundColor "yellow" DropShadow on Decimation "1" } Block { BlockType Reference Name "Aerosonde UAV" Ports [3, 15] Position [340, 72, 455, 368] BackgroundColor "lightBlue" DropShadow on SourceBlock "aerosimlib/Complete Aircraft/6-DOF Aircraft Mod" "el\n(Body-frame EOM)" SourceType "6-DOF Aircraft Model" aircraftcfg "'aerosondecfg.mat'" VelocitiesIni "[23 0 0]'" RatesIni "[0 0 0]'" QuaternionsIni "[1 0 0 0]'" PositionIni "[45*pi/180 -122*pi/180 1000]'" FuelIni "2" OmegaIni "5000*pi/30" GndAlt "20" wmmfile "'C:\\Program Files\\AeroSim\\wmm.cof'" dmy "[11 25 2004]" tsamp "0.008" } Block { BlockType Display Name "Airspeed" Ports [1] Position [755, 86, 840, 114] BackgroundColor "yellow" DropShadow on Decimation "1" } Block { BlockType Display Name "Bank angle" Ports [1] Position [755, 251, 840, 279] BackgroundColor "yellow" DropShadow on Decimation "1" } Block { BlockType Integrator Name "Bank angle\nIntegrator" Ports [1, 1] Position [470, 490, 500, 520] Orientation "left" BackgroundColor "green" DropShadow on } Block { BlockType Gain Name "Bank-angle-to-Aileron\nIntegral" Position [385, 490, 415, 520] Orientation "left" BackgroundColor "yellow" DropShadow on Gain "0.05*pi/180" } Block { BlockType Gain Name "Bank-angle-to-Aileron\nProportional" Position [385, 425, 415, 455] Orientation "left" BackgroundColor "yellow" DropShadow on Gain "0.5*pi/180" } Block { BlockType Clock Name "Clock" Position [680, 415, 700, 435] Decimation "10" } Block { BlockType Demux Name "Demux" Ports [1, 3] Position [485, 86, 490, 154] ForegroundColor "blue" BackgroundColor "black" ShowName off Outputs "3" } Block { BlockType Demux Name "Demux1" Ports [1, 3] Position [555, 281, 560, 349] ForegroundColor "magenta" BackgroundColor "black" ShowName off Outputs "3" } Block { BlockType Demux Name "Demux2" Ports [1, 15] Position [645, 499, 650, 721] BackgroundColor "black" ShowName off Outputs "15" } Block { BlockType Constant Name "Flap" Position [180, 36, 220, 54] BackgroundColor "magenta" DropShadow on Value "0" } Block { BlockType Reference Name "FlightGear\nInterface" Ports [3] Position [840, 533, 915, 597] BackgroundColor "orange" DropShadow on SourceBlock "aerosimlib/Pilot Interface/FlightGear\nInterfac" "e" SourceType "FlightGear interface" hostname "'localhost'" tsamp "0.016" } Block { BlockType Display Name "Heading" Ports [1] Position [755, 351, 840, 379] BackgroundColor "yellow" DropShadow on Decimation "1" } Block { BlockType Constant Name "Ignition" Position [180, 231, 220, 249] BackgroundColor "magenta" DropShadow on } Block { BlockType Constant Name "Mixture" Position [180, 191, 220, 209] BackgroundColor "magenta" DropShadow on Value "13" } Block { BlockType Mux Name "Mux" Ports [7, 1] Position [295, 35, 300, 205] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [3, 1] Position [765, 647, 770, 693] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [4, 1] Position [885, 396, 890, 474] ShowName off DisplayOption "bar" } Block { BlockType Display Name "Pitch angle" Ports [1] Position [755, 301, 840, 329] BackgroundColor "yellow" DropShadow on Decimation "1" } Block { BlockType Reference Name "Radians\nto Degrees" Ports [1, 1] Position [505, 300, 530, 330] BackgroundColor "green" DropShadow on ShowName off SourceBlock "simulink_extras/Transformations/Radians\nto Deg" "rees" SourceType "RadiansToDegrees" } Block { BlockType Reference Name "Radians\nto Degrees1" Ports [1, 1] Position [545, 150, 570, 180] BackgroundColor "green" DropShadow on ShowName off SourceBlock "simulink_extras/Transformations/Radians\nto Deg" "rees" SourceType "RadiansToDegrees" } Block { BlockType Reference Name "Radians\nto Degrees2" Ports [1, 1] Position [545, 105, 570, 135] BackgroundColor "green" DropShadow on ShowName off SourceBlock "simulink_extras/Transformations/Radians\nto Deg" "rees" SourceType "RadiansToDegrees" } Block { BlockType Constant Name "Reset" Position [180, 311, 220, 329] BackgroundColor "magenta" DropShadow on Value "0" } Block { BlockType Constant Name "Rudder" Position [180, 111, 220, 129] BackgroundColor "magenta" DropShadow on Value "0" } Block { BlockType Display Name "Sideslip" Ports [1] Position [755, 151, 840, 179] BackgroundColor "yellow" DropShadow on Decimation "1" } Block { BlockType Stop Name "Stop Simulation\nwhen A/C on the ground" Position [490, 342, 525, 378] BackgroundColor "red" DropShadow on } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [320, 430, 340, 450] Orientation "left" BackgroundColor "green" DropShadow on ShowName off IconShape "round" Inputs "|++" } Block { BlockType ToWorkspace Name "To Workspace" Position [920, 425, 980, 455] VariableName "simout" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType Constant Name "Winds" Position [180, 271, 220, 289] BackgroundColor "magenta" DropShadow on Value "[0 0 0]" } Block { BlockType Step Name "elev" Position [90, 70, 120, 100] Time "100" After "0*pi/180" SampleTime "0" } Block { BlockType Step Name "throttle" Position [90, 140, 120, 170] Time "100" Before ".5" After ".8" SampleTime "0" } Line { SrcBlock "Reset" SrcPort 1 DstBlock "Aerosonde UAV" DstPort 3 } Line { SrcBlock "Winds" SrcPort 1 Points [95, 0; 0, -60] DstBlock "Aerosonde UAV" DstPort 2 } Line { SrcBlock "Aerosonde UAV" SrcPort 1 Points [170, 0] DstBlock "Demux2" DstPort 1 } Line { SrcBlock "Aerosonde UAV" SrcPort 6 Points [15, 0; 0, 135] Branch { Points [0, 155; 215, 0; 0, 95] DstBlock "FlightGear\nInterface" DstPort 2 } Branch { DstBlock "Radians\nto Degrees" DstPort 1 } } Line { SrcBlock "Aerosonde UAV" SrcPort 3 DstBlock "Demux" DstPort 1 } Line { SrcBlock "Demux" SrcPort 3 Points [0, 25] DstBlock "Radians\nto Degrees1" DstPort 1 } Line { SrcBlock "Demux" SrcPort 2 DstBlock "Radians\nto Degrees2" DstPort 1 } Line { SrcBlock "Demux" SrcPort 1 Points [225, 0] Branch { DstBlock "Airspeed" DstPort 1 } Branch { Points [0, 300] Branch { Points [0, 5] DstBlock "Mux2" DstPort 1 } Branch { Points [0, 185] DstBlock "FlightGear\nInterface" DstPort 3 } } } Line { SrcBlock "Radians\nto Degrees2" SrcPort 1 Points [165, 0] DstBlock "Sideslip" DstPort 1 } Line { SrcBlock "Aerosonde UAV" SrcPort 15 DstBlock "Stop Simulation\nwhen A/C on the ground" DstPort 1 } Line { SrcBlock "Radians\nto Degrees" SrcPort 1 DstBlock "Demux1" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 2 Points [175, 0] Branch { DstBlock "Pitch angle" DstPort 1 } Branch { Points [-10, 0; 0, 150] DstBlock "Mux2" DstPort 4 } } Line { SrcBlock "Demux1" SrcPort 3 Points [175, 0] DstBlock "Heading" DstPort 1 } Line { SrcBlock "Demux1" SrcPort 1 Points [0, 0; 5, 0] Branch { Points [0, -30] DstBlock "Bank angle" DstPort 1 } Branch { Points [0, 145; -50, 0] Branch { DstBlock "Bank-angle-to-Aileron\nProportional" DstPort 1 } Branch { Points [0, 65] DstBlock "Bank angle\nIntegrator" DstPort 1 } } } Line { SrcBlock "Flap" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Rudder" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Mixture" SrcPort 1 Points [15, 0; 0, -30] DstBlock "Mux" DstPort 6 } Line { SrcBlock "Ignition" SrcPort 1 Points [20, 0; 0, -45] DstBlock "Mux" DstPort 7 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Aerosonde UAV" DstPort 1 } Line { SrcBlock "Bank-angle-to-Aileron\nProportional" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Bank angle\nIntegrator" SrcPort 1 DstBlock "Bank-angle-to-Aileron\nIntegral" DstPort 1 } Line { SrcBlock "Bank-angle-to-Aileron\nIntegral" SrcPort 1 Points [-50, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Mux1" SrcPort 1 Points [30, 0; 0, -125] DstBlock "FlightGear\nInterface" DstPort 1 } Line { SrcBlock "Demux2" SrcPort 11 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Demux2" SrcPort 12 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Demux2" SrcPort 13 DstBlock "Mux1" DstPort 3 } Line { SrcBlock "Sum" SrcPort 1 Points [-55, 0; 0, -345] DstBlock "Mux" DstPort 3 } Line { SrcBlock "Clock" SrcPort 1 DstBlock "Mux2" DstPort 2 } Line { SrcBlock "Mux2" SrcPort 1 Points [0, 5] DstBlock "To Workspace" DstPort 1 } Line { SrcBlock "Radians\nto Degrees1" SrcPort 1 Points [30, 0; 0, 50] Branch { Points [0, 230] DstBlock "Mux2" DstPort 3 } Branch { DstBlock "AOA" DstPort 1 } } Line { SrcBlock "throttle" SrcPort 1 Points [155, 0] DstBlock "Mux" DstPort 5 } Line { SrcBlock "elev" SrcPort 1 Points "[0, 0; 0, -5; 60, 0; 30, 0; 0, 0; 65, 0; 0, -10" "; 10, 0]" DstBlock "Mux" DstPort 2 } Annotation { Name "Bank-angle to ailerons PI control" Position [359, 415] } } }