Matlab与STK连接函数库(最新整理)

更新时间:2024-07-04 19:53:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

整理者:龚德仁 2008年10月7日 1 目 录 一、Matlab/Simulink、STK联合仿真的优势 ............................. 1 二、mexConnect函数详细介绍 ......................................... 2 2.1 STK服务器命令(STK Server Commands) .................................................................. 2 2.1.1 stkDefaultConID ................................................................................................. 2 2.1.2 stkDefaultHost ................................................................................................... 2 2.1.3 stkSetDefaultHost ............................................................................................. 2 2.2 应用命令(Application Commands) ........................................................................... 2 2.2.1 stkAutoSave ......................................................................................................... 2 2.2.2 stkHomeDir ........................................................................................................... 2 2.2.3 stkCurrentDir ..................................................................................................... 2 2.2.4 stkSetCurrentDir ............................................................................................... 2 2.2.5 stkObjNames ......................................................................................................... 2 2.2.6 stkTimerStart ..................................................................................................... 3 2.2.7 stkTimer ............................................................................................................... 3 2.3 普通对象命令(Generic Object Commands) ............................................................. 3 2.3.1 stkCentralBody ................................................................................................... 3 2.3.2 stkLoadObj ........................................................................................................... 3 2.3.3 stkSaveObj ........................................................................................................... 3 2.3.4 stkNewObj ............................................................................................................. 3 2.3.5 stkUnload ............................................................................................................. 4 2.3.6 stkUnloadChildren ............................................................................................. 4 2.3.7 stkRename ............................................................................................................. 4 2.3.8 stkTimePeriod ..................................................................................................... 4 2.3.9 stkTimePeriodInSec ........................................................................................... 5 2.3.10 stkValidObj ....................................................................................................... 5 2.3.11 stkDescrip ......................................................................................................... 5 2.3.12 stkSetDescrip ................................................................................................... 5 2.4 场景命令(Scenario Commands) ................................................................................. 6 2.4.1 stkAnimTime ......................................................................................................... 6 2.4.2 stkEpoch ............................................................................................................... 6 2.4.3 stkSetEpoch ......................................................................................................... 6 2.4.4 stkSetEpochInSec ............................................................................................... 6 2.4.5 stkSyncEpoch ....................................................................................................... 6 2.4.6 stkConvertDate ................................................................................................... 6 2.4.7 stkSetTimePeriod ............................................................................................... 6 2.4.8 stkSetTimePeriodInSec ..................................................................................... 7 2.4.9 stkScenFilePath ................................................................................................. 7 2.4.10 stkValidScen ..................................................................................................... 7 2.5 基本飞行器数据(Basic Vehicle Data) ................................................................... 7 2.5.1 stkTimePeriod ..................................................................................................... 7 2.5.2 stkTimePeriodInSec ........................................................................................... 7 2.5.3 stkSetTimePeriod ............................................................................................... 7 2.6 卫星运动属性(Satellite Propagators) ................................................................. 8 I 2.6.1 stkSetPropCart ................................................................................................... 8 2.6.2 stkSetPropClassical ......................................................................................... 8 2.6.3 stkSetPropEqui ................................................................................................... 9 2.6.4 stkSetPropSGP4 ................................................................................................... 9 2.6.5 stkPropagate ..................................................................................................... 10 2.7 飞行器位置与速度(Vehicle Position and Velocity) ....................................... 10 2.7.1 stkPosVelCBF ..................................................................................................... 10 2.7.2 stkPosVelCBI ..................................................................................................... 10 2.7.3 stkEphemerisCBF ............................................................................................... 10 2.7.4 stkEphemerisCBI ............................................................................................... 11 2.7.5 stkSetEphemerisCBF ......................................................................................... 11 2.7.6 stkSetEphemerisCBI ......................................................................................... 11 2.7.7 stkLoadEphemeris ............................................................................................. 11 2.7.8 stkSaveEphemerisCBF ....................................................................................... 12 2.7.9 stkSaveEphemerisCBI ....................................................................................... 12 2.7.10 stkSaveDynState ............................................................................................. 12 2.7.11 stkDynState ..................................................................................................... 12 2.8 飞行器姿态(Vehicle Attitude) ............................................................................. 12 2.8.1 stkAttitudeCBF ................................................................................................. 12 2.8.2 stkAttitudeCBI ................................................................................................. 13 2.8.3 stkSetAttitudeCBF ........................................................................................... 13 2.8.4 stkSetAttitudeCBI ........................................................................................... 13 2.8.5 stkLoadAttitude ............................................................................................... 14 2.8.6 stkSaveAttitudeCBF ......................................................................................... 14 2.8.7 stkSaveAttitudeCBI ......................................................................................... 14 2.9 基本飞行器姿态类型(Basic Vehicle Attitude Types) ..................................... 14 2.9.1 stkSetAttBasic ................................................................................................. 14 2.9.2 stkSetAttSpinSun ............................................................................................. 15 2.9.3 stkSetAttSpinNadir ......................................................................................... 15 2.9.4 stkSetAttYawNadir ........................................................................................... 15 2.9.5 stkSetAttSpinning ........................................................................................... 16 2.9.6 stkSetAttFixed ................................................................................................. 16 2.9.7 stkAttOffset ..................................................................................................... 17 2.10 飞机,车辆与船舰属性(Aircraft, GroundVehicle and Ship Propagators) 17 2.10.1 stkSetWaypoints ............................................................................................. 17 2.10.2 stkLoadWaypoints ........................................................................................... 18 2.10.3 stkSetGreatArcStart ..................................................................................... 18 2.11 导弹运动属性(Missile Propagators) ................................................................. 18 2.11.1 stkSetPropBallistic ..................................................................................... 18 2.12 设备与目标(Facilities and Targets) ............................................................... 18 2.12.1 stkPosVelCBF ................................................................................................... 18 2.12.3 stkSetFacPosCBF ............................................................................................. 18 2.12.3 stkSetFacPosLLA ............................................................................................. 19 2.13 区域目标(Area Targets) ....................................................................................... 19 II 2.13.1 Area Target boundary ................................................................................... 19 2.14 STK工具(STK Tools) .............................................................................................. 19 2.14.1 stkAccess ......................................................................................................... 19 2.14.2 stkReport ......................................................................................................... 19 2.14.3 stkAccReport ................................................................................................... 20 2.14.4 stkFindData ..................................................................................................... 21 2.15 连接命令(Connect Commands) ............................................................................... 21 2.15.1 stkOpen ............................................................................................................. 21 2.15.2 stkClose ........................................................................................................... 21 2.15.3 stkExec ............................................................................................................. 21 2.15.4 stkConnect ....................................................................................................... 22 三、aeroToolbox函数详细介绍 ....................................... 22 3.1 坐标系中的历元与数据函数Coordinate System Epoch and Date functions) 22 3.1.1 atbGetEpoch ....................................................................................................... 22 3.1.2 atbSetEpoch ....................................................................................................... 22 3.1.3 atbDateToEpochSec ........................................................................................... 23 3.1.4 atbEpochSecToDate ........................................................................................... 23 3.2 坐标系转换(Coordinate Conversions) ................................................................. 24 3.2.1 atbCbfToCbi ....................................................................................................... 24 3.2.2 atbCbfToCbiMtx ................................................................................................. 24 3.2.3 atbCbfToLhMtx ................................................................................................... 24 3.2.4 atbCbfToLla ....................................................................................................... 24 3.2.5 atbCbfToLlr ....................................................................................................... 25 3.2.6 atbCbfToVvlhMtx ............................................................................................... 25 3.2.7 atbCbiToCbf ....................................................................................................... 25 3.2.8 atbCbiToCbi ....................................................................................................... 26 3.2.9 atbCbiToCbiMtx ................................................................................................. 26 3.2.10 atbLlaToCbf ..................................................................................................... 26 3.2.11 atbLlrToCbf ..................................................................................................... 27 3.2.12 atbCbCoordinates ........................................................................................... 27 3.2.13 atbCoordXForm ................................................................................................. 27 3.2.14 atbCoordXFormMtx ........................................................................................... 28 3.3 转动与四元数(Rotations and Quaternions) ....................................................... 28 3.3.1 atbAlignVecQuat ............................................................................................... 28 3.3.2 atbEulerToMtx ................................................................................................... 28 3.3.3 atbEulerToQuat ................................................................................................. 29 3.3.4 atbMinRotQuat ................................................................................................... 29 3.3.5 atbMtxToEuler ................................................................................................... 29 3.3.6 atbMtxToQuat ..................................................................................................... 29 3.3.7 atbMtxToYpr ....................................................................................................... 30 3.3.8 atbQuatToMtx ..................................................................................................... 30 3.3.9 atbQuatXquat ..................................................................................................... 30 3.3.10 atbYprToMtx ..................................................................................................... 30 3.3.11 atbYprToQuat ................................................................................................... 31 III 3.3.12 atbInterpQuat ................................................................................................. 31 3.4 中心对象操作与程序(Central Body Operations and Routines) ..................... 31 3.4.1 atbCbEphemeris ................................................................................................. 31 3.4.2 atbCbGetTangent ............................................................................................... 31 3.4.3 atbCbGravParam ................................................................................................. 32 3.4.4 atbCbGrazeAlt ................................................................................................... 32 3.4.5 atbCbGrazeAngle ............................................................................................... 32 3.4.6 atbCbIntersect ................................................................................................. 33 3.4.7 atbCbLclRadCen ................................................................................................. 33 3.4.8 atbCbLclRadDet ................................................................................................. 33 3.4.9 atbCbSurfDistCen ............................................................................................. 34 3.4.10 atbCbSurfDistDet ........................................................................................... 34 3.4.11 atbCbSurfNormCen ........................................................................................... 34 3.4.12 atbCbSurfNormDet ........................................................................................... 34 3.5 指向,星历与姿态文件(Waypoint, Ephemeris and Attitude Files) ............. 35 3.5.1 atbReadAttitudeCBF ......................................................................................... 35 3.5.2 atbReadAttitudeCBI ......................................................................................... 35 3.5.3 atbWriteAttitudeCBF ....................................................................................... 35 3.5.4 atbWriteAttitudeCBI ....................................................................................... 35 3.5.5 atbReadEphemerisCBF ....................................................................................... 36 3.5.6 atbReadEphemerisCBI ....................................................................................... 36 3.5.7 atbWriteEphemerisCBF ..................................................................................... 36 3.5.8 atbWriteEphemerisCBI ..................................................................................... 36 3.5.9 atbWriteWaypointFile ..................................................................................... 36 3.6 位置与速度函数(Position and Velocity Functions) ....................................... 37 3.6.1 atbGeometry ....................................................................................................... 37 3.6.2 atbGenGreatArc ................................................................................................. 39 3.6.3 atbCreateDynStateCBF ..................................................................................... 39 3.6.4 atbCreateDynStateCBI ..................................................................................... 39 3.6.5 atbLhQuatCen ..................................................................................................... 40 3.6.6 atbLhQuatCBFDet ............................................................................................... 40 3.6.7 atbFlatten ......................................................................................................... 41 3.7 轨道要素转换(Orbit Element Set Conversions) ............................................... 41 3.7.1 atbOrbCartToDel ............................................................................................... 41 3.7.2 atbOrbCartToEqui ............................................................................................. 41 3.7.3 atbOrbCartToMod ............................................................................................... 42 3.7.4 atbOrbCartToSphere ......................................................................................... 42 3.7.5 atbOrbCartToMixedSphere ............................................................................... 43 3.7.6 atbOrbDelToCart ............................................................................................... 43 3.7.7 atbOrbEquiToCart ............................................................................................. 43 3.7.8 atbOrbModToCart ............................................................................................... 43 3.7.9 atbOrbSphereToCart ......................................................................................... 43 3.7.10 atbOrbMixedSphereToCart ............................................................................. 43 3.8 轨道根数分量的转换(Orbit Element Parameter Conversions) ....................... 43 IV

