diff --git a/controls/.gitignore b/controls/.gitignore index 21229f76b17b687525514038ec23a451ae85a716..8b19222b04b8afacb65b2cf3b41651efc7b162e0 100644 --- a/controls/.gitignore +++ b/controls/.gitignore @@ -1 +1,2 @@ -*.asv \ No newline at end of file +*.asv +*.autosave \ No newline at end of file diff --git a/controls/MATLAB/IMU/accelerometer_noise_analysis.m b/controls/MATLAB/IMU/accelerometer_noise_analysis.m index ee2514e517e516399d7b305eeed170caec4a5f44..9e0b040576e1a549cd6061df09d00829da1e2c4b 100644 --- a/controls/MATLAB/IMU/accelerometer_noise_analysis.m +++ b/controls/MATLAB/IMU/accelerometer_noise_analysis.m @@ -14,6 +14,11 @@ gz = data.gz; % analyze the noise (deviation from mean) on each axis and compare the % emperical distribution to one generated from a quantized Gaussian % distrubtuion with the same variance. -quantized_accel_noise_gauss_anal( ax , 'x-axis') -quantized_accel_noise_gauss_anal( ay , 'y-axis') -quantized_accel_noise_gauss_anal( az , 'z-axis') \ No newline at end of file +quantized_noise_gauss_anal( ax , 'Accelerometer' , 'x-axis' , 'gs' ) +quantized_noise_gauss_anal( ay , 'Accelerometer' , 'y-axis', 'gs' ) +quantized_noise_gauss_anal( az , 'Accelerometer' , 'z-axis', 'gs' ) + + +quantized_noise_gauss_anal( gx , 'Gyroscope' , 'x-axis' , 'rad/s') +quantized_noise_gauss_anal( gy , 'Gyroscope' , 'y-axis' , 'rad/s' ) +quantized_noise_gauss_anal( gz , 'Gyroscope' , 'z-axis' , 'rad/s' ) \ No newline at end of file diff --git a/controls/MATLAB/IMU/microcart_imu_analysis_1.m b/controls/MATLAB/IMU/microcart_imu_analysis_1.m index 09315ae94fb91c26c66b80f0296f7c01c9b7a281..0315cd6cdbf10f924d18aa6753ad04a1a92b2841 100644 --- a/controls/MATLAB/IMU/microcart_imu_analysis_1.m +++ b/controls/MATLAB/IMU/microcart_imu_analysis_1.m @@ -88,7 +88,7 @@ stem(bins,h); legend(['Quantized Gaussian Noise: N(0,',num2str(vx),')'],'Emperical Distribution') -quantized_accel_noise_gauss_anal( ax ) +% quantized_accel_noise_gauss_anal( ax ) diff --git a/controls/MATLAB/IMU/quantized_accel_noise_gauss_anal.m b/controls/MATLAB/IMU/quantized_noise_gauss_anal.m similarity index 59% rename from controls/MATLAB/IMU/quantized_accel_noise_gauss_anal.m rename to controls/MATLAB/IMU/quantized_noise_gauss_anal.m index 229a09da924c719d0353479db7e16e227690d50f..17c1756c4c2927acca33f55a218c261c81c000bc 100644 --- a/controls/MATLAB/IMU/quantized_accel_noise_gauss_anal.m +++ b/controls/MATLAB/IMU/quantized_noise_gauss_anal.m @@ -1,16 +1,18 @@ -function varargout = quantized_accel_noise_gauss_anal( a , axis ) -% quantized_accel_noise_gauss_anal analysis for quantized acelerometer data +function varargout = quantized_noise_gauss_anal( a , sensor_name, axis , units ) +% quantized_noise_gauss_anal analysis for quantized sensor data % %SYNTAX -% quantized_accel_noise_gauss_anal( a , axis ) +% quantized_noise_gauss_anal(a , sensor_name, axis , units ) % %DESCRIPTION % ...to be written... % % %Inputs: -% a - vector of a single axis accelerometer reading -% axis - string specifying the axis label +% a - vector of a single axis accelerometer reading +% sensor_name - string specifying the axis label +% axis - string specifying the axis label +% units - string specifying the physical units on that axis % %Options: % none @@ -37,6 +39,10 @@ function varargout = quantized_accel_noise_gauss_anal( a , axis ) % Initial bare bones function. % - Matt Rich 11-15-2016 % +% Change funcdtion name and code to not specify what sensor it is for so it +% can be used for any sensor producing quantized output +% - Matt Rich 11-16-2016 +% mu = mean(a); v = var(a); @@ -59,14 +65,14 @@ cgauss_left = normcdf(bins_left,mue,sigma); emp_dist = length(ea)*(cgauss_right-cgauss_left); stairs(bins_left,emp_dist,'r','LineWidth',1) ; -xlabel('Error From Mean (gs)'); +xlabel(['Error From Mean (',units,')']); ylabel('Occurences'); grid; hold on; h = hist(ea,bins); stem(bins,h); legend(['Quantized Gaussian Noise: N(',num2str(mue),',',num2str(v),')'],'Emperical Distribution'); -title(['Accelerometer deviation from mean on ',axis]); +title([sensor_name,' deviation from mean on ',axis]); end diff --git a/controls/model/IMU_prototype.mdl b/controls/model/IMU_prototype.mdl new file mode 100644 index 0000000000000000000000000000000000000000..0719120da90753a997289c717475134c7fd8b8eb --- /dev/null +++ b/controls/model/IMU_prototype.mdl @@ -0,0 +1,1857 @@ +Model { + Name "IMU_prototype" + Version 8.5 + MdlSubVersion 0 + SavedCharacterEncoding "windows-1252" + GraphicalInterface { + NumRootInports 0 + NumRootOutports 0 + ParameterArgumentNames "" + ComputedModelVersion "1.7" + NumModelReferences 0 + NumTestPointedSignals 0 + } + ScopeRefreshTime 0.035000 + OverrideScopeRefreshTime on + DisableAllScopes on + DataTypeOverride "UseLocalSettings" + DataTypeOverrideAppliesTo "AllNumericTypes" + MinMaxOverflowLogging "UseLocalSettings" + MinMaxOverflowArchiveMode "Overwrite" + FPTRunName "Run 1" + MaxMDLFileLineLength 120 + Object { + $PropName "BdWindowsInfo" + $ObjectID 1 + $ClassName "Simulink.BDWindowsInfo" + Object { + $PropName "WindowsInfo" + $ObjectID 2 + $ClassName "Simulink.WindowInfo" + IsActive [1] + Location [750.0, 139.0, 1062.0, 703.0] + Object { + $PropName "ModelBrowserInfo" + $ObjectID 3 + $ClassName "Simulink.ModelBrowserInfo" + Visible [0] + DockPosition "Left" + Width [50] + Height [50] + Filter [8] + } + Object { + $PropName "ExplorerBarInfo" + $ObjectID 4 + $ClassName "Simulink.ExplorerBarInfo" + Visible [1] + } + Object { + $PropName "EditorsInfo" + $ObjectID 5 + $ClassName "Simulink.EditorInfo" + IsActive [1] + ViewObjType "SimulinkTopLevel" + LoadSaveID "0" + Extents [1028.0, 548.0] + ZoomFactor [1.0] + Offset [-12.68749862909317, -115.07500931620598] + } + } + } + Created "Wed Nov 16 14:00:52 2016" + Creator "m87rich" + UpdateHistory "UpdateHistoryNever" + ModifiedByFormat "%<Auto>" + LastModifiedBy "m87rich" + ModifiedDateFormat "%<Auto>" + LastModifiedDate "Wed Nov 16 14:55:39 2016" + RTWModifiedTimeStamp 401208787 + ModelVersionFormat "1.%<AutoIncrement:7>" + ConfigurationManager "none" + SampleTimeColors off + SampleTimeAnnotations off + LibraryLinkDisplay "disabled" + WideLines off + ShowLineDimensions off + ShowPortDataTypes off + ShowDesignRanges off + ShowLoopsOnError on + IgnoreBidirectionalLines off + ShowStorageClass off + ShowTestPointIcons on + ShowSignalResolutionIcons on + ShowViewerIcons on + SortedOrder off + ExecutionContextIcon off + ShowLinearizationAnnotations on + ShowMarkup on + BlockNameDataTip off + BlockParametersDataTip off + BlockDescriptionStringDataTip off + ToolBar on + StatusBar on + BrowserShowLibraryLinks off + BrowserLookUnderMasks off + SimulationMode "normal" + PauseTimes "5" + NumberOfSteps 1 + SnapshotBufferSize 10 + SnapshotInterval 10 + NumberOfLastSnapshots 0 + LinearizationMsg "none" + Profile off + ParamWorkspaceSource "MATLABWorkspace" + AccelSystemTargetFile "accel.tlc" + AccelTemplateMakefile "accel_default_tmf" + AccelMakeCommand "make_rtw" + TryForcingSFcnDF off + Object { + $PropName "DataLoggingOverride" + $ObjectID 6 + $ClassName "Simulink.SimulationData.ModelLoggingInfo" + model_ "IMU_prototype" + overrideMode_ [0U] + Array { + Type "Cell" + Dimension 1 + Cell "IMU_prototype" + PropName "logAsSpecifiedByModels_" + } + Array { + Type "Cell" + Dimension 1 + Cell [] + PropName "logAsSpecifiedByModelsSSIDs_" + } + } + RecordCoverage off + CovPath "/" + CovSaveName "covdata" + CovMetricSettings "dw" + CovNameIncrementing off + CovHtmlReporting on + CovForceBlockReductionOff on + CovEnableCumulative on + covSaveCumulativeToWorkspaceVar on + CovSaveSingleToWorkspaceVar on + CovCumulativeVarName "covCumulativeData" + CovCumulativeReport off + CovReportOnPause on + CovModelRefEnable "Off" + CovExternalEMLEnable off + CovSFcnEnable on + CovBoundaryAbsTol 0.000010 + CovBoundaryRelTol 0.010000 + CovUseTimeInterval off + CovStartTime 0 + CovStopTime 0 + ExtModeBatchMode off + ExtModeEnableFloating on + ExtModeTrigType "manual" + ExtModeTrigMode "normal" + ExtModeTrigPort "1" + ExtModeTrigElement "any" + ExtModeTrigDuration 1000 + ExtModeTrigDurationFloating "auto" + 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 + ShowModelReferenceBlockVersion off + ShowModelReferenceBlockIO off + Array { + Type "Handle" + Dimension 1 + Simulink.ConfigSet { + $ObjectID 7 + Version "1.15.0" + Array { + Type "Handle" + Dimension 8 + Simulink.SolverCC { + $ObjectID 8 + Version "1.15.0" + StartTime "0.0" + StopTime "1" + AbsTol "auto" + FixedStep "auto" + InitialStep "auto" + MaxNumMinSteps "-1" + MaxOrder 5 + ZcThreshold "auto" + ConsecutiveZCsStepRelTol "10*128*eps" + MaxConsecutiveZCs "1000" + ExtrapolationOrder 4 + NumberNewtonIterations 1 + MaxStep "auto" + MinStep "auto" + MaxConsecutiveMinStep "1" + RelTol "1e-3" + SolverMode "Auto" + EnableConcurrentExecution off + ConcurrentTasks off + Solver "ode45" + SolverName "ode45" + SolverJacobianMethodControl "auto" + ShapePreserveControl "DisableAll" + ZeroCrossControl "UseLocalSettings" + ZeroCrossAlgorithm "Nonadaptive" + AlgebraicLoopSolver "TrustRegion" + SolverResetMethod "Fast" + PositivePriorityOrder off + AutoInsertRateTranBlk off + SampleTimeConstraint "Unconstrained" + InsertRTBMode "Whenever possible" + } + Simulink.DataIOCC { + $ObjectID 9 + Version "1.15.0" + Decimation "1" + ExternalInput "[t, u]" + FinalStateName "xFinal" + InitialState "xInitial" + LimitDataPoints on + MaxDataPoints "1000" + LoadExternalInput off + LoadInitialState off + SaveFinalState off + SaveCompleteFinalSimState off + SaveFormat "Array" + SignalLoggingSaveFormat "Dataset" + SaveOutput on + SaveState off + SignalLogging on + DSMLogging on + InspectSignalLogs off + VisualizeSimOutput on + SaveTime on + ReturnWorkspaceOutputs off + StateSaveName "xout" + TimeSaveName "tout" + OutputSaveName "yout" + SignalLoggingName "logsout" + DSMLoggingName "dsmout" + OutputOption "RefineOutputTimes" + OutputTimes "[]" + ReturnWorkspaceOutputsName "out" + Refine "1" + } + Simulink.OptimizationCC { + $ObjectID 10 + Version "1.15.0" + Array { + Type "Cell" + Dimension 8 + Cell "BooleansAsBitfields" + Cell "PassReuseOutputArgsAs" + Cell "PassReuseOutputArgsThreshold" + Cell "ZeroExternalMemoryAtStartup" + Cell "ZeroInternalMemoryAtStartup" + Cell "OptimizeModelRefInitCode" + Cell "NoFixptDivByZeroProtection" + Cell "UseSpecifiedMinMax" + PropName "DisabledProps" + } + BlockReduction on + BooleanDataType on + ConditionallyExecuteInputs on + InlineParams off + UseDivisionForNetSlopeComputation "off" + UseFloatMulNetSlope off + DefaultUnderspecifiedDataType "double" + UseSpecifiedMinMax off + InlineInvariantSignals off + OptimizeBlockIOStorage on + BufferReuse on + EnhancedBackFolding off + CachingGlobalReferences off + GlobalBufferReuse on + StrengthReduction off + ExpressionFolding on + BooleansAsBitfields off + BitfieldContainerType "uint_T" + EnableMemcpy on + MemcpyThreshold 64 + PassReuseOutputArgsAs "Structure reference" + PassReuseOutputArgsThreshold 12 + ExpressionDepthLimit 128 + LocalBlockOutputs on + RollThreshold 5 + StateBitsets off + DataBitsets off + ActiveStateOutputEnumStorageType "Native Integer" + ZeroExternalMemoryAtStartup on + ZeroInternalMemoryAtStartup on + InitFltsAndDblsToZero off + NoFixptDivByZeroProtection off + EfficientFloat2IntCast off + EfficientMapNaN2IntZero on + OptimizeModelRefInitCode off + LifeSpan "inf" + MaxStackSize "Inherit from target" + BufferReusableBoundary on + SimCompilerOptimization "off" + AccelVerboseBuild off + } + Simulink.DebuggingCC { + $ObjectID 11 + Version "1.15.0" + RTPrefix "error" + ConsistencyChecking "none" + ArrayBoundsChecking "none" + SignalInfNanChecking "none" + SignalRangeChecking "none" + ReadBeforeWriteMsg "UseLocalSettings" + WriteAfterWriteMsg "UseLocalSettings" + WriteAfterReadMsg "UseLocalSettings" + AlgebraicLoopMsg "warning" + ArtificialAlgebraicLoopMsg "warning" + SaveWithDisabledLinksMsg "warning" + SaveWithParameterizedLinksMsg "warning" + CheckSSInitialOutputMsg on + UnderspecifiedInitializationDetection "Simplified" + MergeDetectMultiDrivingBlocksExec "error" + CheckExecutionContextPreStartOutputMsg off + CheckExecutionContextRuntimeOutputMsg off + SignalResolutionControl "UseLocalSettings" + BlockPriorityViolationMsg "warning" + MinStepSizeMsg "warning" + TimeAdjustmentMsg "none" + MaxConsecutiveZCsMsg "error" + MaskedZcDiagnostic "warning" + IgnoredZcDiagnostic "warning" + SolverPrmCheckMsg "none" + InheritedTsInSrcMsg "warning" + DiscreteInheritContinuousMsg "warning" + MultiTaskDSMMsg "error" + MultiTaskCondExecSysMsg "error" + MultiTaskRateTransMsg "error" + SingleTaskRateTransMsg "none" + TasksWithSamePriorityMsg "warning" + SigSpecEnsureSampleTimeMsg "warning" + CheckMatrixSingularityMsg "none" + IntegerOverflowMsg "warning" + Int32ToFloatConvMsg "warning" + ParameterDowncastMsg "error" + ParameterOverflowMsg "error" + ParameterUnderflowMsg "none" + ParameterPrecisionLossMsg "warning" + ParameterTunabilityLossMsg "warning" + FixptConstUnderflowMsg "none" + FixptConstOverflowMsg "none" + FixptConstPrecisionLossMsg "none" + UnderSpecifiedDataTypeMsg "none" + UnnecessaryDatatypeConvMsg "none" + VectorMatrixConversionMsg "none" + InvalidFcnCallConnMsg "error" + FcnCallInpInsideContextMsg "EnableAllAsError" + SignalLabelMismatchMsg "none" + UnconnectedInputMsg "warning" + UnconnectedOutputMsg "warning" + UnconnectedLineMsg "warning" + SFcnCompatibilityMsg "none" + FrameProcessingCompatibilityMsg "error" + UniqueDataStoreMsg "none" + BusObjectLabelMismatch "warning" + RootOutportRequireBusObject "warning" + AssertControl "UseLocalSettings" + ModelReferenceIOMsg "none" + ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" + ModelReferenceVersionMismatchMessage "none" + ModelReferenceIOMismatchMessage "none" + UnknownTsInhSupMsg "warning" + ModelReferenceDataLoggingMessage "warning" + ModelReferenceSymbolNameMessage "warning" + ModelReferenceExtraNoncontSigs "error" + StateNameClashWarn "none" + SimStateInterfaceChecksumMismatchMsg "warning" + SimStateOlderReleaseMsg "error" + InitInArrayFormatMsg "warning" + StrictBusMsg "ErrorLevel1" + BusNameAdapt "WarnAndRepair" + NonBusSignalsTreatedAsBus "none" + BlockIODiagnostic "none" + SFUnusedDataAndEventsDiag "warning" + SFUnexpectedBacktrackingDiag "warning" + SFInvalidInputDataAccessInChartInitDiag "warning" + SFNoUnconditionalDefaultTransitionDiag "warning" + SFTransitionOutsideNaturalParentDiag "warning" + SFUnconditionalTransitionShadowingDiag "warning" + SFUndirectedBroadcastEventsDiag "warning" + SFTransitionActionBeforeConditionDiag "warning" + SFOutputUsedAsStateInMooreChartDiag "error" + IntegerSaturationMsg "warning" + } + Simulink.HardwareCC { + $ObjectID 12 + Version "1.15.0" + ProdBitPerChar 8 + ProdBitPerShort 16 + ProdBitPerInt 32 + ProdBitPerLong 32 + ProdBitPerLongLong 64 + ProdBitPerFloat 32 + ProdBitPerDouble 64 + ProdBitPerPointer 32 + ProdLargestAtomicInteger "Char" + ProdLargestAtomicFloat "None" + ProdIntDivRoundTo "Undefined" + ProdEndianess "Unspecified" + ProdWordSize 32 + ProdShiftRightIntArith on + ProdLongLongMode off + ProdHWDeviceType "32-bit Generic" + TargetBitPerChar 8 + TargetBitPerShort 16 + TargetBitPerInt 32 + TargetBitPerLong 32 + TargetBitPerLongLong 64 + TargetBitPerFloat 32 + TargetBitPerDouble 64 + TargetBitPerPointer 32 + TargetLargestAtomicInteger "Char" + TargetLargestAtomicFloat "None" + TargetShiftRightIntArith on + TargetLongLongMode off + TargetIntDivRoundTo "Undefined" + TargetEndianess "Unspecified" + TargetWordSize 32 + TargetPreprocMaxBitsSint 32 + TargetPreprocMaxBitsUint 32 + TargetHWDeviceType "Specified" + TargetUnknown off + ProdEqTarget on + } + Simulink.ModelReferenceCC { + $ObjectID 13 + Version "1.15.0" + UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" + CheckModelReferenceTargetMessage "error" + EnableParallelModelReferenceBuilds off + ParallelModelReferenceErrorOnInvalidPool on + ParallelModelReferenceMATLABWorkerInit "None" + ModelReferenceNumInstancesAllowed "Multi" + PropagateVarSize "Infer from blocks in model" + ModelReferencePassRootInputsByReference on + ModelReferenceMinAlgLoopOccurrences off + PropagateSignalLabelsOutOfModel off + SupportModelReferenceSimTargetCustomCode off + } + Simulink.SFSimCC { + $ObjectID 14 + Version "1.15.0" + SFSimOverflowDetection on + SFSimEcho on + SimCtrlC on + SimIntegrity on + SimUseLocalCustomCode off + SimParseCustomCode on + SimBuildMode "sf_incremental_build" + SimGenImportedTypeDefs off + } + Simulink.RTWCC { + $BackupClass "Simulink.RTWCC" + $ObjectID 15 + Version "1.15.0" + Array { + Type "Cell" + Dimension 16 + Cell "IncludeHyperlinkInReport" + Cell "GenerateTraceInfo" + Cell "GenerateTraceReport" + Cell "GenerateTraceReportSl" + Cell "GenerateTraceReportSf" + Cell "GenerateTraceReportEml" + Cell "PortableWordSizes" + Cell "GenerateWebview" + Cell "GenerateCodeMetricsReport" + Cell "GenerateCodeReplacementReport" + Cell "GenerateMissedCodeReplacementReport" + Cell "GenerateErtSFunction" + Cell "CreateSILPILBlock" + Cell "CodeExecutionProfiling" + Cell "CodeProfilingSaveOptions" + Cell "CodeProfilingInstrumentation" + PropName "DisabledProps" + } + SystemTargetFile "grt.tlc" + TLCOptions "" + GenCodeOnly off + MakeCommand "make_rtw" + GenerateMakefile on + PackageGeneratedCodeAndArtifacts off + PackageName "" + TemplateMakefile "grt_default_tmf" + PostCodeGenCommand "" + Description "" + GenerateReport off + SaveLog off + RTWVerbose on + RetainRTWFile off + ProfileTLC off + TLCDebug off + TLCCoverage off + TLCAssert off + RTWUseLocalCustomCode off + RTWUseSimCustomCode off + CustomSourceCode "" + CustomHeaderCode "" + CustomInclude "" + CustomSource "" + CustomLibrary "" + CustomInitializer "" + CustomTerminator "" + Toolchain "Automatically locate an installed toolchain" + BuildConfiguration "Faster Builds" + IncludeHyperlinkInReport off + LaunchReport off + PortableWordSizes off + CreateSILPILBlock "None" + CodeExecutionProfiling off + CodeExecutionProfileVariable "executionProfile" + CodeProfilingSaveOptions "SummaryOnly" + CodeProfilingInstrumentation off + SILDebugging off + TargetLang "C" + IncludeBusHierarchyInRTWFileBlockHierarchyMap off + GenerateTraceInfo off + GenerateTraceReport off + GenerateTraceReportSl off + GenerateTraceReportSf off + GenerateTraceReportEml off + GenerateWebview off + GenerateCodeMetricsReport off + GenerateCodeReplacementReport off + GenerateMissedCodeReplacementReport off + RTWCompilerOptimization "off" + RTWCustomCompilerOptimizations "" + CheckMdlBeforeBuild "Off" + SharedConstantsCachingThreshold 1024 + Array { + Type "Handle" + Dimension 2 + Simulink.CodeAppCC { + $ObjectID 16 + Version "1.15.0" + Array { + Type "Cell" + Dimension 24 + Cell "IgnoreCustomStorageClasses" + Cell "ParameterTuningSideEffectCode" + Cell "IgnoreTestpoints" + Cell "InsertBlockDesc" + Cell "InsertPolySpaceComments" + Cell "SFDataObjDesc" + Cell "MATLABFcnDesc" + Cell "SimulinkDataObjDesc" + Cell "DefineNamingRule" + Cell "SignalNamingRule" + Cell "ParamNamingRule" + Cell "InternalIdentifier" + Cell "InlinedPrmAccess" + Cell "CustomSymbolStr" + Cell "CustomSymbolStrGlobalVar" + Cell "CustomSymbolStrType" + Cell "CustomSymbolStrField" + Cell "CustomSymbolStrFcn" + Cell "CustomSymbolStrFcnArg" + Cell "CustomSymbolStrBlkIO" + Cell "CustomSymbolStrTmpVar" + Cell "CustomSymbolStrMacro" + Cell "CustomSymbolStrUtil" + Cell "ReqsInCode" + PropName "DisabledProps" + } + ForceParamTrailComments off + GenerateComments on + CommentStyle "Auto" + IgnoreCustomStorageClasses on + IgnoreTestpoints off + IncHierarchyInIds off + MaxIdLength 31 + PreserveName off + PreserveNameWithParent off + ShowEliminatedStatement off + OperatorAnnotations off + IncAutoGenComments off + SimulinkDataObjDesc off + SFDataObjDesc off + MATLABFcnDesc off + IncDataTypeInIds off + MangleLength 1 + CustomSymbolStrGlobalVar "$R$N$M" + CustomSymbolStrType "$N$R$M_T" + CustomSymbolStrField "$N$M" + CustomSymbolStrFcn "$R$N$M$F" + CustomSymbolStrFcnArg "rt$I$N$M" + CustomSymbolStrBlkIO "rtb_$N$M" + CustomSymbolStrTmpVar "$N$M" + CustomSymbolStrMacro "$R$N$M" + CustomSymbolStrUtil "$N$C" + DefineNamingRule "None" + ParamNamingRule "None" + SignalNamingRule "None" + InsertBlockDesc off + InsertPolySpaceComments off + SimulinkBlockComments on + MATLABSourceComments off + EnableCustomComments off + InternalIdentifier "Shortened" + InlinedPrmAccess "Literals" + ReqsInCode off + UseSimReservedNames off + } + Simulink.GRTTargetCC { + $BackupClass "Simulink.TargetCC" + $ObjectID 17 + Version "1.15.0" + Array { + Type "Cell" + Dimension 13 + Cell "GeneratePreprocessorConditionals" + Cell "IncludeMdlTerminateFcn" + Cell "SuppressErrorStatus" + Cell "ERTCustomFileBanners" + Cell "GenerateSampleERTMain" + Cell "GenerateTestInterfaces" + Cell "ModelStepFunctionPrototypeControlCompliant" + Cell "GenerateAllocFcn" + Cell "PurelyIntegerCode" + Cell "SupportComplex" + Cell "SupportAbsoluteTime" + Cell "SupportContinuousTime" + Cell "SupportNonInlinedSFcns" + PropName "DisabledProps" + } + TargetFcnLib "ansi_tfl_table_tmw.mat" + TargetLibSuffix "" + TargetPreCompLibLocation "" + GenFloatMathFcnCalls "NOT IN USE" + TargetLangStandard "C89/C90 (ANSI)" + CodeReplacementLibrary "None" + UtilityFuncGeneration "Auto" + ERTMultiwordTypeDef "System defined" + ERTMultiwordLength 256 + MultiwordLength 2048 + GenerateFullHeader on + InferredTypesCompatibility off + GenerateSampleERTMain off + GenerateTestInterfaces off + ModelReferenceCompliant on + ParMdlRefBuildCompliant on + CompOptLevelCompliant on + ConcurrentExecutionCompliant on + IncludeMdlTerminateFcn on + GeneratePreprocessorConditionals "Disable all" + CombineOutputUpdateFcns on + CombineSignalStateStructs off + SuppressErrorStatus off + ERTFirstTimeCompliant off + IncludeFileDelimiter "Auto" + ERTCustomFileBanners off + SupportAbsoluteTime on + LogVarNameModifier "rt_" + MatFileLogging on + MultiInstanceERTCode off + CodeInterfacePackaging "Nonreusable function" + SupportNonFinite on + SupportComplex on + PurelyIntegerCode off + SupportContinuousTime on + SupportNonInlinedSFcns on + SupportVariableSizeSignals off + ParenthesesLevel "Nominal" + CastingMode "Nominal" + MATLABClassNameForMDSCustomization "Simulink.SoftwareTarget.GRTCustomization" + ModelStepFunctionPrototypeControlCompliant off + CPPClassGenCompliant on + AutosarCompliant off + GRTInterface off + GenerateAllocFcn off + GenerateSharedConstants on + UseMalloc off + ExtMode off + ExtModeStaticAlloc off + ExtModeTesting off + ExtModeStaticAllocSize 1000000 + ExtModeTransport 0 + ExtModeMexFile "ext_comm" + ExtModeIntrfLevel "Level1" + RTWCAPISignals off + RTWCAPIParams off + RTWCAPIStates off + RTWCAPIRootIO off + GenerateASAP2 off + MultiInstanceErrorCode "Error" + } + PropName "Components" + } + } + PropName "Components" + } + Name "Configuration" + CurrentDlgPage "Solver" + ConfigPrmDlgPosition [ 228, 112, 1308, 752 ] + } + PropName "ConfigurationSets" + } + Simulink.ConfigSet { + $PropName "ActiveConfigurationSet" + $ObjectID 7 + } + Object { + $PropName "DataTransfer" + $ObjectID 18 + $ClassName "Simulink.GlobalDataTransfer" + DefaultTransitionBetweenSyncTasks "Ensure deterministic transfer (maximum delay)" + DefaultTransitionBetweenAsyncTasks "Ensure data integrity only" + DefaultTransitionBetweenContTasks "Ensure deterministic transfer (minimum delay)" + DefaultExtrapolationMethodBetweenContTasks "None" + AutoInsertRateTranBlk [0] + } + ExplicitPartitioning off + BlockDefaults { + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + NamePlacement "normal" + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + ShowName on + BlockRotation 0 + BlockMirror off + } + AnnotationDefaults { + HorizontalAlignment "center" + VerticalAlignment "middle" + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + UseDisplayTextAsClickCallback off + } + LineDefaults { + FontName "Helvetica" + FontSize 9 + FontWeight "normal" + FontAngle "normal" + } + MaskDefaults { + SelfModifiable "off" + IconFrame "on" + IconOpaque "on" + RunInitForIconRedraw "off" + IconRotate "none" + PortRotate "default" + IconUnits "autoscale" + } + MaskParameterDefaults { + Evaluate "on" + Tunable "on" + NeverSave "off" + Internal "off" + ReadOnly "off" + Enabled "on" + Visible "on" + ToolTip "on" + } + BlockParameterDefaults { + Block { + BlockType Constant + Value "1" + VectorParams1D on + SamplingMode "Sample based" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: Inherit from 'Constant value'" + LockScale off + SampleTime "inf" + FramePeriod "inf" + PreserveConstantTs off + } + Block { + BlockType Demux + Outputs "4" + DisplayOption "none" + BusSelectionMode off + } + Block { + BlockType Ground + } + Block { + BlockType Inport + Port "1" + OutputFunctionCall off + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: auto" + LockScale off + BusOutputAsStruct off + PortDimensions "-1" + VarSizeSig "Inherit" + SampleTime "-1" + SignalType "auto" + SamplingMode "auto" + LatchByDelayingOutsideSignal off + LatchInputForFeedbackSignals off + Interpolate on + } + Block { + BlockType Outport + Port "1" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: auto" + LockScale off + BusOutputAsStruct off + PortDimensions "-1" + VarSizeSig "Inherit" + SampleTime "-1" + SignalType "auto" + SamplingMode "auto" + SourceOfInitialOutputValue "Dialog" + OutputWhenDisabled "held" + InitialOutput "[]" + } + Block { + BlockType Quantizer + QuantizationInterval "0.5" + LinearizeAsGain on + SampleTime "-1" + } + Block { + BlockType RandomNumber + Mean "0" + Variance "1" + Seed "0" + SampleTime "-1" + VectorParams1D on + } + Block { + BlockType S-Function + FunctionName "system" + SFunctionModules "''" + PortCounts "[]" + SFunctionDeploymentMode off + EnableBusSupport off + } + Block { + BlockType Scope + ModelBased off + TickLabels "OneTimeTick" + ZoomMode "on" + Grid "on" + ShowLegends off + TimeRange "auto" + YMin "-5" + YMax "5" + SaveToWorkspace off + SaveName "ScopeData" + DataFormat "Array" + LimitDataPoints on + MaxDataPoints "5000" + Decimation "1" + SampleInput off + SampleTime "-1" + ScrollMode off + } + Block { + BlockType SubSystem + ShowPortLabels "FromPortIcon" + Permissions "ReadWrite" + PermitHierarchicalResolution "All" + TreatAsAtomicUnit off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + CheckFcnCallInpInsideContextMsg off + SystemSampleTime "-1" + RTWSystemCode "Auto" + RTWFcnNameOpts "Auto" + RTWFileNameOpts "Auto" + FunctionInterfaceSpec "void_void" + FunctionWithSeparateData off + RTWMemSecFuncInitTerm "Inherit from model" + RTWMemSecFuncExecute "Inherit from model" + RTWMemSecDataConstants "Inherit from model" + RTWMemSecDataInternal "Inherit from model" + RTWMemSecDataParameters "Inherit from model" + SimViewingDevice off + DataTypeOverride "UseLocalSettings" + DataTypeOverrideAppliesTo "AllNumericTypes" + MinMaxOverflowLogging "UseLocalSettings" + Opaque off + MaskHideContents off + SFBlockType "NONE" + Variant off + GeneratePreprocessorConditionals off + ContentPreviewEnabled off + IsWebBlock off + } + Block { + BlockType Sum + IconShape "rectangular" + Inputs "++" + CollapseMode "All dimensions" + CollapseDim "1" + InputSameDT on + AccumDataTypeStr "Inherit: Inherit via internal rule" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: Same as first input" + LockScale off + RndMeth "Floor" + SaturateOnIntegerOverflow on + SampleTime "-1" + } + Block { + BlockType Terminator + } + Block { + BlockType ZeroOrderHold + SampleTime "1" + } + } + System { + Name "IMU_prototype" + Location [750, 139, 1812, 842] + Open on + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "usletter" + PaperUnits "inches" + TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + ReportName "simulink-default.rpt" + SIDHighWatermark "33" + Block { + BlockType Constant + Name "Constant" + SID "5" + Position [20, 75, 50, 105] + ZOrder 5 + Value "zeros(3,1)" + SampleTime "0" + } + Block { + BlockType SubSystem + Name "IMU" + SID "20" + Ports [4, 2] + Position [365, 81, 550, 174] + ZOrder 20 + RequestExecContextInheritance off + System { + Name "IMU" + Location [750, 139, 1812, 842] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "usletter" + PaperUnits "inches" + TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "dv" + SID "21" + Position [110, 173, 140, 187] + ZOrder 17 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "v" + SID "29" + Position [110, 208, 140, 222] + ZOrder 25 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Omega" + SID "30" + Position [110, 243, 140, 257] + ZOrder 26 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "g" + SID "31" + Position [110, 278, 140, 292] + ZOrder 27 + Port "4" + IconDisplay "Port number" + } + Block { + BlockType Ground + Name "Ground" + SID "27" + Position [500, 460, 520, 480] + ZOrder 23 + } + Block { + BlockType Ground + Name "Ground1" + SID "28" + Position [500, 30, 520, 50] + ZOrder 24 + } + Block { + BlockType SubSystem + Name "MATLAB Function" + SID "1" + Ports [5, 2] + Position [250, 165, 445, 335] + ZOrder 1 + LibraryVersion "1.32" + ErrorFcn "Stateflow.Translate.translate" + PermitHierarchicalResolution "ExplicitOnly" + TreatAsAtomicUnit on + RequestExecContextInheritance off + SFBlockType "MATLAB Function" + System { + Name "MATLAB Function" + Location [223, 338, 826, 833] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "usletter" + PaperUnits "inches" + TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + SIDHighWatermark "23" + Block { + BlockType Inport + Name "dv" + SID "1::1" + Position [20, 101, 40, 119] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "v" + SID "1::22" + Position [20, 136, 40, 154] + ZOrder 13 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Omega" + SID "1::19" + Position [20, 171, 40, 189] + ZOrder 10 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "g" + SID "1::20" + Position [20, 206, 40, 224] + ZOrder 11 + Port "4" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "r_oc" + SID "1::23" + Position [20, 246, 40, 264] + ZOrder 14 + Port "5" + IconDisplay "Port number" + } + Block { + BlockType Demux + Name " Demux " + SID "1::17" + Ports [1, 1] + Position [270, 230, 320, 270] + ZOrder 8 + Outputs "1" + } + Block { + BlockType S-Function + Name " SFunction " + SID "1::16" + Tag "Stateflow S-Function IMU_prototype 2" + Ports [5, 3] + Position [180, 105, 230, 225] + ZOrder 7 + FunctionName "sf_sfun" + PortCounts "[5 3]" + EnableBusSupport on + Port { + PortNumber 2 + Name "accel_reading" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 3 + Name "gyro_reading" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Terminator + Name " Terminator " + SID "1::18" + Position [460, 241, 480, 259] + ZOrder 9 + } + Block { + BlockType Outport + Name "accel_reading" + SID "1::5" + Position [460, 101, 480, 119] + ZOrder -5 + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "gyro_reading" + SID "1::21" + Position [460, 136, 480, 154] + ZOrder 12 + Port "2" + IconDisplay "Port number" + } + Line { + ZOrder 43 + SrcBlock "dv" + SrcPort 1 + DstBlock " SFunction " + DstPort 1 + } + Line { + ZOrder 44 + SrcBlock "v" + SrcPort 1 + DstBlock " SFunction " + DstPort 2 + } + Line { + ZOrder 45 + SrcBlock "Omega" + SrcPort 1 + DstBlock " SFunction " + DstPort 3 + } + Line { + ZOrder 46 + SrcBlock "g" + SrcPort 1 + DstBlock " SFunction " + DstPort 4 + } + Line { + ZOrder 47 + SrcBlock "r_oc" + SrcPort 1 + DstBlock " SFunction " + DstPort 5 + } + Line { + Name "accel_reading" + ZOrder 48 + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 2 + DstBlock "accel_reading" + DstPort 1 + } + Line { + Name "gyro_reading" + ZOrder 49 + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 3 + DstBlock "gyro_reading" + DstPort 1 + } + Line { + ZOrder 50 + SrcBlock " Demux " + SrcPort 1 + DstBlock " Terminator " + DstPort 1 + } + Line { + ZOrder 51 + SrcBlock " SFunction " + SrcPort 1 + DstBlock " Demux " + DstPort 1 + } + } + } + Block { + BlockType Sum + Name "Sum" + SID "7" + Ports [2, 1] + Position [690, 285, 710, 305] + ZOrder 7 + ShowName off + IconShape "round" + Inputs "|++" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Sum + Name "Sum1" + SID "8" + Ports [2, 1] + Position [690, 200, 710, 220] + ZOrder 8 + ShowName off + IconShape "round" + Inputs "++|" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Sum + Name "Sum2" + SID "11" + Ports [2, 1] + Position [570, 285, 590, 305] + ZOrder 11 + ShowName off + IconShape "round" + Inputs "|++" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Sum + Name "Sum3" + SID "12" + Ports [2, 1] + Position [570, 200, 590, 220] + ZOrder 12 + ShowName off + IconShape "round" + Inputs "++|" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType RandomNumber + Name "accelerometer_noise" + SID "2" + Position [630, 140, 660, 170] + ZOrder 2 + Mean "zeros(3,1)" + Variance "[ 3e-7 ; 3.3e-7 ; 7.2e-7 ] " + Seed "[0,1,2]" + SampleTime "6.1e-3" + } + Block { + BlockType Quantizer + Name "accelerometer_quantizer" + SID "9" + Position [770, 195, 800, 225] + ZOrder 9 + QuantizationInterval "2.4400e-04" + } + Block { + BlockType ZeroOrderHold + Name "accelerometer_sampling" + SID "15" + Position [495, 195, 530, 225] + ZOrder 15 + SampleTime "6.1e-3" + } + Block { + BlockType RandomNumber + Name "gyroscope_noise" + SID "6" + Position [630, 315, 660, 345] + ZOrder 6 + Mean "zeros(3,1)" + Variance "[ 2.2e-8 ; 1.1e-7 ; 2.4e-8 ]" + Seed "[0,1,2]" + SampleTime "6.1e-3" + } + Block { + BlockType Quantizer + Name "gyroscope_qunatizer" + SID "10" + Position [770, 280, 800, 310] + ZOrder 10 + QuantizationInterval "1.1e-3" + } + Block { + BlockType ZeroOrderHold + Name "gyroscope_sampling" + SID "16" + Position [495, 280, 530, 310] + ZOrder 16 + SampleTime "6.1e-3" + } + Block { + BlockType Constant + Name "r_oc" + SID "32" + Position [95, 307, 160, 333] + ZOrder 28 + Value "zeros(3,1)" + } + Block { + BlockType Outport + Name "accelerometer" + SID "33" + Position [885, 203, 915, 217] + ZOrder 29 + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "gyroscope" + SID "25" + Position [885, 288, 915, 302] + ZOrder 21 + Port "2" + IconDisplay "Port number" + } + Line { + ZOrder 51 + SrcBlock "gyroscope_qunatizer" + SrcPort 1 + DstBlock "gyroscope" + DstPort 1 + } + Line { + ZOrder 61 + SrcBlock "accelerometer_quantizer" + SrcPort 1 + DstBlock "accelerometer" + DstPort 1 + } + Line { + ZOrder 1 + SrcBlock "accelerometer_noise" + SrcPort 1 + Points [35, 0] + DstBlock "Sum1" + DstPort 1 + } + Line { + ZOrder 22 + SrcBlock "Sum" + SrcPort 1 + DstBlock "gyroscope_qunatizer" + DstPort 1 + } + Line { + ZOrder 24 + SrcBlock "Sum2" + SrcPort 1 + DstBlock "Sum" + DstPort 1 + } + Line { + ZOrder 25 + SrcBlock "Sum3" + SrcPort 1 + DstBlock "Sum1" + DstPort 2 + } + Line { + ZOrder 23 + SrcBlock "MATLAB Function" + SrcPort 2 + DstBlock "gyroscope_sampling" + DstPort 1 + } + Line { + ZOrder 18 + SrcBlock "gyroscope_noise" + SrcPort 1 + Points [35, 0] + DstBlock "Sum" + DstPort 2 + } + Line { + ZOrder 26 + SrcBlock "MATLAB Function" + SrcPort 1 + DstBlock "accelerometer_sampling" + DstPort 1 + } + Line { + ZOrder 21 + SrcBlock "Sum1" + SrcPort 1 + DstBlock "accelerometer_quantizer" + DstPort 1 + } + Line { + ZOrder 31 + SrcBlock "gyroscope_sampling" + SrcPort 1 + DstBlock "Sum2" + DstPort 1 + } + Line { + ZOrder 30 + SrcBlock "accelerometer_sampling" + SrcPort 1 + DstBlock "Sum3" + DstPort 2 + } + Line { + ZOrder 52 + SrcBlock "Ground" + SrcPort 1 + Points [55, 0] + DstBlock "Sum2" + DstPort 2 + } + Line { + ZOrder 53 + SrcBlock "Ground1" + SrcPort 1 + Points [55, 0] + DstBlock "Sum3" + DstPort 1 + } + Line { + ZOrder 56 + SrcBlock "dv" + SrcPort 1 + DstBlock "MATLAB Function" + DstPort 1 + } + Line { + ZOrder 57 + SrcBlock "v" + SrcPort 1 + DstBlock "MATLAB Function" + DstPort 2 + } + Line { + ZOrder 58 + SrcBlock "Omega" + SrcPort 1 + DstBlock "MATLAB Function" + DstPort 3 + } + Line { + ZOrder 59 + SrcBlock "g" + SrcPort 1 + DstBlock "MATLAB Function" + DstPort 4 + } + Line { + ZOrder 60 + SrcBlock "r_oc" + SrcPort 1 + DstBlock "MATLAB Function" + DstPort 5 + } + } + } + Block { + BlockType Scope + Name "Scope" + SID "3" + Ports [1] + Position [635, 134, 665, 166] + ZOrder 3 + Floating off + Location [1, 55, 1921, 1029] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "%<SignalLabel>" + } + List { + ListType ScopeGraphics + FigureColor "[0.5 0.5 0.5]" + AxesColor "[0 0 0]" + AxesTickColor "[1 1 1]" + LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + } + Block { + BlockType Scope + Name "Scope1" + SID "13" + Ports [1] + Position [590, 89, 620, 121] + ZOrder 13 + Floating off + Location [188, 365, 512, 604] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "%<SignalLabel>" + } + List { + ListType ScopeGraphics + FigureColor "[0.5 0.5 0.5]" + AxesColor "[0 0 0]" + AxesTickColor "[1 1 1]" + LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + SaveName "ScopeData1" + } + Line { + ZOrder 55 + SrcBlock "IMU" + SrcPort 1 + DstBlock "Scope1" + DstPort 1 + } + Line { + ZOrder 47 + SrcBlock "Constant" + SrcPort 1 + Points [261, 0] + Branch { + ZOrder 50 + Points [0, 25; 1, 0] + Branch { + ZOrder 52 + Points [0, 25; 3, 0] + Branch { + ZOrder 54 + Points [0, 25] + DstBlock "IMU" + DstPort 4 + } + Branch { + ZOrder 53 + DstBlock "IMU" + DstPort 3 + } + } + Branch { + ZOrder 51 + DstBlock "IMU" + DstPort 2 + } + } + Branch { + ZOrder 49 + DstBlock "IMU" + DstPort 1 + } + } + Line { + ZOrder 56 + SrcBlock "IMU" + SrcPort 2 + DstBlock "Scope" + DstPort 1 + } + } +} +#Finite State Machines +# +# Stateflow 80000005 +# +# +Stateflow { + machine { + id 1 + name "IMU_prototype" + created "16-Nov-2016 14:11:28" + isLibrary 0 + firstTarget 14 + sfVersion 80000005 + } + chart { + id 2 + name "IMU/MATLAB Function" + windowPosition [422 539.941 189 413] + viewLimits [0 156.75 0 153.75] + screen [1 1 3600 1200 1.180555555555556] + treeNode [0 3 0 0] + firstTransition 12 + firstJunction 11 + viewObj 2 + visible 1 + machine 1 + subviewS { + } + ssIdHighWaterMark 10 + decomposition CLUSTER_CHART + type EML_CHART + firstData 4 + chartFileNumber 2 + disableImplicitCasting 1 + eml { + name "fcn" + } + } + state { + id 3 + labelString "eML_blk_kernel()" + position [18 64.5 118 66] + fontSize 12 + chart 2 + treeNode [2 0 0 0] + superState SUBCHART + subviewer 2 + ssIdNumber 1 + type FUNC_STATE + decomposition CLUSTER_STATE + eml { + isEML 1 + script "function [accel_reading,gyro_reading] = fcn(dv,v,Omega,g,r_oc)\n%#codegen\n\na = dv + cross(Omega" + ",v) ; % body frame acceleration \n\naccel_reading = a - g ; % accelerometer reading (ideal)\n\ngyro_reading = Om" + "ega ; % gyroscope reading (ideal) \n\nend\n\n" + editorLayout "100 M4x1[10 5 700 500]" + } + } + data { + id 4 + ssIdNumber 4 + name "dv" + linkNode [2 0 5] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 5 + ssIdNumber 9 + name "v" + linkNode [2 4 6] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 6 + ssIdNumber 5 + name "accel_reading" + linkNode [2 5 7] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + data { + id 7 + ssIdNumber 6 + name "Omega" + linkNode [2 6 8] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 8 + ssIdNumber 7 + name "g" + linkNode [2 7 9] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 9 + ssIdNumber 8 + name "gyro_reading" + linkNode [2 8 10] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + data { + id 10 + ssIdNumber 10 + name "r_oc" + linkNode [2 9 0] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + junction { + id 11 + position [23.5747 49.5747 7] + chart 2 + linkNode [2 0 0] + subviewer 2 + ssIdNumber 3 + type CONNECTIVE_JUNCTION + } + transition { + id 12 + labelString "{eML_blk_kernel();}" + labelPosition [28.125 13.875 102.544 14.964] + fontSize 12 + src { + intersection [0 0 1 0 23.5747 14.625 0 0] + } + dst { + id 11 + intersection [1 0 -1 0 23.5747 42.5747 0 0] + } + midPoint [23.5747 24.9468] + chart 2 + linkNode [2 0 0] + dataLimits [21.175 25.975 14.625 42.575] + subviewer 2 + drawStyle SMART + slide { + sticky BOTH_STICK + } + executionOrder 1 + ssIdNumber 2 + } + instance { + id 13 + name "IMU/MATLAB Function" + machine 1 + chart 2 + } + target { + id 14 + name "sfun" + description "Default Simulink S-Function Target." + machine 1 + linkNode [1 0 0] + } +}