Matlab与STK连接函数库(重新整理)_第1页
Matlab与STK连接函数库(重新整理)_第2页
Matlab与STK连接函数库(重新整理)_第3页
Matlab与STK连接函数库(重新整理)_第4页
Matlab与STK连接函数库(重新整理)_第5页
已阅读5页,还剩65页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、没谱青年重新整理2012年4月12日3目 录一、matlab/simulink、stk联合仿真的优势1二、mexconnect函数详细介绍22.1 stk服务器命令(stk server commands)22.1.1 stkdefaultconid22.1.2 stkdefaulthost22.1.3 stksetdefaulthost22.2 应用命令(application commands)22.2.1 stkautosave22.2.2 stkhomedir22.2.3 stkcurrentdir22.2.4 stksetcurrentdir22.2.5 stkobjnames22.

2、2.6 stktimerstart32.2.7 stktimer32.3 普通对象命令(generic object commands)32.3.1 stkcentralbody32.3.2 stkloadobj32.3.3 stksaveobj32.3.4 stknewobj32.3.5 stkunload42.3.6 stkunloadchildren42.3.7 stkrename42.3.8 stktimeperiod42.3.9 stktimeperiodinsec52.3.10 stkvalidobj52.3.11 stkdescrip52.3.12 stksetdescrip52

3、.4 场景命令(scenario commands)62.4.1 stkanimtime62.4.2 stkepoch62.4.3 stksetepoch62.4.4 stksetepochinsec62.4.5 stksyncepoch62.4.6 stkconvertdate62.4.7 stksettimeperiod62.4.8 stksettimeperiodinsec72.4.9 stkscenfilepath72.4.10 stkvalidscen72.5 基本飞行器数据(basic vehicle data)72.5.1 stktimeperiod72.5.2 stktimep

4、eriodinsec72.5.3 stksettimeperiod72.6 卫星运动属性(satellite propagators)82.6.1 stksetpropcart82.6.2 stksetpropclassical82.6.3 stksetpropequi92.6.4 stksetpropsgp492.6.5 stkpropagate102.7 飞行器位置与速度(vehicle position and velocity)102.7.1 stkposvelcbf102.7.2 stkposvelcbi102.7.3 stkephemeriscbf102.7.4 stkepheme

5、riscbi112.7.5 stksetephemeriscbf112.7.6 stksetephemeriscbi112.7.7 stkloadephemeris112.7.8 stksaveephemeriscbf122.7.9 stksaveephemeriscbi122.7.10 stksavedynstate122.7.11 stkdynstate122.8 飞行器姿态(vehicle attitude)122.8.1 stkattitudecbf122.8.2 stkattitudecbi132.8.3 stksetattitudecbf132.8.4 stksetattitude

6、cbi132.8.5 stkloadattitude142.8.6 stksaveattitudecbf142.8.7 stksaveattitudecbi142.9 基本飞行器姿态类型(basic vehicle attitude types)142.9.1 stksetattbasic142.9.2 stksetattspinsun152.9.3 stksetattspinnadir152.9.4 stksetattyawnadir152.9.5 stksetattspinning162.9.6 stksetattfixed162.9.7 stkattoffset172.10 飞机,车辆与

7、船舰属性(aircraft, groundvehicle and ship propagators)172.10.1 stksetwaypoints172.10.2 stkloadwaypoints182.10.3 stksetgreatarcstart182.11 导弹运动属性(missile propagators)182.11.1 stksetpropballistic182.12 设备与目标(facilities and targets)182.12.1 stkposvelcbf182.12.3 stksetfacposcbf182.12.3 stksetfacposlla192.13

8、 区域目标(area targets)192.13.1 area target boundary192.14 stk工具(stk tools)192.14.1 stkaccess192.14.2 stkreport192.14.3 stkaccreport202.14.4 stkfinddata212.15 连接命令(connect commands)212.15.1 stkopen212.15.2 stkclose212.15.3 stkexec212.15.4 stkconnect22三、aerotoolbox函数详细介绍223.1 坐标系中的历元与数据函数coordinate syste