3.8.1 atbOrbEccToTrue ............................................................................................... 43 3.8.2 atbOrbTrueToEcc ............................................................................................... 44 3.8.3 atbOrbMeanToTrue ............................................................................................. 44 3.8.4 atbOrbTrueToMean ............................................................................................. 44 3.8.5 atbOrbLanToRaan ............................................................................................... 44 3.8.6 atbOrbRaanToLan ............................................................................................... 44 3.8.7 atbOrbPeriRadToPeriod ................................................................................... 44 3.8.8 atbOrbPeriodToPeriRad ................................................................................... 45 3.8.9 atbOrbPeriRadToSMajAxis ............................................................................... 45 3.8.10 atbOrbSMajAxisToPeriRad ............................................................................. 45 3.8.11 atbOrbTPANToTrue ........................................................................................... 45 3.8.12 atbOrbTrueToTPAN ........................................................................................... 45 3.8.13 atbOrbTPPToTrue ............................................................................................. 46 3.8.14 atbOrbTrueToTPP ............................................................................................. 46 3.9 DTED操作(DTED operations) .................................................................................. 46 3.9.1 atbCbListDtedTypes ......................................................................................... 46 3.9.2 atbCbListDted ................................................................................................... 46 3.9.3 atbCbAddDtedSource ......................................................................................... 47 3.9.4 atbCbDtedSourceUI ........................................................................................... 47 3.9.5 atbLoadNimaDted ............................................................................................... 47 3.9.6 atbCbRemDtedSource ......................................................................................... 47 3.9.7 atbCbGetDtedSourceForPos ............................................................................. 47 3.9.8 atbGetDtedPatch ............................................................................................... 48 3.9.9 atbClearDtedPatch ........................................................................................... 48 3.9.10 atbAllDtedPatches ......................................................................................... 48 3.9.11 atbDtedPatchInfo ........................................................................................... 48 3.9.12 atbDtedElev ..................................................................................................... 48 3.9.13 atbDtedPatchElev ........................................................................................... 49 3.9.14 atbAzElMask ..................................................................................................... 49 3.9.15 atbDtedRes ....................................................................................................... 49 3.9.16 atbDtedLOSExist ............................................................................................. 49 3.10 运动属性(Propagators) ......................................................................................... 50 3.10.1 atbLambertFixedTime ..................................................................................... 50 3.10.2 atbLambertMinEnergy ..................................................................................... 50 3.10.3 atbLambertMinEccen ....................................................................................... 50 3.10.4 atbKeplerProp ................................................................................................. 50 3.10.5 atbJ2Prop ......................................................................................................... 51 3.10.6 atbJ4Prop ......................................................................................................... 51 3.10.7 atbLaunchProp ................................................................................................. 52 3.10.8 atbMissilePropDataFixedTime ..................................................................... 52 3.10.9 atbMissilePropDataFixedAlt ....................................................................... 53 3.10.10 atbMissilePropDataFixedDelta ................................................................. 53 3.10.11 atbMissilePropDataMinEnergy ................................................................... 53 3.10.12 atbTLERead ..................................................................................................... 53 V 3.10.13 atbTLEGetAll ................................................................................................. 54 3.10.14 atbTLEDelete ................................................................................................. 54 3.10.15 atbTLEProp ..................................................................................................... 54 3.10.16 atbTLEEpoch ................................................................................................... 54 3.10.17 atbTLEInfo ..................................................................................................... 54 3.11 导航精度(Navigation Accuracy) ......................................................................... 55 3.11.1 atbComputeDOP ................................................................................................. 55 3.12 地图数据(Map Data) ............................................................................................... 56 3.12.1 atbMapDetails ................................................................................................. 56 3.12.2 atbPlotMapDetails ......................................................................................... 56 3.13 覆盖网格(Coverage Grids) ................................................................................... 56 3.13.1 atbGetPolyHandle ........................................................................................... 56 3.13.2 atbInsidePoly ................................................................................................. 56 3.13.3 atbClearPolyHandle ....................................................................................... 57 四、stkExec使用总结 ................................................ 1 4.1 场景动画控制 ................................................................................................................... 1 4.1.1 控制按钮 ............................................................................................................... 1 五、示例 ........................................................... 3 4.1 卫星编队之构型设计 ....................................................................................................... 3 4.2 使用心得 ........................................................................................................................... 4 VI 一、Matlab/Simulink、STK联合仿真的优势 STK/MATLAB,SIMULINK STK与Matlab联合实现可视化仿真集成,该方案可以适用于航空航天、航海、作战模拟、电子对抗、卫星导航定位、遥感遥测、卫星通信等各个可视化仿真集成案例之中。 STK/MATLAB接口为STK和MATLAB提供了双向通讯功能,在MATLAB工作区通过Connect模块以TCP/IP协议打开STK端口。 利用超过150个MATLAB命令增强STK的轨道、弹道、轨迹的分析能力,MexConnect还提供在MATLAB命令行直接使用任意 STK/Connect 命令的功能。MexConnect工具可以建立各种不同级别的STK对象,进行操作并生成报告。所有STK的数据,包括动态位置、速度和姿态数据,可以返 回到MATLAB工作空间,用于数学分析。宇航工具箱让MATLAB用户可以输出多重坐标系,以及符合STK格式的星历和姿态文件用于VO模块的三维可视 化。另外此工具还可以使用STK附加模块的功能如STK/COMM(通信),STK/Coverage (覆盖)和STK/Radar(雷达)。 表1 STK模块 基本模块 基本版 专业版 三维显示 高级三维显示 分析模块 轨道机动 链路分析 通信分析 接近分析 覆盖分析 拦截飞行工具 导弹飞行工具 精确定轨 雷达分析 空间环境 综合数据 高精度数字地图 高分辨率地球影像 雷达高级环境 全球三维地形 扩展与接口 连接模块 网络实时播放 MATlLAB接口 分布式仿真 地理信息接口 程序开发库 Satellite Tool Kit(STK) STK/Professioal(STK/PRO) STK/Visualization Option(STK/VO) STK/Advanced VO STK/Astrogator STK/Chains STK/Comm STK/Conjunction Analysis Tools STK/Coverage STK/Interceptor Flight Tool(IFT) STK/Missile Flight Tool(MFT) STK/Precision Orbit DeterminationSystem(PODS) STK/Radar STK/Space Environment STK/High Resolution Maps STK/VO Earth Imagery STK/Radar Advanced Environment(RAE) STK/Terrain STK/Connect and STK/Server STK/WebCast STK/MATLAB Interface STK/Distributed Interactive Simulation(DIS) STK/Geographic InformationSystems(GIS) STK/Programmer's Library(PL) 1 二、mexConnect函数详细介绍 2.1 STK服务器命令(STK Server Commands) 2.1.1 stkDefaultConID 作用:返回STK的默认标识 2.1.2 stkDefaultHost 作用:返回STK的默认地址 2.1.3 stkSetDefaultHost 作用:设置STK的新地址 用法:stkSetDefaultHost('host:port') 2.2 应用命令(Application Commands) 2.2.1 stkAutoSave 作用:自动保存STK 用法:stkAutoSave('onOff','directory', period) stkAutoSave('onOff') 说明:onOff - 'on' or 'off' directory - string pathname of autosave directory period - seconds between saves 2.2.2 stkHomeDir 作用:返回STK的安装路径 用法:dir = stkHomeDir 2.2.3 stkCurrentDir 作用:返回STK的当前路径 用法:dir = stkHomeDir 2.2.4 stkSetCurrentDir 作用:设置STK的当前路径 用法:stkSetCurrentDir('directory') 2.2.5 stkObjNames 作用:返回STK中对象的名字 用法:objNames = stkObjNames objNames = stkObjNames(classCell) 说明:classCell - optional cell array of STK class names. objNames - cell array of STK object names 2.2.4 stkSetCurrentDir 2 2.2.6 stkTimerStart 作用:启动计时器 用法:stkTimerStart 2.2.7 stkTimer 作用:返回计时器时间 用法:[split, total] = stkTimer 说明:split - elapsed time since last stkTimer command total - elapsed time since last stkTimerStart command 2.3 普通对象命令(Generic Object Commands) 2.3.1 stkCentralBody 作用:返回坐标系的中心体 用法:centBody = stkCentralBody('objPath') 说明:objPath - String name of object obtained from stkObjNames. If ommitted, the scenario central body is returned. centBody - String name of object coordinate system central body. 备注:更多内容参见stkObjNames、aeroToolbox。 2.3.2 stkLoadObj 作用:导入对象文件 用法:stkLoadObj('parentPath', 'class', 'fileName') stkLoadObj('scenarioFileName') 说明:parentPath - Valid path, may be obtained from stkObjNames. class - Valid class name. Consult STK documentation for a list of valid classes. Names are case-sensitive. fileName - File path of object file 2.3.3 stkSaveObj 作用:将对象保存 用法:stkSaveObj('objPath', 'dirName') stkSaveObj('objPath') 说明:objPath - Valid path, may be obtained from stkObjNames. dirName - Directory path of object file. When omitted, the default directory is used. 2.3.4 stkNewObj 作用:创建一个新对象 用法:stkNewObj('parentPath', 'class', 'name') 说明:parentPath - Valid path, may be obtained from stkObjNames. class - Valid class name. Consult STK documentation for a list of valid classes. Names are case-sensitive. 3

