一、背景介绍
根据CW方程的学习,CW方程的限制条件为圆轨道,不考虑摄动,二者距离相对较小。TH方程则可以将物体间的相对运动推广到椭圆轨道的二体运动模型,本部分将结合STK的仿真功能,联合考察TH方程的有用性,参考<New State Transition Matrix for Relative Motion on an Aribitary Ellipitcal Orbit>这篇文章的案例,共同复现该论文的数据
二、STK案例
为了证明式子的有用性,首先使用STK仿真该相对运动的真实轨迹,作为检验模型正确性的关键。关于STK与matlab的调用,给出的代码如下,读者可自行验证
% 使用STK验证VVLH坐标系
clc;clear
uiApplication = actxGetRunningServer('STK12.application');
root = uiApplication.Personality2;
checkempty = root.Children.Count;
if checkempty ~= 0
root.CurrentScenario.Unload
root.CloseScenario;
end
root.NewScenario('VVLH');
StartTime = '26 Jan 2024 04:00:00.000'; % 场景开始时间
StopTime = '10 Feb 2024 04:00:00.000'; % 场景结束时间
root.ExecuteCommand(['SetAnalysisTimePeriod * "',StartTime,'" "',StopTime,'"']);
root.ExecuteCommand(' Animate * Reset');
SatName = 'Target'; % SAR_ GX_ Sat_ GX_1_ SAR_1_
satellite = root.CurrentScenario.Children.New('eSatellite', SatName);
satellite.SetPropagatorType('ePropagatorAstrogator'); % 不设置的时候默认为二体模型 ePropagatorJ4Perturbation
satellite.Propagator;
Perigee=6378.137+500;
Ecc=0.1;
sma=Perigee/(1-Ecc);
Inc=30;
w=0;
RAAN=0;
TA=45;
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList Initial_State Propagate']);
InitialState=satellite.Propagator.MainSequence.Item(0);
%% 初始化卫星参数
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.CoordinateType Modified Keplerian']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Epoch ',StartTime,' UTCG']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.sma ',num2str(sma),' km']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.ecc ',num2str(Ecc)]);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.inc ',num2str(Inc),' deg']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.w ',num2str(w),' deg']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.RAAN ',num2str(RAAN),' deg']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.TA ',num2str(TA),' deg']);
%% 二体传播
Propagate=satellite.Propagator.MainSequence.Item(1);
Propagate.PropagatorName='Earth Point Mass';
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' RunMCS']);
% 插入目标星
SatName2 = 'Chaser'; % SAR_ GX_ Sat_ GX_1_ SAR_1_
satellite2 = root.CurrentScenario.Children.New('eSatellite', SatName2);
satellite2.SetPropagatorType('ePropagatorAstrogator'); % 不设置的时候默认为二体模型 ePropagatorJ4Perturbation
satellite2.Propagator;
InitialState2=satellite2.Propagator.MainSequence.Item(0);
InitialState2.CoordSystemName='Satellite/Target VVLH';
InitialState2.Element.X=0.1;
InitialState2.Element.Y=0.01;
InitialState2.Element.Z=0.01;
InitialState2.Element.Vx=0.0001;
InitialState2.Element.Vy=0.0001;
InitialState2.Element.Vz=0.0001;
Propagate2=satellite2.Propagator.MainSequence.Item(1);
Propagate2.PropagatorName='Earth Point Mass';
root.ExecuteCommand(['Astrogator */Satellite/',SatName2,' RunMCS']);
% 报告二颗卫星的三维关系
satellite.VO.OrbitSystems.InertialByWindow.IsVisible=0;
satellite2.VO.OrbitSystems.InertialByWindow.IsVisible=0;
satellite2.VO.OrbitSystems.Add('Satellite/Target VVLH System')
satellite.VO.Vector.RefCrdns.Item(2).Visible=1;
targetdata=root.ExecuteCommand(['Report_RM */Satellite/Target Style "VVLH" TimePeriod "26 Jan 2024 04:00:00.000" "26 Jan 2024 16:00:00.000" TimeStep 60']);
Num=targetdata.Count;
for j=1:Num-2
struct=regexp(targetdata.Item(j),',','split');
Tar_x(j)=str2double(struct{2});
Tar_y(j)=str2double(struct{3});
Tar_z(j)=str2double(struct{4});
end
%
figure(1)
plot(Tar_x(1:220),Tar_z(1:220));
axis([-3.5 0.5 -0.6 0.3])
set(gca,'XDir','reverse');
set(gca,'YDir','reverse');
grid on
这里需要额外注意VVLH报告在STK不是自带的,需要自己去定义,操作步骤右击目标星的Report & Graph Manager —— Create new report style —— 命名为VVLH —— 内容如下图所示
最后呈现的是XZ平面的相对位置