9、m epoch and date functions)223.1.1 atbgetepoch223.1.2 atbsetepoch223.1.3 atbdatetoepochsec233.1.4 atbepochsectodate233.2 坐标系转换(coordinate conversions)243.2.1 atbcbftocbi243.2.2 atbcbftocbimtx243.2.3 atbcbftolhmtx243.2.4 atbcbftolla243.2.5 atbcbftollr253.2.6 atbcbftovvlhmtx253.2.7 atbcbitocbf253.2.8

10、atbcbitocbi263.2.9 atbcbitocbimtx263.2.10 atbllatocbf263.2.11 atbllrtocbf273.2.12 atbcbcoordinates273.2.13 atbcoordxform273.2.14 atbcoordxformmtx283.3 转动与四元数(rotations and quaternions)283.3.1 atbalignvecquat283.3.2 atbeulertomtx283.3.3 atbeulertoquat293.3.4 atbminrotquat293.3.5 atbmtxtoeuler293.3.6

11、atbmtxtoquat293.3.7 atbmtxtoypr303.3.8 atbquattomtx303.3.9 atbquatxquat303.3.10 atbyprtomtx303.3.11 atbyprtoquat313.3.12 atbinterpquat313.4 中心对象操作与程序(central body operations and routines)313.4.1 atbcbephemeris313.4.2 atbcbgettangent313.4.3 atbcbgravparam323.4.4 atbcbgrazealt323.4.5 atbcbgrazeangle32

12、3.4.6 atbcbintersect333.4.7 atbcblclradcen333.4.8 atbcblclraddet333.4.9 atbcbsurfdistcen343.4.10 atbcbsurfdistdet343.4.11 atbcbsurfnormcen343.4.12 atbcbsurfnormdet343.5 指向,星历与姿态文件(waypoint, ephemeris and attitude files)353.5.1 atbreadattitudecbf353.5.2 atbreadattitudecbi353.5.3 atbwriteattitudecbf35

13、3.5.4 atbwriteattitudecbi353.5.5 atbreadephemeriscbf363.5.6 atbreadephemeriscbi363.5.7 atbwriteephemeriscbf363.5.8 atbwriteephemeriscbi363.5.9 atbwritewaypointfile363.6 位置与速度函数(position and velocity functions)373.6.1 atbgeometry373.6.2 atbgengreatarc393.6.3 atbcreatedynstatecbf393.6.4 atbcreatedynst

14、atecbi393.6.5 atblhquatcen403.6.6 atblhquatcbfdet403.6.7 atbflatten413.7 轨道要素转换(orbit element set conversions)413.7.1 atborbcarttodel413.7.2 atborbcarttoequi413.7.3 atborbcarttomod423.7.4 atborbcarttosphere423.7.5 atborbcarttomixedsphere433.7.6 atborbdeltocart433.7.7 atborbequitocart433.7.8 atborbmo

15、dtocart433.7.9 atborbspheretocart433.7.10 atborbmixedspheretocart433.8 轨道根数分量的转换(orbit element parameter conversions)433.8.1 atborbecctotrue433.8.2 atborbtruetoecc443.8.3 atborbmeantotrue443.8.4 atborbtruetomean443.8.5 atborblantoraan443.8.6 atborbraantolan443.8.7 atborbperiradtoperiod443.8.8 atborb

16、periodtoperirad453.8.9 atborbperiradtosmajaxis453.8.10 atborbsmajaxistoperirad453.8.11 atborbtpantotrue453.8.12 atborbtruetotpan453.8.13 atborbtpptotrue463.8.14 atborbtruetotpp463.9 dted操作(dted operations)463.9.1 atbcblistdtedtypes463.9.2 atbcblistdted463.9.3 atbcbadddtedsource473.9.4 atbcbdtedsourc

17、eui473.9.5 atbloadnimadted473.9.6 atbcbremdtedsource473.9.7 atbcbgetdtedsourceforpos473.9.8 atbgetdtedpatch483.9.9 atbcleardtedpatch483.9.10 atballdtedpatches483.9.11 atbdtedpatchinfo483.9.12 atbdtedelev483.9.13 atbdtedpatchelev493.9.14 atbazelmask493.9.15 atbdtedres493.9.16 atbdtedlosexist493.10 运动