name - Name of new object 备注:创建场景时,语法为stkNewObj('Scenario',' ','Scenario1') 2.3.5 stkUnload 作用:卸载对象 用法:stkUnload('objPath') 说明:objPath - Valid path, may be obtained from stkObjNames. 2.3.6 stkUnloadChildren 作用:卸载对象的所有子对象 用法:stkUnloadChildren ('objPath') 说明:objPath - Valid path, may be obtained from stkObjNames. 2.3.7 stkRename 作用:将对象重命名 用法:stkRename('objPath', 'newName') 说明:objPath - Valid path, may be obtained from stkObjNames. newName - New instance name. 2.3.8 stkTimePeriod 作用:获取对象起止时间 用法:timePeriod = stkTimePeriod('dateFormat') timePeriod = stkTimePeriod('objPath', 'dateFormat') 说明: objPath - Valid vehicle object path, defaults to scenario path. timePeriod - Structure array with start and stop fields. Each field contains a string date value. dateFormat - Valid date format. Options are: EPOCHSEC EPOCHSECOND EPOCHMIN EPOCHMINUTE EPOCHHR EPOCHHOUR EPOCHDAY GMT ZULU GMTSYSTEM GREGLCL GREGORIANLOCAL GREGORIANLCL GREGUTC GREGORIANUTC GREGTAI GREGORIANTAI GREGTDT GREGORIANTDT GREGGPSTIME GREGGPS GREGORIANGPSTIME GPSTIME GPS JULDATE JULIANDATE JULLCL JULIANLOCAL JULIANLCL JULUTC JULIANUTC JUL4 JULIAN4 JULIAN4UTC 4 JDATEOFF JDATEOFFSET JULDATEOFFSET JULEPHEMDATE JULIANEPHEMERISDATE JULIANEPHEM JULTAI JULIANTAI MISELAP MISSIONELAPSED MODJULDATE MODIFIEDJULIANDATE YYDDD YYDDD.DDD YYYYDDD YYYYDDD.HHMMSS YYYYMMDD YYYYMMDD.DDD YYYY/MM/DDTIME YYYY/MM/DD 备注:更对内容参见stkConvertDate、stkObjNames 2.3.9 stkTimePeriodInSec 作用:获取对象起止时间,以s为单位 用法:[start, stop] = stkTimePeriodInSec(objPath) [start, stop] = stkTimePeriodInSec 说明:objPath - valid object path, see stkObjNames. When not provided, the scenario time period is returned. start, stop - time in seconds 2.3.10 stkValidObj 作用:检查对象的有效性 用法:result = stkValidObj('path') 说明:path - object path name result - 1 if valid, 0 otherwise 2.3.11 stkDescrip 作用:获取对象的描述 用法:description = stkDescrip('objPath', 'shortLong') 说明:objPath - Valid path, may be obtained from stkObjNames. shortLong - Type of description to get, 'short' or 'long'. 2.3.12 stkSetDescrip 作用:设置对象的描述 用法:stkSetDescrip('objPath', 'shortLong', 'description') 说明:objPath - Valid path, may be obtained from stkObjNames. shortLong - Type of description to set, 'short' or 'long'. description - Description text. 5 2.4 场景命令(Scenario Commands) 2.4.1 stkAnimTime 作用:返回当前动画时间 用法:time = stkAnimTime 说明:time - current STK animation time (sec) 2.4.2 stkEpoch 作用:返回当前场景历元 用法:epoch = stkEpoch('dateFormat') 说明:dateFormat - Valid date format. epoch - string representation of scenario epoch. 2.4.3 stkSetEpoch 作用:设置场景历元 用法:stkSetEpoch('epoch', 'dateFormat') 说明:dateFormat - Valid date format. epoch - string representation of scenario epoch. 2.4.4 stkSetEpochInSec 作用:设置场景历元 用法:stkSetEpochInSec(newEpoch) 说明:newEpoch - number of seconds elapsed between current epoch and the desired epoch. 2.4.5 stkSyncEpoch 作用:aeroToolbox与STK场景有同样的历元 用法:stkSyncEpoch 备注:STK and aeroToolbox maintain separate scenario epochs. This function should be called anytime the STK epoch is changed through mexConnect or via the STK GUI. 2.4.6 stkConvertDate 作用:转换日期格式 用法:newDate = stkConvertDate('date', 'format', 'newFormat') 2.4.7 stkSetTimePeriod 作用:设置场景或卫星的时间周期 用法:stkSetTimePeriod('start', 'stop', 'dateFormat') stkSetTimePeriod('satpath', 'start', 'stop', 'dateFormat') 说明:satpath - satellite path name, defaults to scenario start, stop - string dates 6 2.4.8 stkSetTimePeriodInSec 作用:设置场景的时间周期 用法:stkTimePeriodInSec(start, stop) 说明:start, stop - time in seconds 2.4.9 stkScenFilePath 作用:返回场景文件的路径 用法:path = stkScenFilePath 说明:path - current STK scenario directory 2.4.10 stkValidScen 作用:检查可用的场景 用法:result = stkValidScen 说明:result - 1 if valid, 0 otherwise 2.5 基本飞行器数据(Basic Vehicle Data) 2.5.1 stkTimePeriod 作用:获取对象的时间周期 用法:timePeriod = stkTimePeriod('dateFormat') timePeriod = stkTimePeriod('objPath', 'dateFormat') 说明:objPath - Valid vehicle object path, defaults to scenario path. timePeriod - Structure array with start and stop fields. Each field contains a string date value. 2.5.2 stkTimePeriodInSec 作用:获取对象的时间周期 用法:[start, stop] = stkTimePeriodInSec(objPath) [start, stop] = stkTimePeriodInSec 说明:objPath - valid object path, see stkObjNames. When not provided, the scenario time period is returned. start, stop - time in seconds 2.5.3 stkSetTimePeriod 作用:设置场景或对象的时间周期 用法:stkSetTimePeriod('start', 'stop', 'dateFormat') stkSetTimePeriod('satpath', 'start', 'stop', 'dateFormat') 说明:satpath - satellite path name, defaults to scenario start, stop - string dates 7 2.6 卫星运动属性(Satellite Propagators) 2.6.1 stkSetPropCart 作用:设置笛卡尔坐标系下卫星运动的参数 用法:stkSetPropCart('objPath', 'propagator', 'coordSystem', ... tStart, tStop, dt, orbitEpoch, pos, vel, coordEpoch) 说明:objPath - Valid path, may be obtained from stkObjNames. propagator - 'TwoBody', 'J2Perturbation', 'J4Perturbation', 'HPOP' or 'PODS' This parameter is case sensitive! coordSystem - string name of coordinate system, valid choices are: 'Fixed', 'J2000', 'MeanOfDate', 'MeanOfEpoch', 'TrueOfDate', 'TrueOfEpoch', 'B1950', 'TEMEOfDate', 'TEMEOfEpoch', 'AlignmentAtEpoch'. This parameter is case sensitive! tStart, tStop - times in epoch seconds. dt - time step in seconds. orbitEpoch - reference time of orbit data, in scenario epoch seconds pos - 3x1 vector of positions at reference time, meters vel - 3x1 vector of velocity at reference time, meters/sec coordEpoch - coordinate system epoch, required by all '...OfEpoch' coordinate systems. 2.6.2 stkSetPropClassical 作用:设置经典轨道根数描述下卫星运动的参数 用法:stkSetPropClassical('objPath', 'propagator', 'coordSystem', ... tStart, tStop, dt, orbitEpoch, semimajorAxis, eccentricity,... inclination, argOfPerigree, RAAN, meanAnomaly, coordEpoch) 说明:objPath - Valid path, may be obtained from stkObjNames. propagator - 'TwoBody', 'J2Perturbation', 'J4Perturbation', 'HPOP' or 'PODS' This parameter is case sensitive! coordSystem - string name of coordinate system, valid choices are: 'Fixed', 'J2000', 'MeanOfDate', 'MeanOfEpoch', 'TrueOfDate', 'TrueOfEpoch', 'B1950', 'TEMEOfDate', 'TEMEOfEpoch', 'AlignmentAtEpoch'. This parameter is case sensitive! tStart, tStop - times in epoch seconds. dt - time step in seconds. orbitEpoch - reference time of orbit data, in scenario epoch seconds coordEpoch - coordinate system epoch, required by all '...OfEpoch' coordinate systems. semimajorAxis - units in meters eccentricity - unitless inclination - units in radians 8

