TH方程学习(1)

一、背景介绍

根据CW方程的学习,CW方程的限制条件为圆轨道,不考虑摄动,二者距离相对较小。TH方程则可以将物体间的相对运动推广到椭圆轨道的二体运动模型,本部分将结合STK的仿真功能,联合考察TH方程的有用性,参考<New State Transition Matrix for Relative Motion on an Aribitary Ellipitcal Orbit>这篇文章的案例,共同复现该论文的数据

二、STK案例

为了证明式子的有用性,首先使用STK仿真该相对运动的真实轨迹,作为检验模型正确性的关键。关于STK与matlab的调用,给出的代码如下,读者可自行验证

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平面的相对位置

相关推荐
彤银浦4 分钟前
python学习记录7
python·学习
这可就有点麻烦了4 分钟前
强化学习笔记之【TD3算法】
linux·笔记·算法·机器学习
少女忧5 分钟前
51单片机学习第六课---B站UP主江协科技
科技·学习·51单片机
A_lvvx8 分钟前
OpenCV透视变换
人工智能·opencv·计算机视觉
苏宸啊10 分钟前
顺序表及其代码实现
数据结构·算法
lin zaixi()13 分钟前
贪心思想之——最大子段和问题
数据结构·算法
FindYou.13 分钟前
C - Separated Lunch
算法·深度优先
百锦再15 分钟前
自动驾驶的技术实现及原理
人工智能·机器学习·自动驾驶
AcademicIdeas学境思源18 分钟前
避免学术欺诈!在ChatGPT帮助下实现严格引用并避免抄袭
人工智能
夜雨翦春韭19 分钟前
【代码随想录Day30】贪心算法Part04
java·数据结构·算法·leetcode·贪心算法