18、属性(propagators)503.10.1 atblambertfixedtime503.10.2 atblambertminenergy503.10.3 atblambertmineccen503.10.4 atbkeplerprop503.10.5 atbj2prop513.10.6 atbj4prop513.10.7 atblaunchprop523.10.8 atbmissilepropdatafixedtime523.10.9 atbmissilepropdatafixedalt533.10.10 atbmissilepropdatafixeddelta533.10.11 atb

19、missilepropdataminenergy533.10.12 atbtleread533.10.13 atbtlegetall543.10.14 atbtledelete543.10.15 atbtleprop543.10.16 atbtleepoch543.10.17 atbtleinfo543.11 导航精度(navigation accuracy)553.11.1 atbcomputedop553.12 地图数据(map data)563.12.1 atbmapdetails563.12.2 atbplotmapdetails563.13 覆盖网格(coverage grids)5

20、63.13.1 atbgetpolyhandle563.13.2 atbinsidepoly563.13.3 atbclearpolyhandle57四、stkexec使用总结574.1 场景动画控制574.1.1 控制按钮57五、示例574.1 卫星编队之构型设计574.2 使用心得58一、matlab/simulink、stk联合仿真的优势stk/matlab,simulink stk与matlab联合实现可视化仿真集成,该方案可以适用于航空航天、航海、作战模拟、电子对抗、卫星导航定位、遥感遥测、卫星通信等各个可视化仿真集成案例之中。stk/matlab接口为stk和matlab提供了双向

21、通讯功能,在matlab工作区通过connect模块以tcp/ip协议打开stk端口。 利用超过150个matlab命令增强stk的轨道、弹道、轨迹的分析能力,mexconnect还提供在matlab命令行直接使用任意 stk/connect 命令的功能。mexconnect工具可以建立各种不同级别的stk对象,进行操作并生成报告。所有stk的数据,包括动态位置、速度和姿态数据,可以返 回到matlab工作空间,用于数学分析。宇航工具箱让matlab用户可以输出多重坐标系,以及符合stk格式的星历和姿态文件用于vo模块的三维可视 化。另外此工具还可以使用stk附加模块的功能如stk/comm(

22、通信),stk/coverage (覆盖)和stk/radar(雷达)。表1 stk模块基本模块 基本版专业版三维显示高级三维显示satellite tool kit(stk)stk/professioal(stkpro)stk/visualization option(stk/vo)stk/advanced vo分析模块 轨道机动链路分析通信分析接近分析覆盖分析拦截飞行工具导弹飞行工具精确定轨雷达分析空间环境stkastrogatorstkchainsstkcommstkconjunction analysis toolsstkcoveragestkinterceptor

23、 flight tool(ift)stkmissile flight tool(mft)stkprecision orbit determinationsystem(pods)stkradarstkspace environment综合数据 高精度数字地图高分辨率地球影像雷达高级环境全球三维地形stkhigh resolution mapsstkvo earth imagerystkradar advanced environment(rae)stkterrain扩展与接口 连接模块网络实时播放matllab接口分布式仿真地理信息接口程序开发库stkconnect and

24、stkserverstkwebcaststkmatlab interfacestkdistributed interactive simulation(dis)stkgeographic informationsystems(gis)stkprogrammer's library(pl)二、mexconnect函数详细介绍2.1 stk服务器命令(stk server commands)2.1.1 stkdefaultconid 作用:返回stk的默认标识2.1.2 stkdefaulthost作用:返回stk的默认地址2.1.3 stksetdefaulthost作用:设置stk的新

25、地址用法: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

26、 - seconds between saves2.2.2 stkhomedir作用:返回stk的安装路径用法:dir = stkhomedir2.2.3 stkcurrentdir作用:返回stk的当前路径用法:dir = stkcurrentdir2.2.4 stksetcurrentdir作用:设置stk的当前路径用法:stksetcurrentdir('directory')2.2.5 stkobjnames作用:返回stk中对象的名字用法:objnames = stkobjnames objnames = stkobjnames(classcell)说明:classc