argOfPerigree - units in radians RAAN - units in radians meanAnomaly - units in radians 2.6.3 stkSetPropEqui 作用:设置春分点坐标下卫星运动的参数 用法:stkSetPropEqui('objPath', 'propagator', 'coordSystem', ... tStart, tStop, dt, orbitEpoch, semimajorAxis, ... h, k, p, q, meanLongitude, formulation, coordEpoch) 说明:objPath - Valid path, may be obtained from stkObjNames. propagator - 'TwoBody', 'J2Perturbation', 'J4Perturbation', 'HPOP' or 'PODS' This parameter is case sensitive! coordSystem - string name of coordinate system, valid choices are: 'Fixed', 'J2000', 'MeanOfDate', 'MeanOfEpoch', 'TrueOfDate', 'TrueOfEpoch', 'B1950', 'TEMEOfDate', 'TEMEOfEpoch', 'AlignmentAtEpoch'. This parameter is case sensitive! tStart, tStop - times in epoch seconds. dt - time step in seconds. orbitEpoch - reference time of orbit data, in scenario epoch seconds coordEpoch - coordinate system epoch, required by all '...OfEpoch' coordinate systems. semimajorAxis - units in meters h, k, p, q - unitless meanLongitude - units in radians formulation - string, 'Posigrade' or 'Retrograde' 2.6.4 stkSetPropSGP4 作用:设置SGP4描述下卫星运动的参数 用法:stkSetPropSGP4('objPath', tStart, tStop, dt, tleInfo) stkSetPropSGP4('objPath', tStart, tStop, dt, ... 'SSC', 'orbitEpoch', meanMotion, ... eccentricity, inclination, argOfPerigree. ... RAAN, meanAnomaly, meanMotionDot, meanMotionDotDot, bStar) 说明:objPath - Valid path, may be obtained from stkObjNames. tStart, tStop - times in epoch seconds. dt - time step in seconds. tleInfo - tleInfo from atbTLEInfo SSC - U.S. Space Surveillance Center Catalog Number (as a char string) orbitEpoch - string date, must be in YYDDD.SSSSSSS format meanMotion - rev/day eccentricity - unitless inclination - units in radians argOfPerigree - units in radians 9 RAAN - units in radians meanAnomaly - units in radians meanMotionDot meanMotionDotDot bStar - m^2/kg 2.6.5 stkPropagate 作用:设置卫星运动的参数 用法:stkPropagate('satPath', tStart, tStop) 说明:satPath - Valid satellite path, may be obtained from stkObjNames. tStart, tStop - times in epoch seconds. 2.7 飞行器位置与速度(Vehicle Position and Velocity) 2.7.1 stkPosVelCBF 作用:获取中心体本体系下位置和速度 用法:[pos, vel] = stkPosVelCBF('objPath', time) 说明:objPath - Vehicle or facility path, may be obtained from stkObjNames. time - Scenario time (sec). pos - Central Body Fixed position (meters). vel - Central Body Fixed velocity (meters/sec). 备注:CBF coordinates may be converted to any other system using commands in the Aerospace Toolbox. The command stkCentralBody may be used to obtain the central body name of the object. 2.7.2 stkPosVelCBI 作用:获取中心体惯性系下位置和速度 用法:[cbiPos, cbiVel] = stkPosVelCBI('vehPath', time) 说明:vehPath - Vehicle path, may be obtained from stkObjNames. time - Scenario time (sec). cbiPos - Inertial position (meters). cbiVel - Inertial velocity (meters/sec). 备注:CBI coordinates may be converted to any other system using commands in the Aerospace Toolbox. The command stkCentralBody may be used to obtain the central body name of the object. 2.7.3 stkEphemerisCBF 作用:本体系飞行器星历数据 用法:[time, pos, vel, cb] = stkEphemerisCBF(objPath, dt) [time, pos, vel, cb] = stkEphemerisCBF(objPath, dt, start, stop) 说明:objPath - valid STK object path dt - time interval for data start - starting time (sec) stop - stop time (sec) 10 time - 1xN vector (sec) pos - CBF cartesian position, 3xN (meters) vel - CBF cartesian velocity, 3xN (meters/sec) cb - central body name 2.7.4 stkEphemerisCBI 作用:惯性系下的飞行器星历数据 用法:[time, pos, vel, cb] = stkEphemerisCBI(objPath, dt) [time, pos, vel, cb] = stkEphemerisCBI(objPath, dt, start, stop) 说明:objPath - valid STK object path dt - time interval for data start - starting time (sec) stop - stop time (sec) time - 1xN vector (sec) pos - CBF cartesian position, 3xN (meters) vel - CBF cartesian velocity, 3xN (meters/sec) cb - central body name 2.7.5 stkSetEphemerisCBF 作用:本体系下设置飞行器星历数据 用法:stkSetEphemerisCBF(objPath, cb, time, pos, vel) stkSetEphemerisCBF(objPath, cb, time, pos, vel, eFilePath) 说明:objPath - valid STK object path cb - central body name time - 1xN vector (sec) pos - CBF cartesian position, 3xN (meters) vel - CBF cartesian velocity, 3xN (meters/sec) eFilePath - file name to create. Default is to create a file in the scenario directory named {objName}.e, where objName is derived from the objPath. 2.7.6 stkSetEphemerisCBI 作用:惯性系下设置飞行器星历数据 用法:stkSetEphemerisCBI(objPath, cb, time, pos, vel) stkSetEphemerisCBI(objPath, cb, time, pos, vel, eFilePath) 说明:pos - CBI cartesian position, 3xN (meters) vel - CBI cartesian velocity, 3xN (meters/sec) 2.7.7 stkLoadEphemeris 作用:从文件中载入星历 用法:stkLoadEphemeris('objPath', 'fileName') 说明:objPath - Valid path, may be obtained from stkObjNames. fileName - file name. 11 2.7.8 stkSaveEphemerisCBF 作用:保存星历到文件 用法:stkSaveEphemerisCBF('objPath', timeStep, 'fileName') stkSaveEphemerisCBF('objPath', timeStep, 'fileName', startTime, stopTime) 说明:objPath - Valid path, may be obtained from stkObjNames. timeStep - Granularity of time steps (sec). fileName - file name. startTime - start time (sec). stopTime - stop time (sec). 2.7.9 stkSaveEphemerisCBI 作用:保存星历到文件 用法:stkSaveEphemerisCBF('objPath', timeStep, 'fileName') stkSaveEphemerisCBF('objPath', timeStep, 'fileName', startTime, stopTime) 说明:objPath - Valid path, may be obtained from stkObjNames. timeStep - Granularity of time steps (sec). fileName - file name. startTime - start time (sec). stopTime - stop time (sec). 2.7.10 stkSaveDynState 作用:保存动力学数据 用法:stkSaveDynState('objPath', 'varName', 'fileName', dT) 说明:objPath - string name of vehicle or facility varName - variable name for MAT file fileName - MAT file name dT - time step of dynamic state data 2.7.11 stkDynState 作用:产生动力学数据 用法:dynState = stkDynState(objPath, dt) 说明:objPath - valid STK object path dt - time interval for data dynState - dynamic state data structure 2.8 飞行器姿态(Vehicle Attitude) 2.8.1 stkAttitudeCBF 作用:飞行器姿态数据 用法:[time, quats, cb] = stkAttitudeCBF(objPath, dt) [time, quats, cb] = stkAttitudeCBF(objPath, dt, start, stop) 说明:objPath - valid STK object path dt - time interval for data 12 start - starting time (sec) stop - stop time (sec) time - 1xN vector (sec) quats - CBF to body quaternions, 4xN cb - central body name 2.8.2 stkAttitudeCBI 作用:飞行器姿态数据 用法:[time, quats, cb] = stkAttitudeCBI(objPath, dt) [time, quats, cb] = stkAttitudeCBI(objPath, dt, start, stop) 说明:objPath - valid STK object path dt - time interval for data start - starting time (sec) stop - stop time (sec) time - 1xN vector (sec) quats - CBI to body quaternions, 4xN cb - central body name 2.8.3 stkSetAttitudeCBF 作用:设置飞行器姿态 用法:stkSetAttitudeCBF(objPath, cb, time, quats) stkSetAttitudeCBF(objPath, cb, time, quats, aFilePath) 说明:objPath - valid STK object path cb - central body name time - 1xN vector (sec) quats - CBF to body quaternions, 4xN aFilePath - file name to create. Default is to create a file in the scenario directory named {objName}.a, where objName is derived from the objPath. 2.8.4 stkSetAttitudeCBI 作用:设置飞行器姿态 用法:stkSetAttitudeCBI(objPath, cb, time, quats) stkSetAttitudeCBI(objPath, cb, time, quats, aFilePath) 说明:objPath - valid STK object path cb - central body name time - 1xN vector (sec) quats - CBI to body quaternions, 4xN aFilePath - file name to create. Default is to create a file in the scenario directory named {objName}.a, where objName is derived from the objPath. 13

