整理者:龚德仁
2008年10月7日
目 录
一、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
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
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 andDate 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
3.3.12 atbInterpQuat. 31
3.4 中心对象操作与程序(Central Body Operations andRoutines)... 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 andAttitude 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.5atbOrbCartToMixedSphere. 43
3.7.6 atbOrbDelToCart. 43
3.7.7 atbOrbEquiToCart. 43
3.7.8 atbOrbModToCart. 43
3.7.9 atbOrbSphereToCart. 43
3.7.10atbOrbMixedSphereToCart. 43
3.8 轨道根数分量的转换(Orbit Element ParameterConversions)... 43
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.9atbOrbPeriRadToSMajAxis. 45
3.8.10atbOrbSMajAxisToPeriRad. 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.8atbMissilePropDataFixedTime. 52
3.10.9atbMissilePropDataFixedAlt. 53
3.10.10atbMissilePropDataFixedDelta. 53
3.10.11atbMissilePropDataMinEnergy. 53
3.10.12 atbTLERead. 53
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使用总结. 57
4.1 场景动画控制... 57
4.1.1 控制按钮... 57
五、示例. 57
4.1 卫星编队之构型设计... 57
4.2 使用心得... 58
STK/MATLAB,SIMULINKSTK与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模块
基本模块 |
|
基本版 |
Satellite Tool Kit(STK) |
分析模块 |
|
轨道机动 |
STK/Astrogator STK/Space Environment |
综合数据 |
|
高精度数字地图 |
STK/High Resolution Maps |
扩展与接口 |
|
连接模块 |
STK/Connect and STK/Server |
作用:返回STK的默认标识
作用:返回STK的默认地址
作用:设置STK的新地址
用法:stkSetDefaultHost('host:port')
作用:自动保存STK
用法:stkAutoSave('onOff','directory',period)
stkAutoSave('onOff')
说明:onOff- 'on' or 'off'
directory - string pathname of autosave directory
period -seconds between saves
作用:返回STK的安装路径
用法:dir= stkHomeDir
作用:返回STK的当前路径
用法:dir= stkHomeDir
作用:设置STK的当前路径
用法:stkSetCurrentDir('directory')
作用:返回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
作用:启动计时器
用法:stkTimerStart
作用:返回计时器时间
用法:[split,total] = stkTimer
说明:split- elapsed time since last stkTimer command
total - elapsed time since last stkTimerStart command
作用:返回坐标系的中心体
用法:centBody= stkCentralBody('objPath')
说明:objPath - String name of object obtained fromstkObjNames.
If ommitted, the scenario central body is returned.
centBody - String name of object coordinate systemcentral body.
备注:更多内容参见stkObjNames、aeroToolbox。
作用:导入对象文件
用法:stkLoadObj('parentPath','class', 'fileName')
stkLoadObj('scenarioFileName')
说明:parentPath - Valid path, may be obtained fromstkObjNames.
class - Valid class name. Consult STK documentation for a
list of valid classes. Names are case-sensitive.
fileName - File path of object file
作用:将对象保存
用法:stkSaveObj('objPath','dirName')
stkSaveObj('objPath')
说明:objPath - Valid path, may be obtained fromstkObjNames.
dirName - Directory path of object file. When omitted,
the default directory is used.
作用:创建一个新对象
用法: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.
name -Name of new object
备注:创建场景时,语法为stkNewObj('Scenario',' ','Scenario1')
作用:卸载对象
用法:stkUnload('objPath')
说明:objPath - Valid path, may be obtained fromstkObjNames.
作用:卸载对象的所有子对象
用法:stkUnloadChildren('objPath')
说明:objPath - Valid path, may be obtained fromstkObjNames.
作用:将对象重命名
用法:stkRename('objPath','newName')
说明:objPath - Valid path, may be obtained fromstkObjNames.
newName -New instance name.
作用:获取对象起止时间
用法:timePeriod= stkTimePeriod('dateFormat')
timePeriod = stkTimePeriod('objPath', 'dateFormat')
说明:
objPath - Valid vehicle object path, defaults to scenario path.
timePeriod - Structure array with start andstop 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
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
作用:获取对象起止时间,以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
作用:检查对象的有效性
用法:result= stkValidObj('path')
说明:path - object path name
result - 1 if valid, 0 otherwise
作用:获取对象的描述
用法:description= stkDescrip('objPath', 'shortLong')
说明:objPath - Valid path, may be obtained fromstkObjNames.
shortLong -Type of description to get, 'short' or 'long'.
作用:设置对象的描述
用法:stkSetDescrip('objPath','shortLong', 'description')
说明:objPath - Valid path, may be obtained fromstkObjNames.
shortLong - Type of description to set, 'short' or'long'.
description - Description text.
作用:返回当前动画时间
用法:time= stkAnimTime
说明:time -current STK animation time (sec)
作用:返回当前场景历元
用法:epoch= stkEpoch('dateFormat')
说明:dateFormat - Valid date format.
epoch - string representation of scenarioepoch.
作用:设置场景历元
用法:stkSetEpoch('epoch','dateFormat')
说明:dateFormat - Valid date format.
epoch - string representation of scenario epoch.
作用:设置场景历元
用法:stkSetEpochInSec(newEpoch)
说明:newEpoch- number of seconds elapsed between current epoch
and the desired epoch.
作用:aeroToolbox与STK场景有同样的历元
用法:stkSyncEpoch
备注:STKand aeroToolbox maintain separate scenario epochs.
Thisfunction should be called anytime the STK epoch is changed
through mexConnect or via the STK GUI.
作用:转换日期格式
用法:newDate= stkConvertDate('date', 'format', 'newFormat')
作用:设置场景或卫星的时间周期
用法:stkSetTimePeriod('start','stop', 'dateFormat')
stkSetTimePeriod('satpath', 'start', 'stop', 'dateFormat')
说明:satpath - satellite path name,defaults to scenario
start, stop - string dates
作用:设置场景的时间周期
用法:stkTimePeriodInSec(start,stop)
说明:start, stop - time in seconds
作用:返回场景文件的路径
用法:path= stkScenFilePath
说明:path - current STK scenariodirectory
作用:检查可用的场景
用法:result= stkValidScen
说明:result - 1 if valid, 0 otherwise
作用:获取对象的时间周期
用法:timePeriod= stkTimePeriod('dateFormat')
timePeriod =stkTimePeriod('objPath', 'dateFormat')
说明:objPath - Valid vehicle objectpath, defaults to scenario path.
timePeriod - Structure array with start and stopfields.
Each fieldcontains a string date value.
作用:获取对象的时间周期
用法:[start,stop] = stkTimePeriodInSec(objPath)
[start, stop] = stkTimePeriodInSec
说明:objPath - valid object path, seestkObjNames. When
not provided,the scenario time period is returned.
start, stop - time inseconds
作用:设置场景或对象的时间周期
用法:stkSetTimePeriod('start','stop', 'dateFormat')
stkSetTimePeriod('satpath', 'start', 'stop', 'dateFormat')
说明:satpath - satellite path name,defaults to scenario
start, stop - string dates
作用:设置笛卡尔坐标系下卫星运动的参数
用法:stkSetPropCart('objPath','propagator', 'coordSystem', ...
tStart, tStop,dt, orbitEpoch, pos, vel, coordEpoch)
说明:objPath - Valid path, may beobtained from stkObjNames.
propagator - 'TwoBody','J2Perturbation', 'J4Perturbation', 'HPOP' or 'PODS'
Thisparameter is case sensitive!
coordSystem - stringname of coordinate system, valid choices are:
'Fixed','J2000', 'MeanOfDate', 'MeanOfEpoch',
'TrueOfDate', 'TrueOfEpoch', 'B1950',
'TEMEOfDate', 'TEMEOfEpoch', 'AlignmentAtEpoch'.
Thisparameter is case sensitive!
tStart, tStop - times inepoch seconds.
dt - time step inseconds.
orbitEpoch - referencetime of orbit data, in scenario epoch seconds
pos - 3x1 vector ofpositions at reference time, meters
vel - 3x1 vector ofvelocity at reference time, meters/sec
coordEpoch - coordinatesystem epoch, required by all '...OfEpoch'
coordinatesystems.
作用:设置经典轨道根数描述下卫星运动的参数
用法:stkSetPropClassical('objPath','propagator', 'coordSystem', ...
tStart, tStop,dt, orbitEpoch, semimajorAxis, eccentricity,...
inclination,argOfPerigree, RAAN, meanAnomaly, coordEpoch)
说明:objPath - Valid path, may beobtained from stkObjNames.
propagator - 'TwoBody','J2Perturbation', 'J4Perturbation', 'HPOP' or 'PODS'
Thisparameter is case sensitive!
coordSystem - stringname of coordinate system, valid choices are:
'Fixed', 'J2000', 'MeanOfDate','MeanOfEpoch',
'TrueOfDate', 'TrueOfEpoch', 'B1950',
'TEMEOfDate', 'TEMEOfEpoch', 'AlignmentAtEpoch'.
Thisparameter is case sensitive!
tStart, tStop - times inepoch seconds.
dt - time step inseconds.
orbitEpoch - referencetime of orbit data, in scenario epoch seconds
coordEpoch - coordinatesystem epoch, required by all '...OfEpoch'
coordinatesystems.
semimajorAxis - units in meters
eccentricity - unitless
inclination - units in radians
argOfPerigree - units in radians
RAAN - units in radians
meanAnomaly - units in radians
作用:设置春分点坐标下卫星运动的参数
用法:stkSetPropEqui('objPath','propagator', 'coordSystem', ...
tStart, tStop,dt, orbitEpoch, semimajorAxis, ...
h, k, p, q,meanLongitude, formulation, coordEpoch)
说明:objPath - Valid path, may beobtained from stkObjNames.
propagator - 'TwoBody','J2Perturbation', 'J4Perturbation', 'HPOP' or 'PODS'
Thisparameter is case sensitive!
coordSystem - string name ofcoordinate system, valid choices are:
'Fixed','J2000', 'MeanOfDate', 'MeanOfEpoch',
'TrueOfDate','TrueOfEpoch', 'B1950',
'TEMEOfDate','TEMEOfEpoch', 'AlignmentAtEpoch'.
Thisparameter is case sensitive!
tStart, tStop - times in epoch seconds.
dt - time step in seconds.
orbitEpoch - reference timeof orbit data, in scenario epoch seconds
coordEpoch - coordinatesystem epoch, required by all '...OfEpoch'
coordinatesystems.
semimajorAxis - units inmeters
h, k, p, q - unitless
meanLongitude - units inradians
formulation - string,'Posigrade' or 'Retrograde'
作用:设置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 beobtained from stkObjNames.
tStart, tStop - times inepoch seconds.
dt - time step in seconds.
tleInfo - tleInfo fromatbTLEInfo
SSC - U.S. Space SurveillanceCenter Catalog Number (as a char string)
orbitEpoch - string date,must be in YYDDD.SSSSSSS format
meanMotion - rev/day
eccentricity - unitless
inclination - units inradians
argOfPerigree - units inradians
RAAN - units in radians
meanAnomaly - units inradians
meanMotionDot
meanMotionDotDot
bStar - m^2/kg
作用:设置卫星运动的参数
用法:stkPropagate('satPath', tStart,tStop)
说明:satPath - Valid satellite path,may be obtained from stkObjNames.
tStart, tStop - times inepoch seconds.
作用:获取中心体本体系下位置和速度
用法:[pos, vel] =stkPosVelCBF('objPath', time)
说明:objPath - Vehicle or facilitypath, 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 convertedto any other system using
commands in the Aerospace Toolbox. The command stkCentralBody
may be used to obtain the central body name ofthe object.
作用:获取中心体惯性系下位置和速度
用法:[cbiPos, cbiVel] = stkPosVelCBI('vehPath',time)
说明:vehPath - Vehicle path, may beobtained from stkObjNames.
time - Scenario time (sec).
cbiPos - Inertial position (meters).
cbiVel - Inertial velocity (meters/sec).
备注:CBI coordinates may be convertedto any other system using
commands in the Aerospace Toolbox. The command stkCentralBody
may be used to obtain the central body name ofthe object.
作用:本体系飞行器星历数据
用法:[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)
time - 1xN vector (sec)
pos - CBF cartesian position, 3xN (meters)
vel - CBF cartesian velocity, 3xN (meters/sec)
cb - central body name
作用:惯性系下的飞行器星历数据
用法:[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
作用:本体系下设置飞行器星历数据
用法: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 scenariodirectory named {objName}.e, where objName is derived from the objPath.
作用:惯性系下设置飞行器星历数据
用法: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)
作用:从文件中载入星历
用法:stkLoadEphemeris('objPath','fileName')
说明:objPath - Valid path, may beobtained from stkObjNames.
fileName - file name.
作用:保存星历到文件
用法:stkSaveEphemerisCBF('objPath',timeStep, 'fileName')
stkSaveEphemerisCBF('objPath',timeStep, 'fileName', startTime, stopTime)
说明:objPath - Valid path, may beobtained from stkObjNames.
timeStep - Granularityof time steps (sec).
fileName - file name.
startTime - start time(sec).
stopTime - stop time(sec).
作用:保存星历到文件
用法:stkSaveEphemerisCBF('objPath',timeStep, 'fileName')
stkSaveEphemerisCBF('objPath',timeStep, 'fileName', startTime, stopTime)
说明:objPath - Valid path, may beobtained from stkObjNames.
timeStep - Granularityof time steps (sec).
fileName - file name.
startTime - start time(sec).
stopTime - stop time(sec).
作用:保存动力学数据
用法:stkSaveDynState('objPath','varName', 'fileName', dT)
说明:objPath - string name of vehicleor facility
varName - variable namefor MAT file
fileName - MAT file name
dT - time step ofdynamic state data
作用:产生动力学数据
用法:dynState = stkDynState(objPath,dt)
说明:objPath - valid STK object path
dt - time interval for data
dynState - dynamic state data structure
作用:飞行器姿态数据
用法:[time, quats, cb] =stkAttitudeCBF(objPath, dt)
[time, quats, cb] = stkAttitudeCBF(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 - CBF to bodyquaternions, 4xN
cb - central body name
作用:飞行器姿态数据
用法:[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
作用:设置飞行器姿态
用法: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 thescenario directory named
{objName}.a, whereobjName is derived from the
objPath.
作用:设置飞行器姿态
用法: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 thescenario directory named
{objName}.a, whereobjName is derived from the
objPath.
作用:从文件载入姿态
用法:stkLoadAttitude('objPath','fileName')
说明:objPath - Valid path, may beobtained from stkObjNames.
fileName - file name.
作用:保存姿态到文件
用法:stkSaveAttitudeCBF('objPath',timeStep, 'fileName')
stkSaveAttitudeCBF('objPath', timeStep, 'fileName', startTime, stopTime)
说明:objPath - Valid path, may beobtained from stkObjNames.
timeStep - Granularityof time steps (sec).
fileName - file name.
startTime - start time(sec).
stopTime - stop time(sec).
作用:保存姿态到文件
用法:stkSaveAttitudeCBI('objPath',timeStep, 'fileName')
stkSaveAttitudeCBI('objPath', timeStep, 'fileName', startTime, stopTime)
说明:objPath - Valid path, may beobtained from stkObjNames.
timeStep - Granularityof time steps (sec).
fileName - file name.
startTime - start time(sec).
stopTime - stop time(sec).
作用:设置基本的姿态类型
用法:stkSetAttBasic('satPath','attType', offset)
说明:satPath - string name ofsatellite
offset - either analignOffset or constraintOffset, depending on type (radians)
attType - attitude typestring. Valid choices are:
NADIRECIVEL
NADIRECFVEL
NADIRSUN
NADIRORBIT
ECIVELNADIR
ECFVELNADIR
SUNNADIR
SUNECLIPTIC
SUNECIZ
SUNOCCULT
作用:旋转轴指向太阳
用法:stkSetAttSpinSun('satPath', rate,offset, epoch)
说明:satPath - string name ofsatellite
rate - angular spin rate(rpm)
offset - angular(radians)
epoch - control phase ofspin (epoch sec)
备注:The body-fixed Z axis points tothe Sun and the satellite
rotates about the Sunvector. The spin rate is specified in revolutions
per minute; positive valuesindicate rotation in a right-handed
sense with respect to thespin axis. The initial orientation of
the satellite is specifiedby using the spin offset and offset
epoch fields. The spinoffset is an angular measure of the
difference between thesatellite orientation at the offset
epoch from the orientationachieved by orienting the Z axis.
作用:旋转轴指向地面
用法:stkSetAttSpinNadir('satPath',rate, offset, epoch)
说明:satPath - string name ofsatellite
rate -angular spin rate (rpm)
offset- angular (radians)
epoch- control phase of spin (epoch sec)
备注:The satellite's Z axis is assumedto be the spin axis
and aligned to nadir. Thespin rate is specified in revolutions
per minute; positive valuesindicate rotation in a right-handed
sense with respect to thespin axis. The initial orientation of
the satellite is specifiedby using the spin offset and offset
epoch fields. The spinoffset is an angular measure of the
difference between thesatellite orientation at the offset
epoch from the orientationachieved by orienting the Z axis.
作用:偏航轴指向地面
用法:stkSetAttYawNadir('satPath','PR', pitch, roll)
stkSetAttYawNadir('satPath', 'EULER', angle1, angle2, seq)
stkSetAttYawNadir('satPath', 'RaDec', RAAN, declination)
说明:satPath - string name ofsatellite
pitch, roll, angle1,angle2, RAAN, declination - yaw axis orientation angles (radians)
seq - Euler anglesequence, can be 12, 21, 31 or 32
备注:The satellite's Z axis is fixedin inertial space. The direction
of the satellite Z axis is specified throughtwo angles, as determined
by the Orientation Type. The satellite X axisis then constrained, via
motion in the yaw sense,toward the nadir direction. This profile is
useful for satellites inhighly elliptical orbits.
作用:选装轴任意指向
用法: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 ofspin (epoch sec)
pitch, roll, angle1,angle2, RAAN, declination - spin axis orientation angles (radians)
seq - Euler anglesequence, can be 12, 21, 31 or 32
备注:The satellite's Z axis is assumedto be the spin axis and
is fixed in inertialspace. The direction of the spin axis
is specified through twoangles, as determined by the
Orientation Type. The spinrate is specified in revolutions
per minute; positivevalues indicate rotation in a right-handed
sense with respect to thespin axis. The initial orientation of
the satellite is specifiedby using the spin offset and offset
epoch fields. The spinoffset is an angular measure of the
difference between thesatellite orientation at the offset
epoch from the orientationachieved by orienting the Z axis.
作用:姿态固定
用法:stkSetAttFixed('satPath', 'YPR',yprVec, yprSeq)
stkSetAttFixed('satPath', 'EULER', eulerVec, eulerSeq)
stkSetAttFixed('satPath', 'QUAT', quaternion)
说明:satPath - string name ofsatellite
yprVec - CBI yaw, pitch,roll vector (3x1, radians)
yprSeq - rotationsequence, a string specifying
'RPY', 'RYP','PRY', 'PYR', 'YRP' or 'YPR'
eulerVec - CBI eulerangle vector (3x1, radians)
eulerSeq - rotationsequence, an integer specifying
121, 123, 131,132, 212, 213, 231, 232,
312, 313, 321or 323
quaternion - CBIorientation quaternion, 4x1
备注:Maintains a constant orientationof the body-fixed axes
with respect to the inertial coordinatesystem. The
orientation of the body-fixed axes isspecified by three
angles or a quaternion, as determined by theOrientation Type.
作用:姿态偏移
用法:stkAttOffset('objPath', offset)
说明:objPath - Valid path, may beobtained from stkObjNames.
offset - Angular offset (radians).
Offset is applied as anAlignOffset is attitude type is:
Sun alignment withnadir constraint
Sun alignment withecliptic normal constraint
Sun alignment withECI Z axis constraint
Sunalignment-occultation normal constraint
Offset is applied as anConstraintOffset is attitude type is:
Nadir alignment withECF velocity constraint
Nadir alignment withECI velocity constraint
Nadir alignment withSun constraint
ECI velocityalignment with nadir constraint
ECF velocityalignment with radial constraint
Nadir alignment withorbit normal constraint
There is no change ifattitude type is:
Yaw to nadir
Spinning
Spin about Nadir
Spin about Sun vector
Inertially fixed
作用:设置路径点
用法: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 andmeters)
speedVec - Vector of speeds Nx1 (meters/sec)
accelVec - Vector of accelerations, Nx1 (meters/sec^2)
wpFilePath - file nameto create. Default is to
create a file in thescenario directory named
{objName}.ga, whereobjName is derived from the
objPath.
作用:载入路径点
用法:stkLoadWaypoints('objPath','fileName')
说明:objPath - Valid path, may beobtained from stkObjNames.
fileName - file name.
作用:设置起始时间
用法:stkSetGreatArcStart('gaVehPath',startTime)
说明:gaVehPath - string name of aircraft,groundVehicle or ship
startTime - time atfirst waypoint (epoch seconds)
作用:设置弹道导弹运动属性
用法: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]
作用:Position andVelocity, Central Body Fixed coordinates
用法:[pos, vel] =stkPosVelCBF('objPath', time)
说明:objPath - Vehicle or facilitypath, 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 convertedto any other system using
commands in the AerospaceToolbox. The command stkCentralBody
may be used to obtain thecentral body name of the object.
作用:Set FacilityPosition, Central Body Fixed coordinates
用法:stkSetFacPosCBF('facPath', pos)
说明:facPath - Valid facility classpath, may be obtained from stkObjNames.
pos - Central Body Fixed position (3x1, inmeters).
备注:CBF coordinates may be obtainedfrom any other system using
commands in the AerospaceToolbox.
作用:Set FacilityPosition, 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]).
备注:LLAcoordinates may be obtained from any other system using
commands in the Aerospace Toolbox.
作用:获取链路间隔Access intervals
用法:intervals = stkAccess('fromPath','toPath')
说明:fromPath, toPath - String name ofobjects obtained from stkObjNames.
intervals - Accessinterval times structure array with fields:
start - starttime of access interval
stop - stoptime of access interval
作用:Generate an object report
用法:[secData, secNames] =stkReport('objPath', 'rptStyle')
[secData, secNames] =stkReport('objPath', 'rptStyle', tStart, tStop, dT)
说明:objPath - String name of object obtained fromstkObjNames.
rptStyle - String name of existing STK report stylevalid for the object.
tStart - Start time for report (override styledefault).
tStop - Stop time for report (override styledefault).
dT - Time step of data (override style default).
secData - Cell array of report data, one cell perreport section.
secNames - Cell array of section names, one cell perreport section.
备注:Each section of an STK reportstyle is arranged into a fixed number
of rows and columns(MxN). Each cell array element ofsecData is a
1xN structure withfields:
name - the dataelement name, e.g. 'Time'
data - Mx1 matrixof element values
Use stkFindData toextract desired data elements from a report section.
Reports generated fromthis interface are unitless. This is adeparture from
STK reporting, whereusers may control the units of various dimensions. This
function returns all datain 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
作用: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 fromstkObjNames.
accObjPath - String nameof access object.
rptStyle - String name ofexisting STK report style valid for the object.
tStart - Start time forreport (override style default).
tStop - Stop time forreport (override style default).
dT - Time step of data(override style default).
secData - Cell array ofreport data, one cell per report section.
secNames - Cell array ofsection names, one cell per report section.
Each section of an STKreport style is arranged into a fixed number
of rows and columns(MxN). Each cell array element ofsecData is a
1xN structure withfields:
name - the dataelement name, e.g. 'Time'.
data - Mx1 matrixof element values
作用:Extract data from a reportsection
用法:data = stkFindData(section,'name')
说明:section - report section, fromstkReport or stkAccReport
NOTE: stkReport and stkAccReport return a
cell array ofsections, this function must
be passed asingle element of the cell.
name - name of the dataelement, e.g. 'Time'.
data - data element
备注:assume vehPath is a validsatellite object path
[secData, secNames] =stkReport(vehPath, 'Beta Angle');
time = stkFindData(secData{1},'Time');
betaAngle =stkFindData(secData{1}, 'Beta Angle');
plot(time, betaAngle);
作用:Open a Connection to STK
用法:conID = stkOpen('hostPortStr')
conID = stkOpen
说明:conID - STK/Connect handle.
hostPortStr - A string specifying the host andport for
theconnection. When not specified, the
hostPortStrwill be set to 'localhost:5001'.
作用:close an STK Connection
用法:stkClose(conID)
stkClose('ALL')
stkClose
说明:conID STK/Connect connectionID obtained from stkOpen. Omitting this parameter will close the defaultconnection.
作用:Execute an STK/Connect command
用法:rtn = stkExec(conID, 'conCmdStr')
说明:rtn - A character array containing the STK return
conID -STK/Connect connection ID, from stkOpen.
conCmdStr - Stringcontaining the Connect command
作用:Convenience routine for sendingConnect Commands to STK
用法:rtnData = stkConnect(conID, 'command','objPath', 'cmdParamString')
说明:conID - connection ID, obtainedfrom stkOpen
command - STK/Connectcommand verb, see the STK/Connect documentation
objPath - hierarchicalname of object to receive command.
The function stkObjNamesis a useful source of names.
cmdParamString - astring containing the command parameters to be
processedby STK. This argument may be ommitted.
rtnData - string matrixof data returned by STK in repsonse to the command.
作用:Get analysis epoch
用法:epoch = atbGetEpoch
说明:epoch - structure with thefollowing 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 examplecorresponds to the date 1 Jan 2000, 12:30:00.00 GMT
作用: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
timeZone - e.g. 'Z'
isDST - e.g. 0
dateStruct - see atbGetEpoch for the format of this structure
dateVec - a Matlab datevector, see DATEVEC for more help
timeZone - a singlecharacter string, the default is 'Z'
isDST - a logical flag,the default is 0 (false)
The above examplecorresponds to the date 1 Jan 2000, 12:30:00.00 GMT
备注:This function sets the absolutedate corresponding to zero epoch seconds.
Inertial coordinatesystems are referenced to a particular date.
Certain functions withinthe aeroToolbox require input of a time
in seconds to indicatethe elapsed (relative) time since the coordinate
system epoch. This function sets the coordinate systemepoch.
作用:Convert an absolute date to epochseconds
用法: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 - seeatbGetEpoch for the format of this structure
dateVec - a Matlab datevector, see DATEVEC for more help
timeZone - a singlecharacter string, the default is 'Z'
isDST - a logical flag,the default is 0 (false)
The above examplecorresponds to the date 1 Jan 2000, 12:30:00.00 GMT
备注:This function returns the offsetin epoch seconds between the current
epoch and the inputdate. When a Matlab format dateVec isprovided as
the only input, thetimeZone is assumed to be 'Z' and isDST is assumed
to be false.
作用:Convert epoch seconds to anabsolute date
用法:date =atbEpochSecToDate(epochSec)
说明:
备注:This function returns theabsolute date corresponding to an offset
in seconds from thecurrent epoch.
作用:Convert CBF coordinates to CBIcoordinates
用法: cbiPos = atbCbfToCbi('cbName', times,cbfPos)
[cbiPos, cbiVel] =atbCbfToCbi('cbName', times, cbfPos, cbfVel)
说明:cbName - Valid centralbody nam, e.g. 'Earth'
times - Length N vector of times for CBF pos andvel
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 inthe central body fixed
coordinate system to aposition and velocity in the default
central body inertialcoordinate system at the provided times.
作用:Transformation matrix from CBF toCBI
用法:T = atbCbfToCbiMtx('cbName',time)
说明:time - time in seconds
T - Coordinate transformation matrix
备注:Generates the transformationmatrix to convert a vector
in the Central BodyFixed (CBF) system to a vector in the
Central Body Inertial(CBI) system. Inputs are the central
body name and the time.
作用:Transformation matrix from CBF tolocal horizontal
用法:T = atbCbfToLhMtx('cbName', lat,long)
说明:lat - Geodetic latitude
long - Geodetic longitude
T - Coordinatetransformation matrix
备注:Generates the transformationmatrix to convert a vector
in the Central BodyFixed (CBF) system to a vector in the
local horizontal (LH)system. Inputs are the geodetic
latitude and longitudeof the reference location.
作用:Transformation from CBF togeodetic LLA
用法: llaPos = atbCbfToLla('cbName', cbfPos)
[llaPos, llaRate] =atbCbfToLla('cbName', cbfPos, cbfVel)
说明:cbName - Valid central body name
cbfPos - CBF position, 3xN
cbfVel - CBF velocity, 3xN
llaPos - geodetic lat/long/alt, 3xN
llaRate - geodeticlat/long/alt rate, 3xN
备注:Determines the geodetic latitude,longitude, and altitude
and rates given acartesian position and velocity. The
cartesian vectors mustbe expressed in the central body
fixed coordinate system.
作用:Transformation from CBF togeocentric 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 geocentriclatitude, longitude, and radius
and rates given thecartesian position and velocity. The
input cartesian vectorscan be in any coordinate system
and the output willrepresent the corresponding spherical coordinates.
作用:Transformation matrix from CBF toVVLH
用法:T = atbCbfToVvlhMtx(cbfPos,cbfVel)
说明:cbfPos - CBF position vector, 3x1
cbfVel - CBFvelocity vector, 3x1
T - Coordinate transformation matrix, 3x3
备注:Generates the transformationmatrix to convert a vector
in the input cartesiansystem to a vector in the Vehicle
Velocity LocalHorizontal (VVLH) system. Inputs are the
cartesian coordinatevector and velocity vector of the
vehicle. The VVLH local horizontal definition is based
on a spherical centralbody model.
作用:Convert CBI coordinates to CBFcoordinates
用法: 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 andvel
cbiPos - 3xN matrix of CBI positions
cbiVel - 3xN matrix of CBI velocities
cbfPos - 3xN matrix of CBF positions
cbfVel - 3xN matrix of CBF velocities
备注:Converts position and velocityvectors in the default
central body inertialcoordinate system to a position
and velocity in thecentral body fixed coordinate system
at the provided time.
作用:Convert CBI coordinates toanother 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 positionand velocity relative to the
"to" centralbody of an object whose inertial position and
velocity have beenspecified relative to the "from" central
body. This computation therefore accounts for boththe
difference in positionof the central bodies and the difference
in the orientations oftheir default inertial coordinate systems.
作用:Transformation matrix from CBI toanother CBI system
用法:T = atbCbiToCbiMtx('fromCB','toCB')
说明:T - Coordinate transformation matrix
备注:Generates the transformationmatrix to convert a vector
in one Central BodyFixed (CBF) system to a vector in
another Central BodyInertial (CBI) system. Inputs are the
two central body names
作用:Transformation from geodetic LLAto CBF
用法: cbfPos = atbLlaToCbf('cbName', llaPos)
[cbfPos, cbfVel] = atbLlaToCbf('cbName', llaPos,llaRate)
说明:cbName - Valid central body name
llaPos - Geodetic lat/long/alt, 3xN
llaRate - Geodeticlat/long/alt rate, 3xN
cbfPos - CBF position, 3xN
cbfVel - CBF velocity, 3xN
备注:Converts the geodetic latitude,longitude, and altitude
and rates to a cartesianposition and velocity. The
cartesian vectors willbe expressed in the central body
fixed coordinate system.
作用:Transformation from geocentricLLR to CBF
用法: cbfPos = atbLlrToCbf(llrPos)
[cbfPos, cbfVel] = atbLlrToCbf(llrPos,llrRate)
说明:llrPos - Geodetic lat/long/radius, 3xN
llrRate - Geodeticlat/long/radius rate, 3xN
cbfPos - CBF position, 3xN
cbfVel - CBF velocity, 3xN
备注:Converts the geocentric latitude,longitude, and radius
and rates to a cartesianposition and velocity. The
cartesian vectors will be expressed in thecentral body
fixed coordinate system.
作用:Coordinate system namesassociated with a central body
用法:[names, descrips]=atbCbCoordinates('cb')
说明:cb - central body name
names - cell array ofcoordinate system names
descrips - cell array ofcoordinate system descriptions
备注:This function outputs thepossible coordinate systems which may
be converted betweenusing atbCoordXForm and atbCoordXFormMtx
作用:General coordinate systemtransformation
用法:[ToPos, ToVel]=atbCoordXForm(time, 'FromCb', 'FromSystemName', FromEpoch,...
'ToCb', 'ToSystemName', ToEpoch,...
FromPos, FromVel)
说明:time - time offset from epoch inseconds of the FromPos and FromVel
Cb - central body names
SystemName - validcoordinate system name, obtained via atbCbCoordinates
Epoch - epochs for coordinatesystems, may be ignored (see below)
Pos - 3x1 positionvector (meters)
Vel - 3x1 velocityvector (meters) (optional)
备注:This function converts from onecoordinate system of one
central body to anothersystem of another central body.
Some coordinate systems require an epoch tofully define them,
in these cases, theEpoch inputs will be used, otherwise the
Epoch inputs will beignored. For example, the J2000 epoch is
intrinsic to thedefinition of the coordinate system and therefore
any input epoch will beignored. The various ...OfEpochcoordinate
systems are examples ofsystems that need an epoch.
作用:General coordinate systemtransformation
用法:[TfmMtx, AngVelSysName, AngVel]= atbCoordXFormMtx('cb','FromSystemName', FromEpoch,'ToSystemName', ToEpoch)
说明:cb - central body name
SystemName - validcoordinate system name, obtained via atbCbCoordinates
Epoch - epochs forcoordinate systems, may be ignored (see below)
TfmMtx - transformationmatrix
AngVelSysName- name of the coordinate system in which the angular velocity is defined(optional)
AngVel - angularvelocity of the two systems (3x1) (optional)
备注:This function generates therotation matrix from one coordinate system
of a central body toanother system of the same central body.
Some coordinate systemsrequire an epoch to fully define them,
in these cases, theEpoch inputs will be used, otherwise the
Epoch inputs will beignored. For example, the J2000 epoch is
intrinsic to thedefinition of the coordinate system and therefore
any input epoch will beignored. The various ...Of Epochcoordinate
systems are examples ofsystems that need an epoch.
作用:Quaternion for coordinate systemtransformation
用法:rotQuat = atbAlignVecQuat(vec1A, vec1B)
rotQuat =atbAlignVecQuat(vec1A, vec1B,vec2A, vec3B)
说明:vec1A - a 3x1vector 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 systemA to coordinate system B where the vector 1 is known in both coordinate systems.Vectors 2A and 3B areused (if supplied) to resolve the ambiguity about the vector 1 direction. Afterthe alignment of vector 1 is achieved, the components of vectors 2A and 3B which are perpendicular to vector 1are aligned. An example of this type of application would be to point a sensorboresight at a target while maintaining the minimum possible angle between thesun vector and the solar panels on the satellite. None of the vectors need tobe unit vectors.
作用:Generate rotation matrix fromEuler angles
用法:cosMtx = atbEulerToMtx(angles,sequence)
说明:angles - 3x1 vector of Euler angles
sequence - 3 digit integer defining the order ofrotation.
(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 relationshipto transform from the reference coordinate system to the new coordinate system.
作用:Generate quaternion from Eulerangles
用法:quat = atbEulerToQuat(angles,sequence)
说明:angles - 3x1 vector of Euler angles
sequence - 3 digit integer defining the order ofrotation.
(1-X, 2-Y, 3-Z). A common Eulerangle is 313.
quat - 4x1 quaternion representingrotation
备注:Computes a rotation quaternionfrom a set of Euler angles.
作用:Minimum Rotation Quaternion
用法:quat = atbMinRotQuat(vec1, vec2)
说明:vec1, vec2 - 3x1 position vectors
quat - 4x1 rotation quaternion
备注:Computes a quaternion to performthe 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 system1to system2 transformation.
作用: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 - 3x1vector of Euler angles
作用:Cosine matrix to quaternionconversion
用法:quat = atbMtxToQuat(cosMtx)
说明:cosMtx - 3x3 directional cosine matrix
quat -4x1 quaternion vector
作用:Cosine matrix to Yaw-Pitch-Roll
用法:yprVec = atbMtxToYpr(cosMtx,sequence)
说明:cosMtx - 3x3direction cosine matrix
sequence -3 digit integer defining the rotation order
yprVec - YPR angles, 3x1
作用:Quaternion to Matrix conversion
用法:cosMtx = atbQuatToMtx(quat)
说明:quat - 4x1 quaternion
cosMtx - 3x3 directional cosine matrix
作用:Quaternion multiplication
用法:quatC = atbQuatXquat(quatA,quatB)
说明:quatA,quatB - input 4x1quaternions
quatC - 4x1 quaternion product
备注:Computes the resultant quaternion due to the combination of the twoinput quaternions. The input quaternionsmay be thought of as representing two different rotations. The resulting quaternion represents the newrotation which is equivalent to performing the rotation of quaternion2 followedby the rotation of quaternion1. The order of the input quaternions is designedto resemble the way the rotations would appear on paper if you were writing outan equation. To rotate vector one through two rotations to produce vector 2,you would write V2 = Q1 Q2 V1. Theresulting quaternion will have unit length.
作用: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
sequencewould be 321.
cosMtx - 3x3 directional cosine matrix
备注:Builds a direction cosine matrixfrom yaw, pitch and roll
angles. The sequence variable is used to specify theorder
of the rotations(1-Roll, 2-Pitch, 3-Yaw). AYaw-Pitch-Roll
sequence would be 321.
作用: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
sequencewould be 321.
quat - 4x1 quaternion
备注:Builds a quaternion from yaw,pitch and roll angles. The
sequence variable isused to specify the order of the
rotations (1-Roll,2-Pitch, 3-Yaw). A Yaw-Pitch-Roll
sequence would be 321.
作用:Interpolate Quaternion
用法:interpQuat =atbInterpQuat(startQuat, endQuat, interpParam)
interpQuat =atbInterpQuat(startQuat, endQuat, interpParam, extraRot)
说明:startQuat - 4x1 quaternion
endQuat - 4x1 quaternion
interpParam - scalarinterp factor. 0 < interpParam < 1
extraRot - extra rotations.
interpQuat - 4x1 quaternion
备注:Interpolates two quaternionsassuming a constant rate of rotation
about a constant spin axis between the two endorientations.
作用:Generate central bodyposition/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 matricesof inertial pos/vel data
备注:This function computes theposition and velocity of the central
body in the defaultinertial coordinate system at the
specified time. The default inertial coordinate system
has its origin at thesolar system barycenter and axes that are
aligned with the J2000coordinate system.
作用:Tangent points on central body
用法:tanPts =atbCbGetTangent('cbName', posVec, normVec)
说明:cbName - Valid central body name, e.g. 'Earth'
posVec - 3x1 vector, CBF position
normVec - 3x1 vector,CBF normal direction
tanPts - 3x2 matrix, CBF points of tangency
备注:Computes vectors to the twotangent points on the
surface of the centralbody given a position vector specifying
a location outside ofthe central body and a normal vector.
The normal vector mustbe perpendicular to the position vector
and the two outputvectors will lie in the plane defined by the
normal vector. All vectors are expressed in central bodyfixed
coordinates.
作用:Gravitational Parameter
用法:[gm, refDist, J2, J4] =atbCbGravParam('cbName')
说明:cbName - Valid central body name, e.g. 'Earth'
gm - gravitational parameter (meters^3 /sec^2)
refDistance - equatorialradius (meters)
J2 - zonal harmonic parameter (unitless)
J4 - zonal harmonic parameter (unitless)
作用: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 inthe central body fixed
coordinate system. The function returns the minimum
altitude along the lineof sight between the two locations.
The CBF vector to theminimum altitude point is optionally computed.
An indication of whetheror not the minimum altitude point
is between the endpoints--as opposed to at an end point--
is provided if the isBetweenoutput is specified.
作用:Grazing angle
用法:angle = atbCbGrazeAngle('cbName',fromVec, toVec)
备注:The input vectors are given inthe central body fixed coordinate
system. The function returns the angle between theline of sight
vector and the closesttangent to the surface of the central body
which is coplanar withthe two input vectors. The sign of this
angle should be positiveif the line of sight does not intersect
the central body andnegative otherwise.
作用: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 bodyintercept points, CBF 3x1.
mult* - Multiplier to scale dirVec by to yield theintersections
备注:This function returns True if thevector specified by the
direction argument willintersect the central body and False
otherwise. The origin of the direction vector isspecified
by the positionvector. The optional vectors intx1 andintx2
are points ofintersection with the central body. Theoptional
outputs mult1 and mult2represent scalars by which the direction
vector is multiplied andthen added to the position vector to
yield the intersectionpoints. The multipliers may be positive
or negative depending onif the intersections occur in the
positive or negativedirection.
作用: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 radiusof the central body
at the input geocentriclatitude and longitude. The
term geoocentric impliesthat the latitude and longitude
are measured based onthe vector from the origin of the central body.
作用: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 radiusof the central body
at the input geodeticlatitude and longitude. The term
geodetic implies thatthe latitude and longitude are
measured from a vectornormal to the surface of the central body.
作用:Surface path length, geocentricbasis
用法:dist = atbCbSurfDistCen('cbName',lat1, long1, lat2, long2)
说明:cbName - Valid central body name, e.g. 'Earth'
lat1, long1 - Latitudeand longitude of first location
lat2, long2 - Latitudeand longitude of second location
dist - Distance across the surface of thecentral body
备注:This function returns thedistance between two locations on
the surface of thecentral body as specified by the input
geocentric latitude andlongitude. The term geocentric implies
that the latitude andlongitude are measured based on the
vector from the originof the central body.
作用:Surface path length, geodeticbasis
用法:dist = atbCbSurfDistDet('cbName',lat1, long1, lat2, long2)
说明:cbName - Valid central body name, e.g. 'Earth'
lat1, long1 - Latitudeand longitude of first location
lat2, long2 - Latitudeand longitude of second location
dist - Distance across the surface of thecentral body
备注:This function returns thedistance between two locations on
the surface of thecentral body as specified by the input
geodetic latitude andlongitude. The term geodetic implies
that the latitude andlongitude are measured from a vector
normal to the surface ofthe central body.
作用:Surface normal, geocentric basis
用法:normal =atbCbSurfNormCen('cbName', lat, long)
说明:cbName - Valid central body name, e.g. 'Earth'
lat - Latitude
long - Longitude
normal - 3x1 CBF vector representing the normal atthe lat/long
备注:This function computes a vectorwhich is normal to the surface
of the central body atthe specified geocentric latitude and
longitude. The term geocentric implies that the latitudeand
longitude are measuredbased on the vector from the origin of
the central body.
作用:Surface normal, geodetic basis
用法:normal =atbCbSurfNormDet('cbName', lat, long)
说明:cbName - Valid central body name, e.g. 'Earth'
lat - Latitude
long - Longitude
normal - 3x1 CBF vector representing the normal atthe lat/long
备注:This function computes a vectorwhich is normal to the surface
of the central body atthe specified geodetic latitude and
longitude. The term geodetic implies that the latitudeand
longitude are measuredbased on the vector normal to the
surface of the centralbody.
作用:read an STK external Attitudefile
用法:[time, quats, epoch, cb] =atbReadAttitudeCBF('fileName')
说明:fileName - valid filename ofAttitude file
time - scenario time,1xN (sec)
quats - attitudequaternions, CBF to Body, 4xN
epoch - date string ofepoch, will be empty if not specified in file
cb - central body name,will be empty if not specified in file
作用:read an STK external Attitudefile
用法:[time, quats, epoch, cb] =atbReadAttitudeCBF('fileName')
说明:同上
作用:write an STK external attitudefile in CBF format
用法:atbWriteAttitudeCBF('fileName',timeVec, quatMat, 'epoch', 'cb')
说明:fileName - String file name, willbe overwritten if already exists
timeVec - Length N vector of times
quatMat - Matrix of CBF to body quaternions, 4xN
epoch - epoch of data, date string
cb - central body name
作用:write an STK external attitudefile in CBI format
用法:atbWriteAttitudeCBI('fileName',timeVec, quatMat, 'epoch', 'cb')
说明:fileName - String file name, willbe overwritten if already exists
timeVec - Length N vector of times
quatMat - Matrix of CBI-to-body quaternions, 4xN
epoch - epoch of data, date string
cb - central body name
作用:read an STK external ephemerisfile
用法:[time, pos, vel, epoch, cb] =atbReadEphemerisCBF('fileName')
说明:fileName - valid filename ofephemeris file
time - scenario time,1xN (sec)
pos - CBF positionmatrix, 3xN (meters)
vel - CBF velocity matrix, 3xN (meters/sec)
epoch - date string ofepoch, will be empty if not specified in file
cb - central body name,will be empty if not specified in file
作用:read an STK external ephemerisfile
用法:[time, pos, vel, epoch, cb] =atbReadEphemerisCBI('fileName')
说明:fileName - valid filename ofephemeris file
time - scenario time,1xN (sec)
pos - CBI positionmatrix, 3xN (meters)
vel - CBI velocitymatrix, 3xN (meters/sec)
epoch - date string ofepoch, will be empty if not specified in file
cb - central body name,will be empty if not specified in file
作用:write an STK external ephemerisfile in CBF format
用法:atbWriteEphemerisCBF('fileName',timeVec, posMat, velMat, 'epoch', 'cb')
说明:fileName - String file name, willbe overwritten if already exists
timeVec - Length N vector of times
posMat - Matrix of CBF positions, 3xN
velMat - Matrix of CBF velocities, 3xN
epoch - epoch of data, date string
cb - central body name
作用:write an STK external ephemerisfile in CBI format
用法:atbWriteEphemerisCBI('fileName',timeVec, posMat, velMat, 'epoch', 'cb')
说明:fileName - String file name, willbe overwritten if already exists
timeVec - Length N vector of times
posMat - Matrix of CBI positions, 3xN
velMat - Matrix of CBI velocities, 3xN
epoch - epoch of data, date string
cb - central body name
作用:write an STK waypoint file
用法:atbWriteWaypointFile('fileName','startTime', llaMat, speedVec, accelVec)
atbWriteWaypointFile('fileName', 'startTime', llaMat, speedVec)
说明:fileName - String file name, willbe overwritten if already exists
startTime - start time date string. See stkEpoch for valid formats.
llaMat - Matrix of LLA positions, 3xN, (radians andmeters)
speedVec - Vector of speeds Nx1 (meters/sec)
accelVec - Vector of accelerations, Nx1 (meters/sec^2)
作用:compute absolute and relativegeometry
用法: geom = atbGeometry(times, dynState)
[fromGeom, toGeom] = atbGeometry(times,fromDynState, toDynState)
说明:times - times to compute state
dynState - raw dynamic data generated by STKpropagators.
geom -array of currentData structures corresponding
toeach time.
备注:atbGeometry calculates absoluteand relative state
data for a single objector a pair of objects.
A dynState structurecontains a full description of
a vehicle's position,velocity and attitude over
the vehicle's lifetime.
atbGeometry interpolatesthe data in the dynState
structure for the timesgiven.
When two dynStates arepassed, relative geometry is
calculated in addition toabsolute geometry.
If a time is requestedthat is outside the time
interval of the dynState,geometry with each
field set to zero isreturned at the array index
corresponding to theinvalid time.
Users should test for azero'd currentData state
structure prior to usingit.
The currentData structurehas the following fields:
time in seconds from propagator epoch
pos in CBF cartesian coordinate (meters)
vel in CBF cartesian coordinates (m/s)
relPos in CBF cartesian coordinates (meters)
empty whencomputing absolute geometry only
relVel in CBF cartesian coordinates (m/s)
empty whencomputing absolute geometry only
range in meters
timeDelay in seconds
cbfToBody transfomation matrix from CBF to
object bodyframe
cb central body name, i.e. 'Earth'
isDir whether to position vectors represent
a directionas opposed to an
absoluteposition (Stars use this)
The atbFlatten command may beused to easily extract a given
field of a geometry structurearray.
SEE ALSO atbFlatten
EXAMPLE
Assume the user has generated two aircraft, ac1 and ac2 withoverlapping time intervals.
try the following commands:
minTime =max([min(ac1.dynState.times) min(ac2.dynState.times)]);
maxTime = min([max(ac1.dynState.times)max(ac2.dynState.times)]);
times = linspace(minTime,maxTime);
geom = atbGeometry(times,ac1.dynState, ac2.dynState);
pos =atbFlatten(geom,'pos');
lla =atbCbfToLla(geom(1).cb, pos);
lat = lla(1,:);
long = lla(2,:);
plot(long*180/pi,lat*180/pi, '+');
vel = atbFlatten(geom,'vel');
relPosCBF =atbFlatten(geom, 'relPos');
len = max(size(geom));
az = zeros(1, len);
el = zeros(1, len);
for k=1:len
relPosVVLH =atbCbfToVvlhMtx(pos(:,k), vel(:,k)) ...
*relPosCBF(:,k);
az(k) =atan2(-relPosVVLH(2), relPosVVLH(1));
el(k) = pi/2 -acos(relPosVVLH(3)/norm(relPosVVLH));
end
figure;
plot(az*180/pi,el*180/pi, '+');
作用:compute great arc route
用法:llaPos = atbGenGreatArc('cb',fromLLA, toLLA, angRes)
说明:cb - central bodyname
fromLLA - 3x1 LLA vector [rad;rad;meters].
toLLA - 3x1 LLA vector [rad;rad;meters].
angRes - angular resolution (rad)
llaPos - 3xN LLA vector of intermediate points
作用:Create a dynState structure fromCBF data elements
用法:dynState = atbCreateDynStateCBF('cb', posVelTimes, cbfPos, cbfVel,quatTimes, cbfQuat, angVel)
dynState = atbCreateDynStateCBF('cb',posVelTimes, cbfPos, cbfVel, quatTimes, cbfQuat)
说明:cb - valid central body name,i.e. 'earth'
posVelTimes - 1xN lengthtime array for pos and vel data
cbfPos - 3xN CBF position array [x;y;z] (meters)
cbfVel - 3xN CBF velocity array [vx;vy;vz](m/sec)
quatTimes - 1xM time array for attitude data
cbfQuat - 4xM attitude quaternion arrayrepresenting the rotation
from theCBF frame to the objects body axes frame
angVel - optional 3xM angular velocity arrayrepresenting the rotation rate
around eachbody frame axis [rx;ry;rz] (rad/sec). The default is
fornon-rotating objects in which case geometry calculations
willinterpolate the quaternions.
作用:Create a dynState structure fromCBI data elements
用法:dynState = atbCreateDynStateCBI('cb', posVelTimes, cbiPos, cbiVel,quatTimes, cbiQuat, angVel)
dynState = atbCreateDynStateCBI('cb',posVelTimes, cbiPos, cbiVel, quatTimes, cbiQuat)
说明:cb - valid central body name,i.e. 'earth'
posVelTimes - 1xN lengthtime array for pos and vel data
cbiPos - 3xN CBI position array [x;y;z] (meters)
cbiVel - 3xN CBI velocity array [vx;vy;vz](m/sec)
quatTimes - 1xM time array for attitude data
cbiQuat - 4xM attitude quaternion arrayrepresenting the rotation
from theCBI frame to the objects body axes frame
angVel - optional 3xM angular velocity array representing the rotation rate
around eachbody frame axis [rx;ry;rz] (rad/sec). The default is
fornon-rotating objects in which case geometry calculations
will interpolate the quaternions.
作用:Compute a local horizontalcoordinate frame, geocentric version
用法:quats = atbLhQuatCen(cbPos)
quats =atbLhQuatCen(cbPos, cbVel)
说明:cbPos - 3xN array of positionvectors [x;y;z] (meters)
cbVel - optional 3xNvelocity array [vx.vy;vz] (m/s).
Specification ofthis parameter will generate
a coordinatesystem with the X axis aligned with
the velocityvector. The default is to generate
a body frame with its X axis parallel to the
central bodyequator and its Y axis pointing
to the centralbody north pole.
quats - rotation matrixfrom CB coordinates into a body
frame with its XYplane perpendicular to the
CB positionvector.
作用:Compute a local horizontalcoordinate frame, geodetic version
用法:quats = atbLhQuatCBFDet('cbName',cbfPos)
quats =atbLhQuatCBFDet('cbName', cbfPos, cbfVel)
说明:cbName - valid central body name,e.g. 'earth'
cbfPos - 3xN array ofCBF position vectors [x;y;z] (meters)
cbfVel - optional 3xNCBF velocity array [vx.vy;vz] (m/s).
Specification ofthis parameter will generate
a coordinatesystem with the X axis aligned with
the velocityvector. The default is to generate
a body frame withits X axis parallel to the
central bodyequator and its Y axis pointing
to the centralbody north pole.
quats - rotation matrix from CBF coordinates into abody
framewith its XY plane tangent to the central
bodysurface.
作用:Flatten a multidimensionalstructure's field
用法:v = atbFlatten(s, 'field')
[v, fs] =atbFlatten(s, 'field')
说明:s - multidimension structure of length m
field - a fieldname of swith length n
v - flatten'd matrix of size m x n, the rows
of whichrepresent each field of s
fs - the size of each field. n = fs(1) * fs(2).
useful when thefield is a matrix.
Every field must have thesame length.
作用:将直角坐标下的位置速度转换成两行(Delaunay)根数
用法:delElems = atbOrbCartToDel(pos,vel, gravParam)
说明:pos -inertial cartesian position vector, 3x1, meters
vel - inertial cartesian velocity vector,3x1, meters/sec
gravParam - scalargravitational paramter, see atbCbGravParam
delElems - Delaunayorbit element set structure
This structurehas the following fields:
H - zcomponent of angular momentum
G - angularmomentum
L - sqrt(mu* a)
h - rightascension of ascending node (rad)
g - argument of perigree (rad)
l - meananomaly (rad)
备注:This function errors when themagnitude of eccenVec > 1, where
eccenVec = c1*pos -c2*vel
c1 = norm(vel)^2 /gravParam - 1/norm(pos)
c2 = dot(pos, vel) / gravParam
作用:将直角坐标下的位置速度转换成春分(equinoctial)根数
用法:equiElems = atbOrbCartToEqui(pos,vel, gravParam)
说明:pos -inertial cartesian position vector, 3x1, meters
vel - inertial cartesian velocity vector,3x1, meters/sec
gravParam - scalargravitational paramter, see atbCbGravParam
equiElems - equinoctialorbit element set structure
This structurehas the following fields:
a -semimajor axis length (meters)
h - e *sin(omegaBar) (unitless)
k - e *cos(omegaBar) (unitless)
p -tan(i/2) * sin(raan) (unitless)
q -tan(i/2) * cos(raan) (unitless)
lambda -mean longitude (rad)
isPosigrade - alternative is retrograde
Where:
e - orbiteccentricity
i - orbitinclination
raan -right ascension of ascending node
omegaBar -argument of perigree + raan for posigrade or
argument of perigree - raan for retrograde
备注:This function will generate anerror if:
2.0 / norm(pos) -norm(vel)^2 / gravParam < 0
作用:将直角坐标下的位置速度转换成修正(modified)根数
用法:modElems = atbOrbCartToMod(pos,vel, gravParam)
说明:pos -inertial cartesian position vector, 3x1, meters
vel - inertial cartesian velocity vector,3x1, meters/sec
gravParam - scalargravitational paramter, see atbCbGravParam
modElems - modifiedorbit element set structure
This structurehas the following fields:
rp -periapsis radius (meters)
e -eccentricity (unitless)
i -inclination (rad)
raan -right ascension of ascending node (rad)
ap -argument of periapsis (rad)
ta - trueanomaly (rad)
作用:将直角坐标下的位置速度转换成球形(spherical)根数
用法:sphereElems =atbOrbCartToSphere(pos, vel)
说明:pos -inertial cartesian position vector, 3x1, meters
vel - inertial cartesian velocity vector,3x1, meters/sec
sphereElems - sphericalorbit element set structure
Thisstructure has the following fields:
ra -right ascension (rad)
dec - declination (rad)
r -radius (meters)
fpa -horizontal flight path angle (rad)
az -flight path aximuth (rad)
v -speed (meters/sec)
作用:将直角坐标下的位置速度转换成混合球形(mixed spherical)根数
用法:mixedElems =atbOrbCartToMixedSphere('cb', time, pos, vel)
说明:cb -central body name, e.g. 'Earth'
time - coordinate time (seconds)
pos -inertial cartesian position vector, 3x1, meters
vel - inertial cartesian velocity vector,3x1, meters/sec
mixedElems - mixedspherical orbit element set structure
This structure has the following fields:
lon -longitude (rad)
lat -latitude (rad)
alt - altitude (meters)
fpa -horizontal flight path angle (rad)
az -flight path aximuth (rad)
v -speed (meters/sec)
作用:将两行(Delaunay)根数根数转换成直角坐标下的位置速度
用法:[pos, vel] =atbOrbDelToCart(delElems, gravParam)
作用:将春分(equinoctial)根数根数转换成直角坐标下的位置速度
用法:[pos, vel] =atbOrbEquiToCart(equiElems, gravParam)
作用:将两行(Delaunay)根数根数转换成直角坐标下的位置速度
用法:[pos, vel] =atbOrbDelToCart(delElems, gravParam)
作用:将两行(Delaunay)根数根数转换成直角坐标下的位置速度
用法:[pos, vel] =atbOrbDelToCart(delElems, gravParam)
作用:将两行(Delaunay)根数根数转换成直角坐标下的位置速度
用法:[pos, vel] =atbOrbDelToCart(delElems, gravParam)
作用:偏近点角E转换为真近点角f
用法:trueAnom =atbOrbEccToTrue(eccAnom, eccentricity)
说明:eccAnom - eccentric anomaly (rad)
eccentricity - unitless
trueAnom - true anomaly(rad)
作用:真近点角f转换为偏近点角E
用法:eccAnom =atbOrbTrueToEcc(trueAnom, eccentricity)
说明:trueAnom - true anomaly (rad)
eccentricity - unitless
eccAnom - eccentricanomaly (rad)
作用:平近点角M转换为真近点角f
用法:trueAnom =atbOrbMeanToTrue(meanAnom, eccentricity)
说明:meanAnom - mean anomaly (rad)
eccentricity - unitless
trueAnom - true anomaly(rad)
作用:真近点角f转换为平近点角M
用法:meanAnom =atbOrbTrueToMean(trueAnom, eccentricity)
说明:trueAnom - true anomaly (rad)
eccentricity - unitless
meanAnom - mean anomaly(rad)
作用:升交点经度(地理)转化为升交点赤经(天球)
用法:raan = atbOrbLanToRaan('cbName',lan, curTime, tpan)
说明:cbName - valid central body name,e.g. 'Earth'
lan - longitude of ascending node (rad)
curTime - current time(sec)
tpan - time pastascending node (sec)
raan - right ascensionof ascending node (rad)
作用:升交点赤经(天球)转化为升交点经度(地理)
用法:lan = atbOrbRaanToLan('cbName',raan, curTime, tpan)
说明:cbName - valid central body name,e.g. 'Earth'
raan - right ascensionof ascending node (rad)
curTime - current time(sec)
tpan - time pastascending node (sec)
lan - longitude ofascending node (rad)
作用:近地点向径转化为轨道周期
用法:period = atbOrbPeriRadToPeriod(perigreeRad,eccentricity, gm)
说明:perigreeRad - perigree radius(meters)
eccentricity - unitless
gm - gravitationalparameter, see atbCbGravParam
period - orbit period(sec)
作用:轨道周期转化为近地点向径
用法:perigreeRad =atbOrbPeriodToPeriRad(period, eccentricity, gm)
说明:perigreeRad - perigree radius(meters)
eccentricity - unitless
gm - gravitationalparameter, see atbCbGravParam
period - orbit period(sec)
作用:近地点向径转化为轨道半长轴
用法:semimajorAxis =atbOrbPeriRadToSMajAxis(perigreeRad, eccentricity)
说明:perigreeRad - perigree radius(meters)
eccentricity - unitless
semimajorAxis -semimajor axis length (meters)
作用:轨道半长轴转化为近地点向径
用法:perigreeRad =atbOrbSMajAxisToPeriRad(semimajorAxis, eccentricity)
说明:perigreeRad - perigree radius(meters)
eccentricity - unitless
semimajorAxis -semimajor axis length (meters)
作用:过升角点时转化为真近点角
用法:trueAnom = atbOrbTPANToTrue(tpan,argOfPerigree, sma, eccentricity, gm)
说明:tpan - time past ascending node(sec)
argOfPerigree - argumentof perigree (rad)
sma - semimajor axislength (meters)
eccentricity - unitless
gm - gravitationalparameter, see atbCbGravParam
trueAnom - true anomaly(rad)
作用:真近点角转化为将过升角点时
用法:tpan = atbOrbTrueToTPAN(trueAnom,argOfPerigree, sma, eccentricity, gm)
说明:tpan - time past ascending node(sec)
argOfPerigree - argumentof perigree (rad)
sma - semimajor axislength (meters)
eccentricity - unitless
gm - gravitationalparameter, see atbCbGravParam
trueAnom - true anomaly(rad)
作用:过近地点时转化为真近点角
用法:trueAnom = atbOrbTPPToTrue(tpp,sma, eccentricity, gm)
说明:tpp - time past perigree (sec)
sma - semimajor axislength (meters)
eccentricity - unitless
gm - gravitationalparameter, see atbCbGravParam
trueAnom - true anomaly(rad)
作用:过近地点转化为时真近点角
用法:tpp = atbOrbTrueToTPP(trueAnom,sma, eccentricity, gm)
说明:tpp - time past perigree (sec)
sma - semimajor axislength (meters)
eccentricity - unitless
gm - gravitationalparameter, see atbCbGravParam
trueAnom - true anomaly(rad)
作用:列出中心体的所有数据类型
用法:typeInfo =atbCbListDtedTypes('cb')
说明:cb - central bodyname
typeInfo - structure array with following fields:
id - terraintype string, possible values are:
MRAS
NIMADMED
NIMAFILE
MTOP
DEM
XTRA
MOLA
CONVERTEDMOLA
provider
formalName
fileSuffix
作用:列出中心体的所有数据源
用法:[sources, rect] =atbCbListDted('cb')
说明:cb - central bodyname
sources - cell array of source file names
rect - matrix of boundarys [minLon maxLonminLat maxLat] for each source (rad)
作用:给中心体增加DTED
用法:atbCbAddDtedSource('cb', 'type','filePath')
说明:cb - central bodyname
type - valid terrain file type, choices are:
MRAS
NIMADMED
NIMAFILE
MTOP
DEM
XTRA
MOLA
CONVERTEDMOLA
filePath - full file path
作用:用一个GUI管理地球DTED
用法:atbCbDtedSourceUI
备注:Associates terrain files withEarth.
作用:递归加载压缩包中所有的NIMA DTED
用法:atbLoadNimaDted(rootFolder,wildcard)
说明:rootFolder - string name of theroot folder to recurse
wildcard - optional filename filter, default is '*.dt*'
作用:删除中心体的DTED
用法:atbCbRemDtedSource('cb','fileName')
说明:cb - central bodyname
fileName - a string or cell array of strings
use thestring 'ALL' to remove all files
useatbCbListDted to obtain an array of loaded files
作用:获取周围地形数据
用法:sources =atbCbGetDtedSourceForPos('cbName', lat, lon)
说明:cbName - valid central body name,e.g. 'earth'
lat - geodetic latitude(radians)
lon - geodetic longitude(radians)
sources - cell array ofterrain sources with boundaries encompassing lat/lon
作用:获取DTED的句柄
用法:h = atbGetDtedPatch('cb', minLon,maxLon, minLat, maxLat)
h =atbGetDtedPatch('cb', rect)
说明:cb - central bodyname
minLon - minimum longitude of bounding box (rad).
maxLon - maximum longitude of bounding box (rad).
minLat -minimum latitude of bounding box (rad).
maxLat - maximum latitude of bounding box (rad).
rect -1x4 array [minLon maxLon minLat maxLat] (rad).
h - handle to the terrain patch.
use atbClearDtedPatch to clear the patch frommemory.
作用:清除DTED的句柄
用法:atbClearDtedPatch(h)
说明:h - terrain patch handle obtained fromatbGetDtedPatch
作用:获取当前DTED的句柄
用法:hVec = atbAllDtedPatches
说明:hVec - terrain patch handles
作用:获取DTED句柄中的信息
用法:[rect, res] = atbDtedPatchInfo(h)
说明:h - terrain patch handle(s)
rect - matrix of boundarys [minLon maxLonminLat maxLat] for each handle
res - resolution of each handle [longReslatRes] (rad)
作用:获取中心体DTED的高度
用法:altMN = atbDtedElev('cbName', lat, lon)
altN = atbDtedElev('cbName', latLon)
说明:cbName - valid central body name
lat - MxN latitude array (rad)
lon - MxN longitude array (rad)
latLon -2xN lat and lon array [lat;lon] (rad)
altMN - MxN altitude (meters)
altN - 1xN altitude vector (meters)
作用:获取句柄DTED的高度
用法:altMN = atbDtedPatchElev(h, lat, lon)
altN = atbDtedPatchElev(h, latLon)
说明:h - terrain patch handle obtianed fromatbGetDtedPatch
lat - MxN latitude array (rad)
lon - MxN longitude array (rad)
latLon - 2xN lat and lon array [lat;lon] (rad)
altMN - MxN altitude (meters)
altN - 1xN altitude vector (meters)
作用:compute an az/el mask
用法:[az, maxEl, riseEl, riseDist] =atbAzElMask('cb', posLLA, NAz)
说明:cb -central body name
posLLA - 3x1 LLA observer position vector[rad;rad;meters].
NAz - number of azimuth points
az - NAz x 1 vector of azimuths (rad)
maxEl - NAz x 1 vector of maximum elevationsalong az (rad)
risEl - NAz x 1 cell array of intermediateelevations along az (rad)
作用:get DTED resolution
用法:res = atbDtedRes('cb', lat, lon)
说明:cb -central body name
lat - latitude (rad)
lon - longitude (rad)
res - resolution of DTED data at lat/lon (rad)
作用:compute existence of line ofsight between two points
用法:losAngle = atbDtedLOSExist('cb',fromLLA, toLLA)
说明:cb - central bodyname
fromLLA - 3x1 LLA vector [rad;rad;meters].
toLLA - 3x1 LLA vector [rad;rad;meters].
losAngle - angle between the maximum terrainelevation point
between thepoints and the direct line of sight
between thepoints. A positive number indicates the
terrain does notobstruct the line of sight.
作用:Lambert targeting algorithm -fixed time
用法:startVel =atbLambertFixedTime(startPos, finalPos, gm, deltaTime)
说明:startPos - 3x1 starting position [x;y;z] (meters)
finalPos - 3x1 final position [x;y;z] (meters)
gm - gravitational parameter (meters^3 /sec^2)
deltaTime - time to movefrom start to final pos
startVel - 3x1 starting velocity vector [vx;vy;vz](m/s)
备注:Computes the Lambert targetingalgorithm to design a two-body
trajectory between theinitial and final positions.
作用:Lambert targeting algorithm -minimum energy
用法:[startVel, deltaTime] =atbLambertMinEnergy(startPos, finalPos, gm)
[startVel, deltaTime] =atbLambertMinEnergy(startPos, finalPos, gm, longWayFlag)
说明:startPos - 3x1 starting position [x;y;z] (meters)
finalPos - 3x1 final position [x;y;z] (meters)
gm - gravitational parameter (meters^3 /sec^2)
longWayFlag - flag tocompute the alternate long way around the orbit.
The defaultis the short way around.
startVel - 3x1 starting velocity vector [vx;vy;vz](m/s)
deltaTime - time to movefrom start to final pos
作用:Lambert targeting algorithm -minimum eccentricity
用法:[startVel, deltaTime] =atbLambertMinEccen(startPos, finalPos, gm)
[startVel, deltaTime] =atbLambertMinEccen(startPos, finalPos, gm, longWayFlag)
说明:startPos - 3x1 starting position [x;y;z] (meters)
finalPos - 3x1 final position [x;y;z] (meters)
gm - gravitational parameter (meters^3 /sec^2)
longWayFlag - flag tocompute the alternate long way around the orbit.
The defaultis the short way around.
startVel - 3x1 starting velocity vector [vx;vy;vz](m/s)
deltaTime - time to movefrom start to final pos
备注:Computes the Lambert targetingalgorithm to design a two-body
trajectory between theinitial and final positions.
作用:Kepler two body propagator
用法:[pos, vel, accel] =atbKeplerProp(startPos, startVel, gm, times)
说明:startPos - 3x1 starting position [x;y;z] (meters)
startVel - 3x1 starting velocity [vx;vy;vz](meters/sec)
gm - gravitational parameter (meters^3 /sec^2)
times - N length vector of times at which tocompute the orbit.
The first timein the vector is considered to be the start time.
pos - 3xN orbit position [x;y;z] (meters)
vel - 3xN orbit velocity [vx;vy;vz] (m/s)
accel - 3xN orbit acceleration [ax;ay;az] (m^2/s)
备注:Propagates a two-body trajectoryfrom the given initial conditions.
作用:J2 propagator
用法:[pos, vel, accel] =atbJ2Prop(startPos, startVel, gm, eccRad, J2, times)
说明:startPos - 3x1 starting position [x;y;z] (meters)
startVel - 3x1 starting velocity [vx;vy;vz](meters/sec)
gm - gravitational parameter (meters^3 /sec^2)
eccRad - equatorial radius (meters)
J2 - zonal harmonic coefficient (unitless)
times - N length vector of times at which tocompute the orbit.
The first timein the vector is considered to be the start time.
pos - 3xN orbit position [x;y;z] (meters)
vel - 3xN orbit velocity [vx;vy;vz] (m/s)
accel - 3xN orbit acceleration [ax;ay;az](m^2/s)
备注:Propagates a two-body trajectoryfrom the given initial conditions.
The propagator uses afirst order J2 perturbation algorithm which models
only the secular effectson the orbital elements. The output positions,
velocities andaccelerations are in the same inertial coordinate system
as the inputelements. There is an implicitassumption in this algorithm
that the central body isin a simple spin about its Z axis and that the
inertial and central bodyfixed Z axes are aligned.
作用:J4 propagator
用法:[pos, vel, accel] =atbJ4Prop(startPos, startVel, gm, eccRad, J2, J4, times)
说明:startPos - 3x1 starting position [x;y;z] (meters)
startVel - 3x1 starting velocity [vx;vy;vz] (meters/sec)
gm - gravitational parameter (meters^3 /sec^2)
eccRad - equatorial radius (meters)
J2 - zonal harmonic coefficient (unitless)
J4 - zonal harmonic coefficient (unitless)
times - N length vector of times at which tocompute the orbit.
The first timein the vector is considered to be the start time.
pos - 3xN orbit position [x;y;z] (meters)
vel - 3xN orbit velocity [vx;vy;vz] (m/s)
accel - 3xN orbit acceleration [ax;ay;az](m^2/s)
备注:Propagates a two-body trajectoryfrom the given initial conditions.
The propagator uses asecond order J2/J4 perturbation algorithm which
models only the seculareffects on the orbital elements. J2 effects are
considered to the secondorder and J4 effects are considered to the first
order. The outputpositions, velocities and accelerations are in the same
inertial coordinatesystem as the input elements. There isan implicit
assumption in thisalgorithm that the central body is in a simple spin about
its Z axis and that theinertial and central body fixed Z axes are aligned.
作用:Simple ascent propagator
用法:[pos, vel] = atbLaunchProp('centBody', launchLLA, burnoutLLA,burnoutSpeed, retroFlag, times)
说明:centBody - valid central body name, i.e. 'Earth'
launchLLA - 3x1 LatLonAlt vector [rad;rad;m]
burnoutLLA - 3x1 LatLonAlt vector [rad;rad;m]
burnoutSpeed - burnoutspeed (meters/sec)
retroFlag - retrograde flag
times - N length vector of times at which tocompute the orbit.
pos - 3xN orbit position [x;y;z] (meters)
vel - 3xN orbit velocity [vx;vy;vz] (m/s)
备注:Propagates an ellipticaltrajectory from the launch LLA point
to the burnout LLApoint, generating a velocity profile which is zero at
launch and burnoutSpeedat burnout. The burnout velocity vectorwill
be perpendicular to theburnout position vector. The initialvelocity
vector will be parallelto the launch positition vector. Thetrajectory
will be generated in theplane formed by the launch and burnout position
vectors.
作用:Missile propagator data - fixedtime
用法:[posCBI, velCBI, apogeeAlt, deltaV] = atbMissilePropDataFixedTime('centBody',startPosCBF, endPosCBF, startTime, longWay, deltaTime)
说明:centBody - valid central body name, i.e. 'Earth'
startPosCBF - 3x1 CBF position vector [x;y;z] (meters)
endPosCBF - 3x1 CBF position vector [x;y;z] (meters)
startTime - time corresponding to startPosCBF (sec)
longWay - flag to generate the trajectory thelong way around the central body
deltaTime - time of flight (sec)
posCBI - 3x1 initial position [x;y;z] (meters)
velCBI -3x1 initial velocity [vx;vy;vz] (m/s)
apogeeAlt - apogee altitude of the trajectory(meters)
deltaV - velocity impulse required fortrajectory(m/s)
备注:Determines the initial inertialposition and velocity
for a missile trajectorybetween two CBF position vectors.
Use atbLambertMinEccento determine the minimum valid time.
作用:Missile propagator data - fixedaltitude
用法:[posCBI, velCBI, deltaTime, deltaV] =atbMissilePropDataFixedAlt('centBody', startPosCBF, endPosCBF, startTime,longWay, apogeeAlt)
说明:centBody - valid central body name, i.e. 'Earth'
startPosCBF - 3x1 CBF position vector [x;y;z] (meters)
endPosCBF - 3x1 CBF position vector [x;y;z] (meters)
startTime - time corresponding to startPosCBF (sec)
longWay - flag to generate the trajectory thelong way around the central body
apogeeAlt - apogee altitude of the trajectory(meters)
posCBI - 3x1 initial position [x;y;z] (meters)
velCBI -3x1 initial velocity [vx;vy;vz] (m/s)
deltaTime - time of flight (sec)
deltaV - velocity impulse required fortrajectory(m/s)
备注:Determines the initial inertial position and velocity for a missiletrajectory between two CBF position vectors.
作用:
用法:
说明:
作用:Missile propagator data - minimumenergy
用法:[posCBI, velCBI, deltaTime,apogeeAlt, deltaV] = atbMissilePropDataMinEnergy ( 'centBody', startPosCBF, endPosCBF, startTime, longWay)
说明:centBody - valid central body name, i.e. 'Earth'
startPosCBF - 3x1 CBF position vector [x;y;z] (meters)
endPosCBF - 3x1 CBF position vector [x;y;z] (meters)
startTime - time corresponding to startPosCBF (sec)
longWay - flag to generate the trajectory thelong way around the central body
posCBI - 3x1 initial position [x;y;z] (meters)
velCBI - 3x1 initial velocity [vx;vy;vz] (m/s)
deltaTime - time of flight (sec)
apogeeAlt -apogee altitude of the trajectory (meters)
deltaV - velocity impulse required fortrajectory(m/s)
作用:Read a 2-line element set file
用法:vehNames = atbTLERead('fileName','prefix')
说明:fileName - full path to TLE file in a formatreadable by STK
prefix - string to prepend to the name of eachTLE in the file
vehNames - cell array of loaded TLE names
备注:Extracts TLEs from the specifiedfile and store for use by atbTLEProp
Consult STKdocumentaiton for further information on TLE files
作用:Get all loaded 2-line elementsets
用法:vehNames = atbTLEGetAll
说明:vehNames - cell array of all loaded TLE names
备注:Lists all TLEs available for useby atbTLEProp
Consult STKdocumentaiton for further information on TLE files
作用:删除2行根数设置
用法:atbTLEDelete(vehNames)
说明:vehNames - single name or cell array of TLE names
备注:Deletes the specified TLEs frommemory
作用:设置SGP4两行根数运动属性参数
用法:[times, posECF, velECF] =atbTLEProp('vehName', timeStart, timeStop, timeStep)
说明:vehName - loaded TLE name
timeStart - propagation start time (sec)
timeStop - propagation stop time (sec)
timeStep - propagation time step (sec)
times - N length array of times relative to theinternal ATB epoch
posECF - 3xN ECF position matrix [x;y;z](meters)
velECF - 3xN ECF velocity matrix [vx;vy;vz](m/s)
作用:获取SGP4两行根数的历元
用法:epoch = atbTLEEpoch('vehName')
说明:vehName - loaded TLE name
epoch - the offset in sec form the internalATB epoch
备注:Returns the offset in sec fromthe internal ATB epoch
作用:获取SGP4两行根数
用法:tleInfo = atbTLEInfo('vehName')
说明:vehName - loaded TLE name
tleInfo - structure with the following fields:
orbitEpoch - string date in YYDDD.SSSSSSS format
meanMotion - rev/day
eccentricity - unitless
inclination - units in radians
argOfPerigree - units in radians
RAAN -units in radians
meanAnomaly - units in radians
meanMotionDot
meanMotionDotDot
bStar -m^2/kg
备注:Returns the two-line-element setdata for a loaded vehicle
作用:计算精度因子
用法:[dop,bestInd] = atbComputeDOP(posVecs, N)
dop = atbComputeDOP(posVecs)
说明:posVecs - a 3xM matrix of nav beacon positions[x;y;z] (meters), 4 <= M <= 30
N - optional integer value to computethe optimal subset
of the beacons. Meaningless unless N < M. N <= 30.
bestInd - a length N vector of indices into optimalbeacons.
dop - a structure with the following fields:
GDOP
PDOP
HDOP
VDOP
TDOP
HMajDOP - the local horizontal error ellipse major axis
HMinDOP - the local horizontal error ellipse minor axis
HMajAz - therotation angle (from the x axis) of the local horizontal error ellipse
备注:Computesdilution of precision based on the optimal set of
N beacons from the input array. The optimal set of N
is determined as the set that yieldsthe minimum GDOP.
The beacon positions should beexpressed in a local horizontal
coordinate system so the DOP valuesmay be interpreted as
stated. This local coordinate system should have Zpointed
toward the center of the Earth, orperpendicular to the
surface and X should be oriented ina north-south sense.
The best array will be filled withthe indices of the beacons
that yield the minimum GDOP
作用:地图细节Earth map details
用法:xyCell = atbMapDetails(mapName)
说明:mapName - one of the followingstrings:
'coasts' -coastlines
'intl' -international boundaries
'islands' -ocean islands
'lakes' -freshwater lakes
'prov' -provincial boundaries, e.g. US State lines
'rivers' -freshwater rivers
xyCell - cell arraywith elements containing 2xN matrices of
[lon;lat](deg).
作用:绘地图Plot Earth map details
用法:hl = atbPlotMapDetails(hax,mapName, style)
说明:mapName - one of the followingstrings:
'coasts' -coastlines
'intl' -international boundaries
'islands' -ocean islands
'lakes' -freshwater lakes
'prov' -provincial boundaries, e.g. US State lines
'rivers' -freshwater rivers
style - a plot linestyle, see the help for PLOT
hl - handles to lines
作用:获取多边形句柄
用法:hGrid =atbGetPolyHandle(XYpolygon)
说明:XYpolygon - a 2xN matrix ofpositions [x;y] (unitless), N >= 3
hGrid - grid handle for use in atbInsidePoly andatbClearPolyHandle
备注:Generates a grid handle for a polygon. The grid handle is used by atbInsidePoly todetermine if a point is enclosed by the polygon.
作用:检查一个点是否为多边形的内点
用法:inside = atbInsidePoly(hGrid,XYpoints)
说明:hGrid - handle obtained from atbGetPolyHandle
XYpoints - 2xN matrix of points to check [x;y](unitless)
inside - 1xN vector of flags indicating if thecorresponding point
is enclosed bythe polygon represented by hGrid.
作用:清除多边形句柄
用法:atbClearPolyHandle(hGrid)
atbClearPolyHandle('ALL')
说明:hGrid - vector of handles to polygon grids toclear from memory.
作用:Execute an STK/Connect command
用法:rtn = stkExec(conID, 'conCmdStr')
说明:rtn - A character array containing the STK return
conID -STK/Connect connection ID, from stkOpen.
可以说,所有的STK/Connect都可以通过调用函数stkExec( )来实现,具体使用参见STK/Help/Connect。下面仅就已经使用过的功能做介绍。
1、Matlab连接STK,首先要获得STK的地址,示例中采用了默认地址stkDefaultHost。得到地址后,就可以利用语句stkOpen打开默认地址,建立Matlab与STK的连接了。
remMachine = stkDefaultHost;
conid=stkOpen(remMachine);
2、在STK中创建新场景前,需要检查STK中的当前场景,如果目前STK中已经存在一个场景,就可以利用语句stkUnload关闭场景,或者利用语句stkClose关闭当前连接。
scen_open = stkValidScen;
if scen_open == 1
rtn =questdlg('Close the current scenario?');
if~strcmp(rtn,'Yes')
stkClose(conid)
return
else
stkUnload('/*')
end
end
3、利用语句stkNewObj创建新场景。这里需要注意一个问题,stkNewObj在STK5.0中创建新场景时,语法为stkNewObj('Scenario','','Scenario1'),这应该是STK5.0的程序错误所致。stkNewObj的正确语法应该是stkNewObj('ParentPath','Class','Name'),其中ParentPath为场景或对象的路径,Class为新建对象的类别,Name为新建对象的名称。
disp('Create a new scenario: SatelliteFormation');
stkNewObj('Scenario','','SatelliteFormation');
stkNewObj('*/','Satellite','Chief');
4、场景建立完成后,需要为场景设置时间参数。其中场景的历元时刻设置这是通过语句stkSetEpoch和stkSyncEpoch实现的。而设置场景运行方式时是通过语句stkConnect直接调用STK连接命令的方式实现的。STK调用连接命令语句stkConnect非常重要,它的正确语法是
rtn=stkConnect(conid,'<Command>','<ObjectPath>','<Parameters>')
其中,conid代表通过语句stkOpen打开的当前连接,Command代表要执行的命令,
ObjectPath代表对象名称,Parameters代表相应命令的执行参数。
disp('Set scenario timeperiod');
stkSetTimePeriod('1 May 200700:00:00.00','2 May 2007 00:00:00.00','GREGUTC');
stkSetEpoch('1 May 200700:00:00.00','GREGUTC');
stkSyncEpoch;
rtn=stkConnect(conid,'Animate','Scenario/SatelliteFormation','SetValues"1 May 2007 00:00:00.00" 60 0.1');
rtn=stkConnect(conid,'Animate','Scenario/SatelliteFormation','Reset');
rtn = stkConnect(conid,'SetBoundary','Scenario1/sun_rfi/AreaTarget/BoxTarget','Pattern 10 10 -80 10 -70 10 -60 10 -50 10-40 -37 -40 -37 -50 -37 -60 -37 -70 -37 -80');
如果需要设置或是获取上述函数中没有提到的属性或参数,需要借助stkConnect或是stkExec完成,常采用stkExec,其调用函数为
rtn=stkExec(conid,'<Command> <ObjectPath> <Parameters>')
具体应用需查询STK中的Help。如改变卫星模型尺寸,调用语句为:stkExec( conid, 'VO*/Satellite/Deputy ScaleLog 1' )