27、ell - optional cell array of stk class names. objnames - cell array of stk object names 2.2.6 stktimerstart作用:启动计时器用法:stktimerstart2.2.7 stktimer作用:返回计时器时间用法:split, total = stktimer说明:split - elapsed time since last stktimer command total - elapsed time since last stktimerstart command2.3 普通对象命令(gen

28、eric 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.(从stkobjnames获得对象 的字符串名称。如果省略,返回场景的中央机构 ) centbody - string name of object coordinate s

29、ystem 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 na

30、me(有效类名). consult(查询) stk documentation (文件) for alist 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 o

31、btained 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 n

32、ame. consult stk documentation for a list of valid classes. names are case-sensitive. 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

33、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 stktime

34、period作用:获取对象起止时间用法: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.

35、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

36、jullcl julianlocal julianlcl julutc julianutc jul4 julian4 julian4utc 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

37、/mm/dd 备注:更对内容参见stkconvertdate、stkobjnames2.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 -

38、time in seconds2.3.10 stkvalidobj作用:检查对象的有效性用法:result = stkvalidobj('path')说明:path- object path name result - 1 if valid, 0 otherwise2.3.11 stkdescrip作用:获取对象的描述用法:description = stkdescrip('objpath', 'shortlong')说明:objpath- valid path, may be obtained from stkobjnames. shortlo

39、ng - 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 'lo

40、ng'. description - description text(说明文本).2.4 场景命令(scenario commands)2.4.1 stkanimtime作用:返回当前动画时间用法:time = stkanimtime说明:time - current stk animation time (sec)(当前stk动画时间)2.4.2 stkepoch作用:返回当前场景历元用法:epoch = stkepoch('dateformat')说明:dateformat- valid date format(有效的日期格式).epoch - string re

41、presentation 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 el

42、apsed 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.(stk和航空工具箱保持独

43、立的场景历 元。 这个函数应该被调用任何时间更改通过mexconnect或通过stk gui的 stk历元 )2.4.6 stkconvertdate作用:转换日期格式用法:newdate = stkconvertdate('date', 'format', 'newformat')2.4.7 stksettimeperiod作用:设置场景或卫星的时间周期用法:stksettimeperiod('start', 'stop', 'dateformat') stksettimeperiod('

44、satpath', 'start', 'stop', 'dateformat')说明:satpath - satellite path name, defaults to scenario(卫星的路径名,默认到场景 ) start, stop- string dates(字符串日期)2.4.8 stksettimeperiodinsec作用:设置场景的时间周期用法:stktimeperiodinsec(start, stop)说明:start, stop - time in seconds2.4.9 stkscenfilepath作用:返

45、回场景文件的路径用法:path = stkscenfilepath说明:path - current stk scenario directory(当前stk场景目录)2.4.10 stkvalidscen作用:检查可用的场景用法:result = stkvalidscen说明:result - 1 if valid, 0 otherwise2.5 基本飞行器数据(basic vehicle data)2.5.1 stktimeperiod作用:获取对象的时间周期用法:timeperiod = stktimeperiod('dateformat') timeperiod = s

46、tktimeperiod('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作用:获取对象的时间周期用法

47、: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 seconds2.5.3 stksettimeperiod作用:设置场景或对象的时间周期用法:stksettimeperiod('start', 'stop',

48、'dateformat') stksettimeperiod('satpath', 'start', 'stop', 'dateformat')说明:satpath - satellite path name, defaults to scenario start, stop- string dates2.6 卫星运动属性(satellite propagators)2.6.1 stksetpropcart作用:设置笛卡尔坐标系下卫星运动的参数用法:stksetpropcart('objpath',

49、 '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 s

50、ensitive!(区分大小写) coordsystem - string name of coordinate system(坐标的字符串名称), valid choices are:'fixed', 'j2000', 'meanofdate', 'meanofepoch', 'trueofdate', 'trueofepoch', 'b1950', 'temeofdate', 'temeofepoch', 'alignmentatepoch

51、'. 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(3x1位置矢量在参考时间, 米 ) vel - 3x1 vector of velocity at reference time, m

52、eters/sec(3x1位置矢量在参考时间, 米每秒 ) coordepoch - coordinate system epoch, required by all '.ofepoch' coordinate systems.2.6.2 stksetpropclassical作用:设置经典轨道根数描述下卫星运动的参数用法:stksetpropclassical('objpath', 'propagator', 'coordsystem', . tstart, tstop, dt, orbitepoch, semimajoraxi

53、s, 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(坐标

54、系统) - 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 second

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论