2.8.5 stkLoadAttitude 作用:从文件载入姿态 用法:stkLoadAttitude('objPath', 'fileName') 说明:objPath - Valid path, may be obtained from stkObjNames. fileName - file name. 2.8.6 stkSaveAttitudeCBF 作用:保存姿态到文件 用法:stkSaveAttitudeCBF('objPath', timeStep, 'fileName') stkSaveAttitudeCBF('objPath', timeStep, 'fileName', startTime, stopTime) 说明:objPath - Valid path, may be obtained from stkObjNames. timeStep - Granularity of time steps (sec). fileName - file name. startTime - start time (sec). stopTime - stop time (sec). 2.8.7 stkSaveAttitudeCBI 作用:保存姿态到文件 用法:stkSaveAttitudeCBI('objPath', timeStep, 'fileName') stkSaveAttitudeCBI('objPath', timeStep, 'fileName', startTime, stopTime) 说明:objPath - Valid path, may be obtained from stkObjNames. timeStep - Granularity of time steps (sec). fileName - file name. startTime - start time (sec). stopTime - stop time (sec). 2.9 基本飞行器姿态类型(Basic Vehicle Attitude Types) 2.9.1 stkSetAttBasic 作用:设置基本的姿态类型 用法:stkSetAttBasic('satPath', 'attType', offset) 说明:satPath - string name of satellite offset - either an alignOffset or constraintOffset, depending on type (radians) attType - attitude type string. Valid choices are: NADIRECIVEL NADIRECFVEL NADIRSUN NADIRORBIT ECIVELNADIR ECFVELNADIR SUNNADIR SUNECLIPTIC SUNECIZ 14 SUNOCCULT 2.9.2 stkSetAttSpinSun 作用:旋转轴指向太阳 用法:stkSetAttSpinSun('satPath', rate, offset, epoch) 说明:satPath - string name of satellite rate - angular spin rate (rpm) offset - angular (radians) epoch - control phase of spin (epoch sec) 备注:The body-fixed Z axis points to the Sun and the satellite rotates about the Sun vector. The spin rate is specified in revolutions per minute; positive values indicate rotation in a right-handed sense with respect to the spin axis. The initial orientation of the satellite is specified by using the spin offset and offset epoch fields. The spin offset is an angular measure of the difference between the satellite orientation at the offset epoch from the orientation achieved by orienting the Z axis. 2.9.3 stkSetAttSpinNadir 作用:旋转轴指向地面 用法:stkSetAttSpinNadir('satPath', rate, offset, epoch) 说明:satPath - string name of satellite rate - angular spin rate (rpm) offset - angular (radians) epoch - control phase of spin (epoch sec) 备注:The satellite's Z axis is assumed to be the spin axis and aligned to nadir. The spin rate is specified in revolutions per minute; positive values indicate rotation in a right-handed sense with respect to the spin axis. The initial orientation of the satellite is specified by using the spin offset and offset epoch fields. The spin offset is an angular measure of the difference between the satellite orientation at the offset epoch from the orientation achieved by orienting the Z axis. 2.9.4 stkSetAttYawNadir 作用:偏航轴指向地面 用法:stkSetAttYawNadir('satPath', 'PR', pitch, roll) stkSetAttYawNadir('satPath', 'EULER', angle1, angle2, seq) stkSetAttYawNadir('satPath', 'RaDec', RAAN, declination) 说明:satPath - string name of satellite pitch, roll, angle1, angle2, RAAN, declination - yaw axis orientation angles (radians) seq - Euler angle sequence, can be 12, 21, 31 or 32 备注:The satellite's Z axis is fixed in inertial space. The direction of the satellite Z axis is specified through two angles, as determined 15 by the Orientation Type. The satellite X axis is then constrained, via motion in the yaw sense, toward the nadir direction. This profile is useful for satellites in highly elliptical orbits. 2.9.5 stkSetAttSpinning 作用:选装轴任意指向 用法:stkSetAttSpinning('satPath', rate, offset, epoch, 'PR', pitch, roll) stkSetAttSpinning('satPath', rate, offset, epoch, 'EULER', angle1, angle2, seq) stkSetAttSpinning('satPath', rate, offset, epoch, 'RaDec', RAAN, declination) 说明:satPath - string name of satellite rate - angular spin rate (rpm) offset - angular (radians) epoch - control phase of spin (epoch sec) pitch, roll, angle1, angle2, RAAN, declination - spin axis orientation angles (radians) seq - Euler angle sequence, can be 12, 21, 31 or 32 备注:The satellite's Z axis is assumed to be the spin axis and is fixed in inertial space. The direction of the spin axis is specified through two angles, as determined by the Orientation Type. The spin rate is specified in revolutions per minute; positive values indicate rotation in a right-handed sense with respect to the spin axis. The initial orientation of the satellite is specified by using the spin offset and offset epoch fields. The spin offset is an angular measure of the difference between the satellite orientation at the offset epoch from the orientation achieved by orienting the Z axis. 2.9.6 stkSetAttFixed 作用:姿态固定 用法:stkSetAttFixed('satPath', 'YPR', yprVec, yprSeq) stkSetAttFixed('satPath', 'EULER', eulerVec, eulerSeq) stkSetAttFixed('satPath', 'QUAT', quaternion) 说明:satPath - string name of satellite yprVec - CBI yaw, pitch, roll vector (3x1, radians) yprSeq - rotation sequence, a string specifying 'RPY', 'RYP', 'PRY', 'PYR', 'YRP' or 'YPR' eulerVec - CBI euler angle vector (3x1, radians) eulerSeq - rotation sequence, an integer specifying 121, 123, 131, 132, 212, 213, 231, 232, 312, 313, 321 or 323 quaternion - CBI orientation quaternion, 4x1 备注:Maintains a constant orientation of the body-fixed axes with respect to the inertial coordinate system. The orientation of the body-fixed axes is specified by three angles or a quaternion, as determined by the Orientation Type. 16 2.9.7 stkAttOffset 作用:姿态偏移 用法:stkAttOffset('objPath', offset) 说明:objPath - Valid path, may be obtained from stkObjNames. offset - Angular offset (radians). Offset is applied as an AlignOffset is attitude type is: Sun alignment with nadir constraint Sun alignment with ecliptic normal constraint Sun alignment with ECI Z axis constraint Sun alignment-occultation normal constraint Offset is applied as an ConstraintOffset is attitude type is: Nadir alignment with ECF velocity constraint Nadir alignment with ECI velocity constraint Nadir alignment with Sun constraint ECI velocity alignment with nadir constraint ECF velocity alignment with radial constraint Nadir alignment with orbit normal constraint There is no change if attitude type is: Yaw to nadir Spinning Spin about Nadir Spin about Sun vector Inertially fixed 2.10 飞机,车辆与船舰属性(Aircraft, GroundVehicle and Ship Propagators) 2.10.1 stkSetWaypoints 作用:设置路径点 用法:stkSetWaypoints('objPath', 'startTime', llaMat, speedVec) stkSetWaypoints('objPath', 'startTime', llaMat, speedVec, accelVec) stkSetWaypoints('objPath', 'startTime', llaMat, speedVec, wpFilePath) stkSetWaypoints('objPath', 'startTime', llaMat, speedVec, accelVec, wpFilePath) 说明:objPath - valid STK object path startTime - start time date string. See stkEpoch for valid formats. llaMat - Matrix of LLA positions, 3xN, (radians and meters) speedVec - Vector of speeds Nx1 (meters/sec) accelVec - Vector of accelerations, Nx1 (meters/sec^2) wpFilePath - file name to create. Default is to create a file in the scenario directory named {objName}.ga, where objName is derived from the 17 objPath. 2.10.2 stkLoadWaypoints 作用:载入路径点 用法:stkLoadWaypoints('objPath', 'fileName') 说明:objPath - Valid path, may be obtained from stkObjNames. fileName - file name. 2.10.3 stkSetGreatArcStart 作用:设置起始时间 用法:stkSetGreatArcStart('gaVehPath', startTime) 说明:gaVehPath - string name of aircraft, groundVehicle or ship startTime - time at first waypoint (epoch seconds) 2.11 导弹运动属性(Missile Propagators) 2.11.1 stkSetPropBallistic 作用:设置弹道导弹运动属性 用法:stkSetPropBallistic('missilePath', tLaunch, TOF, dT, launchLLA, impactLLA) 说明:missilePath - Valid missile path, may be obtained from stkObjNames. tLaunch - launch time, epoch seconds TOF - missile time of flight (seconds) dT - time step in seconds. launchLLA, impactLLA - geodetic lat/lon/alt vectors, [rad;rad;meters] 2.12 设备与目标(Facilities and Targets) 2.12.1 stkPosVelCBF 作用:Position and Velocity, Central Body Fixed coordinates 用法:[pos, vel] = stkPosVelCBF('objPath', time) 说明:objPath - Vehicle or facility path, may be obtained from stkObjNames. time - Scenario time (sec). pos - Central Body Fixed position (meters). vel - Central Body Fixed velocity (meters/sec). 备注:CBF coordinates may be converted to any other system using commands in the Aerospace Toolbox. The command stkCentralBody may be used to obtain the central body name of the object. 2.12.3 stkSetFacPosCBF 作用:Set Facility Position, Central Body Fixed coordinates 用法:stkSetFacPosCBF('facPath', pos) 说明:facPath - Valid facility class path, may be obtained from stkObjNames. pos - Central Body Fixed position (3x1, in meters). 18

