STK MATLAB联动第二期(1)

STK MATLAB联动第二期,本期介绍的是卫星参数的设置,由于篇幅较长,本次主要介绍的是轨道外推设置中的二体运动外推。

(1)轨道外推设置(Propagator)

轨道外推指的是在给定的初始条件下预测卫星飞行轨道的数学算法,主流的算法包括二体运动外推(Two Body)、J2摄动外推(J2Perturbation)、J4摄动外推(J4Perturbation)、高精度轨道外推(High-Precision Orbit Propagator,HPOP)等,本文将对其中常用的算法进行STK界面和MATLAB代码进行介绍。

  1. 二体运动外推(Two Body)

二体运动外推仅考虑中心天体和航天器之间的相互作用,将中心天体看做质点,且仅考虑中心天体对航天器的引力。

常用的参数涉及包括以下几种:

  • 轨道半长轴(Semimajor) a

轨道半长轴描述了轨道的大小,可用近地点距离地心的距离(Perigee)和远地点距离地心的距离(Apogee)的平均值来表示。

  • 偏心率(Eccentricity)

偏心率描述了轨道的形状,当e=0时为圆轨道,0<e<1为椭圆轨道,e=1为抛物线轨道,e>1为双曲线轨道。除此之外,也可通过设置近地点/远地点高度、近地点/远地点距离进行表示。

  • 轨道倾角(Inclination)

轨道倾角描述了轨道相对于赤道面的倾斜度,i=0或180为赤道轨道,0<i<90为顺行轨道,90<i<180为逆行轨道。

  • 近地点幅角(Argument of Perigee)

近地点与升交点之间的地心角。

  • 升交点赤经(RAAN)

从春分点到升交点之间的地心角。

  • 真近地角(True Anomaly)

描述航天器的瞬时位置,定义为某个时刻下航天器位置与近地点之间的地心角(随时间变化),也可采用平近地角(Mean Anomaly)来进行描述。

  • MATLAB代码设置

(a)代码格式及案例

Example 1

代码格式

root.ExecuteCommand('SetState */Satellite/MySatellite Classical Propagator "UseAnalysisStartTime" "UseAnalysisStopTime" StepSize CoordSystem "UseAnalysisStartTime" Semimajor Eccentricity Inclination ArgumentOfPerigee RAAN TrueAnomaly');

代码示例

root.ExecuteCommand('SetUnits / km');%Default Connect Units are meters
root.ExecuteCommand('SetState */Satellite/MySatellite Classical TwoBody "UseAnalysisStartTime" "UseAnalysisStopTime" 60 ICRF "UseAnalysisStartTime" 6678.14 0 28 180 0 180');

Example 2

kep=sat.Propagator.InitialState.Representation.ConvertTo('eOrbitStateClassical');

kep.SizeShapeType = 'eSizeShapeAltitude';

%卫星远地点高度参数设置

kep.SizeShape.ApogeeAltitude = 600;

%卫星近地点高度参数设置

kep.SizeShape.PerigeeAltitude = 500;

%卫星轨道倾角参数设置

kep.Orientation.Inclination = 50;

%卫星近地点幅角参数设置

kep.Orientation.ArgOfPerigee = 0;

%卫星升交点赤经参数设置

kep.Orientation.AscNode.Value = 245;

%卫星真近地点参数设置

kep.Location.Value = 180;

(b)显示效果

Example1显示效果

 

### STK MATLAB Connector Documentation and Examples The integration between Systems Tool Kit (STK) and MATLAB allows users to leverage both environments' strengths, combining STK's powerful simulation capabilities with MATLAB’s extensive data analysis tools. The installation of such connectors typically involves ensuring that both applications are correctly set up on the system. For detailed documentation regarding the STK-MATLAB connector, AgiTrans provides comprehensive guides which cover setup instructions as well as usage scenarios[^1]. These documents explain how one can establish communication channels between STK objects and MATLAB variables through COM interfaces or by using specific toolboxes designed for this purpose. Examples provided often include script snippets demonstrating basic interactions like importing/exporting scenario files (.sto), accessing satellite positions over time, performing coverage analyses from within MATLAB sessions, among others. A typical example might look something along these lines: ```matlab % Initialize STK application object stkApp = actxserver('AgI.STKX.StkX'); % Open an existing .stu file containing predefined satellites/ground stations etc. stkApp.LoadScenario('C:\Path\To\File.stu'); % Get access to a particular satellite named 'Satellite1' satelliteObj = stkApp.GetObject('*/Satellite/Satellite1').DataProviders; % Query ephemeris data at specified times timeTags = {'2023-07-01T00:00:00', '2023-07-01T01:00:00'}; ephemData = satelliteObj.GetEphemAtTimes(timeTags); disp(ephemData); ``` This code initializes connection with STK via ActiveX server interface, loads pre-configured scenarios, retrieves celestial body information, queries position data across given timestamps, then displays results directly inside MATLAB console window.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值