备注:CBF coordinates may be obtained from any other system using commands in the Aerospace Toolbox. 2.12.3 stkSetFacPosLLA 作用:Set Facility Position, Geodetic coordinates 用法:stkSetFacPosLLA('facPath', llaPos) 说明:facPath - Valid facility class path, may be obtained from stkObjNames. llaPos - Geodetic lat, long, alt position (3x1, [rad; rad; meters]), or use the local terrain altitude by specifying lat, long only (2x1, [rad; rad]). 备注:LLA coordinates may be obtained from any other system using commands in the Aerospace Toolbox. 2.13 区域目标(Area Targets) 2.13.1 Area Target boundary 2.14 STK工具(STK Tools) 2.14.1 stkAccess 作用:获取链路间隔Access intervals 用法:intervals = stkAccess('fromPath', 'toPath') 说明:fromPath, toPath - String name of objects obtained from stkObjNames. intervals - Access interval times structure array with fields: start - start time of access interval stop - stop time of access interval 2.14.2 stkReport 作用:Generate an object report 用法:[secData, secNames] = stkReport('objPath', 'rptStyle') [secData, secNames] = stkReport('objPath', 'rptStyle', tStart, tStop, dT) 说明:objPath - String name of object obtained from stkObjNames. rptStyle - String name of existing STK report style valid for the object. tStart - Start time for report (override style default). tStop - Stop time for report (override style default). dT - Time step of data (override style default). secData - Cell array of report data, one cell per report section. secNames - Cell array of section names, one cell per report section. 备注:Each section of an STK report style is arranged into a fixed number of rows and columns (MxN). Each cell array element of secData is a 1xN structure with fields: name - the data element name, e.g. 'Time' data - Mx1 matrix of element values 19 Use stkFindData to extract desired data elements from a report section. Reports generated from this interface are unitless. This is a departure from STK reporting, where users may control the units of various dimensions. This function returns all data in default internal units as follows: Dimension Unit --------------- --------- Distance Meter SmallDistance Meter Time Second Angle Radians Mass Kilogram Date EpochSec Latitude Radians Longitude Radians Temperature Kelvin Power Watt Frequency Hertz SmallTime Second Ratio Decibel Rcs Decibel DopplerVelocity M/S SARTimeResProd Meter*Sec PowerDensity Db/Hz PRF Hertz Bandwidth Hertz Duration Sec Force Newton 2.14.3 stkAccReport 作用:Generate an Access report 用法:[secData, secNames] = stkAccReport('objPath', 'accObjPath', 'rptStyle') [secData, secNames] = stkAccReport('objPath', 'accObjPath', 'rptStyle', tStart, tStop, dT) 说明:objPath - String name of object obtained from stkObjNames. accObjPath - String name of access object. rptStyle - String name of existing STK report style valid for the object. tStart - Start time for report (override style default). tStop - Stop time for report (override style default). dT - Time step of data (override style default). secData - Cell array of report data, one cell per report section. secNames - Cell array of section names, one cell per report section. Each section of an STK report style is arranged into a fixed number 20 of rows and columns (MxN). Each cell array element of secData is a 1xN structure with fields: name - the data element name, e.g. 'Time'. data - Mx1 matrix of element values 2.14.4 stkFindData 作用:Extract data from a report section 用法:data = stkFindData(section, 'name') 说明:section - report section, from stkReport or stkAccReport NOTE: stkReport and stkAccReport return a cell array of sections, this function must be passed a single element of the cell. name - name of the data element, e.g. 'Time'. data - data element 备注:assume vehPath is a valid satellite object path [secData, secNames] = stkReport(vehPath, 'Beta Angle'); time = stkFindData(secData{1}, 'Time'); betaAngle = stkFindData(secData{1}, 'Beta Angle'); plot(time, betaAngle); 2.15 连接命令(Connect Commands) 2.15.1 stkOpen 作用:Open a Connection to STK 用法:conID = stkOpen('hostPortStr') conID = stkOpen 说明:conID - STK/Connect handle. hostPortStr - A string specifying the host and port for the connection. When not specified, the hostPortStr will be set to 'localhost:5001'. 2.15.2 stkClose 作用:close an STK Connection 用法:stkClose(conID) stkClose('ALL') stkClose 说明:conID STK/Connect connection ID obtained from stkOpen. Omitting this parameter will close the default connection. 2.15.3 stkExec 作用:Execute an STK/Connect command 用法:rtn = stkExec(conID, 'conCmdStr') 说明:rtn - A character array containing the STK return conID - STK/Connect connection ID, from stkOpen. 21 conCmdStr - String containing the Connect command 2.15.4 stkConnect 作用:Convenience routine for sending Connect Commands to STK 用法:rtnData = stkConnect(conID, 'command', 'objPath', 'cmdParamString') 说明:conID - connection ID, obtained from stkOpen command - STK/Connect command verb, see the STK/Connect documentation objPath - hierarchical name of object to receive command. The function stkObjNames is a useful source of names. cmdParamString - a string containing the command parameters to be processed by STK. This argument may be ommitted. rtnData - string matrix of data returned by STK in repsonse to the command. 三、aeroToolbox函数详细介绍 3.1 坐标系中的历元与数据函数Coordinate System Epoch and Date functions) 3.1.1 atbGetEpoch 作用:Get analysis epoch 用法:epoch = atbGetEpoch 说明:epoch - structure with the following fields: year - e.g. 2000 month - e.g. 1 days - e.g. 1 hours - e.g. 12 minutes - e.g. 30 seconds - e.g. 0 timeZone - e.g. 'Z' isDST - e.g. 0 The above example corresponds to the date 1 Jan 2000, 12:30:00.00 GMT 3.1.2 atbSetEpoch 作用:Set analysis epoch 用法:atbSetEpoch(year, month, day, hour, minute, sec, 'timeZone', isDST) atbSetEpoch(dateStruct) atbSetEpoch(dateVec) atbSetEpoch(dateVec, 'timeZone', isDST) 说明:year - e.g. 2000 month - e.g. 1 day - e.g. 1 hour - e.g. 12 minute - e.g. 30 sec - e.g. 0 22 timeZone - e.g. 'Z' isDST - e.g. 0 dateStruct - see atbGetEpoch for the format of this structure dateVec - a Matlab date vector, see DATEVEC for more help timeZone - a single character string, the default is 'Z' isDST - a logical flag, the default is 0 (false) The above example corresponds to the date 1 Jan 2000, 12:30:00.00 GMT 备注:This function sets the absolute date corresponding to zero epoch seconds. Inertial coordinate systems are referenced to a particular date. Certain functions within the aeroToolbox require input of a time in seconds to indicate the elapsed (relative) time since the coordinate system epoch. This function sets the coordinate system epoch. 3.1.3 atbDateToEpochSec 作用:Convert an absolute date to epoch seconds 用法:epochSec = atbDateToEpochSec(year, month, day, hour, minute, sec, 'timeZone', isDST) epochSec = atbDateToEpochSec(dateStruct) epochSec = atbDateToEpochSec(dateVec) epochSec = atbDateToEpochSec(dateVec, 'timeZone', isDST) 说明:year - e.g. 2000 month - e.g. 1 day - e.g. 1 hour - e.g. 12 minute - e.g. 30 sec - e.g. 0 timeZone - e.g. 'Z' isDST - e.g. 0 dateStruct - see atbGetEpoch for the format of this structure dateVec - a Matlab date vector, see DATEVEC for more help timeZone - a single character string, the default is 'Z' isDST - a logical flag, the default is 0 (false) The above example corresponds to the date 1 Jan 2000, 12:30:00.00 GMT 备注:This function returns the offset in epoch seconds between the current epoch and the input date. When a Matlab format dateVec is provided as the only input, the timeZone is assumed to be 'Z' and isDST is assumed to be false. 3.1.4 atbEpochSecToDate 作用:Convert epoch seconds to an absolute date 用法:date = atbEpochSecToDate(epochSec) 说明: 23

备注:This function returns the absolute date corresponding to an offset in seconds from the current epoch. 3.2 坐标系转换(Coordinate Conversions) 3.2.1 atbCbfToCbi 作用:Convert CBF coordinates to CBI coordinates 用法: cbiPos = atbCbfToCbi('cbName', times, cbfPos) [cbiPos, cbiVel] = atbCbfToCbi('cbName', times, cbfPos, cbfVel) 说明:cbName - Valid central body nam, e.g. 'Earth' times - Length N vector of times for CBF pos and vel cbfPos - 3xN matrix of CBF positions cbfVel - 3xN matrix of CBF velocities cbiPos - 3xN matrix of CBI positions cbiVel - 3xN matrix of CBI velocities 备注:Converts position and velocity in the central body fixed coordinate system to a position and velocity in the default central body inertial coordinate system at the provided times. 3.2.2 atbCbfToCbiMtx 作用:Transformation matrix from CBF to CBI 用法:T = atbCbfToCbiMtx('cbName', time) 说明:time - time in seconds T - Coordinate transformation matrix 备注:Generates the transformation matrix to convert a vector in the Central Body Fixed (CBF) system to a vector in the Central Body Inertial (CBI) system. Inputs are the central body name and the time. 3.2.3 atbCbfToLhMtx 作用:Transformation matrix from CBF to local horizontal 用法:T = atbCbfToLhMtx('cbName', lat, long) 说明:lat - Geodetic latitude long - Geodetic longitude T - Coordinate transformation matrix 备注:Generates the transformation matrix to convert a vector in the Central Body Fixed (CBF) system to a vector in the local horizontal (LH) system. Inputs are the geodetic latitude and longitude of the reference location. 3.2.4 atbCbfToLla 作用:Transformation from CBF to geodetic LLA 用法: llaPos = atbCbfToLla('cbName', cbfPos) [llaPos, llaRate] = atbCbfToLla('cbName', cbfPos, cbfVel) 24 说明:cbName - Valid central body name cbfPos - CBF position, 3xN cbfVel - CBF velocity, 3xN llaPos - geodetic lat/long/alt, 3xN llaRate - geodetic lat/long/alt rate, 3xN 备注:Determines the geodetic latitude, longitude, and altitude and rates given a cartesian position and velocity. The cartesian vectors must be expressed in the central body fixed coordinate system. 3.2.5 atbCbfToLlr 作用:Transformation from CBF to geocentric LLR 用法: llrPos = atbCbfToLlr(cbfPos) [llrPos, llrRate] = atbCbfToLlr(cbfPos, cbfVel) 说明:cbfPos - CBF position, 3xN cbfVel - CBF velocity, 3xN llrPos - Geocentric lat/long/radius, 3xN llrRate - Geocentric lat/long/radius rate, 3xN 备注:Determines the geocentric latitude, longitude, and radius and rates given the cartesian position and velocity. The input cartesian vectors can be in any coordinate system and the output will represent the corresponding spherical coordinates. 3.2.6 atbCbfToVvlhMtx 作用:Transformation matrix from CBF to VVLH 用法:T = atbCbfToVvlhMtx(cbfPos, cbfVel) 说明:cbfPos - CBF position vector, 3x1 cbfVel - CBF velocity vector, 3x1 T - Coordinate transformation matrix, 3x3 备注:Generates the transformation matrix to convert a vector in the input cartesian system to a vector in the Vehicle Velocity Local Horizontal (VVLH) system. Inputs are the cartesian coordinate vector and velocity vector of the vehicle. The VVLH local horizontal definition is based on a spherical central body model. 3.2.7 atbCbiToCbf 作用:Convert CBI coordinates to CBF coordinates 用法: cbfPos = atbCbiToCbf('cbName', times, cbiPos) [cbfPos, cbfVel] = atbCbiToCbf('cbName', times, cbiPos, cbiVel) 说明:cbName - Valid central body name times - Length N vector of times for CBI pos and vel cbiPos - 3xN matrix of CBI positions cbiVel - 3xN matrix of CBI velocities 25 cbfPos - 3xN matrix of CBF positions cbfVel - 3xN matrix of CBF velocities 备注:Converts position and velocity vectors in the default central body inertial coordinate system to a position and velocity in the central body fixed coordinate system at the provided time. 3.2.8 atbCbiToCbi 作用:Convert CBI coordinates to another CBI system 用法: toPos = atbCbiToCbi('fromCb', 'toCb', times, fromPos) [toPos, toVel] = atbCbiToCbi('fromCb', 'toCb', times, fromPos, fromVel) 说明:fromCb, toCb - Valid central body names times - Length N vector of times for CBF pos and vel fromPos - 3xN matrix of original CBI positions fromVel - 3xN matrix of original CBI velocities toPos - 3xN matrix of new CBI positions toVel - 3xN matrix of new CBI velocities 备注:Computes the inertial position and velocity relative to the \ velocity have been specified relative to the \ body. This computation therefore accounts for both the difference in position of the central bodies and the difference in the orientations of their default inertial coordinate systems. 3.2.9 atbCbiToCbiMtx 作用:Transformation matrix from CBI to another CBI system 用法:T = atbCbiToCbiMtx('fromCB', 'toCB') 说明:T - Coordinate transformation matrix 备注:Generates the transformation matrix to convert a vector in one Central Body Fixed (CBF) system to a vector in another Central Body Inertial (CBI) system. Inputs are the two central body names 3.2.10 atbLlaToCbf 作用:Transformation from geodetic LLA to CBF 用法: cbfPos = atbLlaToCbf('cbName', llaPos) [cbfPos, cbfVel] = atbLlaToCbf('cbName', llaPos, llaRate) 说明:cbName - Valid central body name llaPos - Geodetic lat/long/alt, 3xN llaRate - Geodetic lat/long/alt rate, 3xN cbfPos - CBF position, 3xN cbfVel - CBF velocity, 3xN 备注:Converts the geodetic latitude, longitude, and altitude and rates to a cartesian position and velocity. The 26 cartesian vectors will be expressed in the central body fixed coordinate system. 3.2.11 atbLlrToCbf 作用:Transformation from geocentric LLR to CBF 用法: cbfPos = atbLlrToCbf(llrPos) [cbfPos, cbfVel] = atbLlrToCbf(llrPos, llrRate) 说明:llrPos - Geodetic lat/long/radius, 3xN llrRate - Geodetic lat/long/radius rate, 3xN cbfPos - CBF position, 3xN cbfVel - CBF velocity, 3xN 备注:Converts the geocentric latitude, longitude, and radius and rates to a cartesian position and velocity. The cartesian vectors will be expressed in the central body fixed coordinate system. 3.2.12 atbCbCoordinates 作用:Coordinate system names associated with a central body 用法:[names, descrips]= atbCbCoordinates('cb') 说明:cb - central body name names - cell array of coordinate system names descrips - cell array of coordinate system descriptions 备注:This function outputs the possible coordinate systems which may be converted between using atbCoordXForm and atbCoordXFormMtx 3.2.13 atbCoordXForm 作用:General coordinate system transformation 用法:[ToPos, ToVel]= atbCoordXForm(time, 'FromCb', 'FromSystemName', FromEpoch,... 'ToCb', 'ToSystemName', ToEpoch,... FromPos, FromVel) 说明:time - time offset from epoch in seconds of the FromPos and FromVel Cb - central body names SystemName - valid coordinate system name, obtained via atbCbCoordinates Epoch - epochs for coordinate systems, may be ignored (see below) Pos - 3x1 position vector (meters) Vel - 3x1 velocity vector (meters) (optional) 备注:This function converts from one coordinate system of one central body to another system of another central body. Some coordinate systems require an epoch to fully define them, in these cases, the Epoch inputs will be used, otherwise the Epoch inputs will be ignored. For example, the J2000 epoch is intrinsic to the definition of the coordinate system and therefore any input epoch will be ignored. The various ...OfEpoch coordinate systems are examples of systems that need an epoch. 27 3.2.14 atbCoordXFormMtx 作用:General coordinate system transformation 用法:[TfmMtx, AngVelSysName, AngVel]= atbCoordXFormMtx('cb', 'FromSystemName', FromEpoch,'ToSystemName', ToEpoch) 说明:cb - central body name SystemName - valid coordinate system name, obtained via atbCbCoordinates Epoch - epochs for coordinate systems, may be ignored (see below) TfmMtx - transformation matrix AngVelSysName - name of the coordinate system in which the angular velocity is defined (optional) AngVel - angular velocity of the two systems (3x1) (optional) 备注:This function generates the rotation matrix from one coordinate system of a central body to another system of the same central body. Some coordinate systems require an epoch to fully define them, in these cases, the Epoch inputs will be used, otherwise the Epoch inputs will be ignored. For example, the J2000 epoch is intrinsic to the definition of the coordinate system and therefore any input epoch will be ignored. The various ...Of Epoch coordinate systems are examples of systems that need an epoch. 3.3 转动与四元数(Rotations and Quaternions) 3.3.1 atbAlignVecQuat 作用:Quaternion for coordinate system transformation 用法:rotQuat = atbAlignVecQuat(vec1A, vec1B) rotQuat = atbAlignVecQuat(vec1A, vec1B, vec2A, vec3B) 说明:vec1A - a 3x1 vector created by the user. vec1B - a 3x1 vector created by the user. vec2A - a 3x1 vector created by the user. vec3B - a 3x1 vector created by the user. rotQuat - a 4x1 vector quaternion 备注:Produces a quaternion for the transformation from coordinate system A to coordinate system B where the vector 1 is known in both coordinate systems. Vectors 2A and 3B are used (if supplied) to resolve the ambiguity about the vector 1 direction. After the alignment of vector 1 is achieved, the components of vectors 2A and 3B which are perpendicular to vector 1 are aligned. An example of this type of application would be to point a sensor boresight at a target while maintaining the minimum possible angle between the sun vector and the solar panels on the satellite. None of the vectors need to be unit vectors. 3.3.2 atbEulerToMtx 作用:Generate rotation matrix from Euler angles 用法:cosMtx = atbEulerToMtx(angles, sequence) 28

说明:angles - 3x1 vector of Euler angles sequence - 3 digit integer defining the order of rotation. (1-X, 2-Y, 3-Z). A common Euler angle is 313. cosMtx - 3x3 direction cosine matrix. 备注:Computes a direction cosine matrix from a set of Euler angles. The direction cosine matrix gives the relationship to transform from the reference coordinate system to the new coordinate system. 3.3.3 atbEulerToQuat 作用:Generate quaternion from Euler angles 用法:quat = atbEulerToQuat(angles, sequence) 说明:angles - 3x1 vector of Euler angles sequence - 3 digit integer defining the order of rotation. (1-X, 2-Y, 3-Z). A common Euler angle is 313. quat - 4x1 quaternion representing rotation 备注:Computes a rotation quaternion from a set of Euler angles. 3.3.4 atbMinRotQuat 作用:Minimum Rotation Quaternion 用法:quat = atbMinRotQuat(vec1, vec2) 说明:vec1, vec2 - 3x1 position vectors quat - 4x1 rotation quaternion 备注:Computes a quaternion to perform the minimum angle rotation to align vec1 along vec2. This can be useful in both active and passive applications. An example of an active application would be the generation of a maneuver quaternion to change the pointing of a satellite. An example of a passive application would be to determin the relationship between two coordinate systems when a vector is known in both systems. The quaternion would represent the system1 to system2 transformation. 3.3.5 atbMtxToEuler 作用:Matrix to Euler angles 用法:angles = atbMtxToEuler(cosMtx, sequence) 说明:cosMtx - 3x3 cosine matrix sequence - 3 digit integer defining the rotation order. (1-X, 2-Y, 3-Z). A common Euler angle is 313. angles - 3x1 vector of Euler angles 3.3.6 atbMtxToQuat 作用:Cosine matrix to quaternion conversion 用法:quat = atbMtxToQuat(cosMtx) 29 说明:cosMtx - 3x3 directional cosine matrix quat - 4x1 quaternion vector 3.3.7 atbMtxToYpr 作用:Cosine matrix to Yaw-Pitch-Roll 用法:yprVec = atbMtxToYpr(cosMtx, sequence) 说明:cosMtx - 3x3 direction cosine matrix sequence - 3 digit integer defining the rotation order yprVec - YPR angles, 3x1 3.3.8 atbQuatToMtx 作用:Quaternion to Matrix conversion 用法:cosMtx = atbQuatToMtx(quat) 说明:quat - 4x1 quaternion cosMtx - 3x3 directional cosine matrix 3.3.9 atbQuatXquat 作用:Quaternion multiplication 用法:quatC = atbQuatXquat(quatA, quatB) 说明:quatA,quatB - input 4x1 quaternions quatC - 4x1 quaternion product 备注:Computes the resultant quaternion due to the combination of the two input quaternions. The input quaternions may be thought of as representing two different rotations. The resulting quaternion represents the new rotation which is equivalent to performing the rotation of quaternion2 followed by the rotation of quaternion1. The order of the input quaternions is designed to resemble the way the rotations would appear on paper if you were writing out an equation. To rotate vector one through two rotations to produce vector 2, you would write V2 = Q1 Q2 V1. The resulting quaternion will have unit length. 3.3.10 atbYprToMtx 作用:Yaw Pitch Roll to Matrix 用法:cosMtx = atbYprToMtx(yprVec, sequence) 说明:yprVec - 3x1 Yaw-Pitch-Roll angles sequence - 3 digit integer defining the rotation order (1-Roll, 2-Pitch, 3-Yaw). A Yaw-Pitch-Roll sequence would be 321. cosMtx - 3x3 directional cosine matrix 备注:Builds a direction cosine matrix from yaw, pitch and roll angles. The sequence variable is used to specify the order of the rotations (1-Roll, 2-Pitch, 3-Yaw). A Yaw-Pitch-Roll sequence would be 321. 30 3.3.11 atbYprToQuat 作用:Yaw Pitch Roll to Quaternion 用法:quat = atbYprToQuat(yprVec, sequence) 说明:yprVec - 3x1 yaw-pitch-roll vector sequence - 3 digit integer defining the rotation order. (1-Roll, 2-Pitch, 3-Yaw). A Yaw-Pitch-Roll sequence would be 321. quat - 4x1 quaternion 备注:Builds a quaternion from yaw, pitch and roll angles. The sequence variable is used to specify the order of the rotations (1-Roll, 2-Pitch, 3-Yaw). A Yaw-Pitch-Roll sequence would be 321. 3.3.12 atbInterpQuat 作用:Interpolate Quaternion 用法:interpQuat = atbInterpQuat(startQuat, endQuat, interpParam) interpQuat = atbInterpQuat(startQuat, endQuat, interpParam, extraRot) 说明:startQuat - 4x1 quaternion endQuat - 4x1 quaternion interpParam - scalar interp factor. 0 < interpParam < 1 extraRot - extra rotations. interpQuat - 4x1 quaternion 备注:Interpolates two quaternions assuming a constant rate of rotation about a constant spin axis between the two end orientations. 3.4 中心对象操作与程序(Central Body Operations and Routines) 3.4.1 atbCbEphemeris 作用:Generate central body position/velocity in inertial coordinates 用法:[pos, vel] = atbCbEphemeris('cbName', times) 说明:cbName - valid central body name, e.g. 'Earth' times - vector of times to compute pos/vel for, length M pos,vel - 3xM matrices of inertial pos/vel data 备注:This function computes the position and velocity of the central body in the default inertial coordinate system at the specified time. The default inertial coordinate system has its origin at the solar system barycenter and axes that are aligned with the J2000 coordinate system. 3.4.2 atbCbGetTangent 作用:Tangent points on central body 用法:tanPts = atbCbGetTangent('cbName', posVec, normVec) 说明:cbName - Valid central body name, e.g. 'Earth' 31 posVec - 3x1 vector, CBF position normVec - 3x1 vector, CBF normal direction tanPts - 3x2 matrix, CBF points of tangency 备注:Computes vectors to the two tangent points on the surface of the central body given a position vector specifying a location outside of the central body and a normal vector. The normal vector must be perpendicular to the position vector and the two output vectors will lie in the plane defined by the normal vector. All vectors are expressed in central body fixed coordinates. 3.4.3 atbCbGravParam 作用:Gravitational Parameter 用法:[gm, refDist, J2, J4] = atbCbGravParam('cbName') 说明:cbName - Valid central body name, e.g. 'Earth' gm - gravitational parameter (meters^3 / sec^2) refDistance - equatorial radius (meters) J2 - zonal harmonic parameter (unitless) J4 - zonal harmonic parameter (unitless) 3.4.4 atbCbGrazeAlt 作用:Grazing altitude 用法:[alt, minAltVec, isBetween] = atbCbGrazeAlt('cbName', vec1, vec2) [alt, minAltVec] = atbCbGrazeAlt('cbName', vec1, vec2) alt = atbCbGrazeAlt('cbName', vec1, vec2) 备注:The input vectors are given in the central body fixed coordinate system. The function returns the minimum altitude along the line of sight between the two locations. The CBF vector to the minimum altitude point is optionally computed. An indication of whether or not the minimum altitude point is between the end points--as opposed to at an end point-- is provided if the isBetween output is specified. 3.4.5 atbCbGrazeAngle 作用:Grazing angle 用法:angle = atbCbGrazeAngle('cbName', fromVec, toVec) 备注:The input vectors are given in the central body fixed coordinate system. The function returns the angle between the line of sight vector and the closest tangent to the surface of the central body which is coplanar with the two input vectors. The sign of this angle should be positive if the line of sight does not intersect the central body and negative otherwise. 32 3.4.6 atbCbIntersect 作用:Central body intersection 用法:[intx,intVec1, intVec2, mult1, mult2] = atbCbIntersect('cbName', posVec, dirVec) [intx,intVec1, intVec2] = atbCbIntersect('cbName', posVec, dirVec) intx = atbCbIntersect('cbName', posVec, dirVec) 说明:cbName - valid central body name, e.g. 'Earth' posVec - 3x1 CBF position vector dirVec - 3x1 CBF direction vector intx - True/False intVec* - Central body intercept points, CBF 3x1. mult* - Multiplier to scale dirVec by to yield the intersections 备注:This function returns True if the vector specified by the direction argument will intersect the central body and False otherwise. The origin of the direction vector is specified by the position vector. The optional vectors intx1 and intx2 are points of intersection with the central body. The optional outputs mult1 and mult2 represent scalars by which the direction vector is multiplied and then added to the position vector to yield the intersection points. The multipliers may be positive or negative depending on if the intersections occur in the positive or negative direction. 3.4.7 atbCbLclRadCen 作用:Local central body radius, geocentric basis 用法:radius = atbCbLclRadCen('cbName', lat, long) 说明:cbName - Valid central body name, e.g. 'Earth' lat - Latitude long - Longitude radius - The central body radius 备注:This function returns the radius of the central body at the input geocentric latitude and longitude. The term geoocentric implies that the latitude and longitude are measured based on the vector from the origin of the central body. 3.4.8 atbCbLclRadDet 作用:Local central body radius, geodetic basis 用法:radius = atbCbLclRadDet('cbName', lat, long) 说明:cbName - Valid central body name, e.g. 'Earth' lat - Latitude long - Longitude radius - The central body radius 备注:This function returns the radius of the central body at the input geodetic latitude and longitude. The term 33

本文来源:https://www.bwwdw.com/article/4gl.html

Top