There was a serious error in the calculation of the satellite position

조회 수: 3 (최근 30일)
Ruizhe Liu
Ruizhe Liu 2024년 4월 8일
답변: Ashok 2024년 8월 28일
When I was using "satelliteScenario" and "satellite" to set.
satellite(scenario,semimajoraxis,eccentricity,inclination,RAAN,argofperiapsis,trueanomaly) adds a Satellite object from Keplerian elements defined in the Geocentric Celestial Reference Frame (GCRF) to the satellite scenario.
different starttime will influence the position of the satellite.
clear all
sem = 6888e3;
ecc = 0.001;
inclination = 85 ;
RAAN = 60;
ARGOFPERIAPSIS = 85;
TrueAnomaly = 130;
startTime = datetime('2024-05-05 03:00:00','TimeZone','UTC');
% startTime = datetime('2024-05-05 04:00:00','TimeZone','UTC');
stopTime = startTime + hours(2);
sampleTime = 1; % seconds
sc= satelliteScenario(startTime,stopTime,sampleTime);
the same UTC time but different satellite position.

답변 (1개)

Ashok
Ashok 2024년 8월 28일
Hello Ruizhe,
From the code you have shared, I can comprehend that you are creating a satellite simulation using the “satelliteScenario” function and later adding a satellite object to the simulation using the ”satellite” function.
According to my observation, the value passed to the argument “trueanomaly” of the “satellite” function, is interpreted to be the true anomaly of the satellite at the start of the simulation. The start time of the simulation can be set using the argument “startTime” in the “satelliteScenario” function. Make sure you are sending the appropriate value of true anomaly to the “satellite” function.
You can find the true anomaly at a given time stamp using vectorial relations. Alternatively, If the true anomaly of the satellite is known at a given time stamp, you can find the true anomaly at any future time stamp using the “advance” method of the “satelliteScenario” class as well.
Example:
Let’s say that the true anomaly is 130° at 2024-05-05 03:00:00 UTC, then you can find the true anomaly at 2024-05-05 04:00:00 UTC (one hour later) using the “advance” method of the “satelliteScenario” class as follows:
% Satellite' Orbital Parameters (Same for both the scenarios)
sem = 6888e3;
ecc = 0.001;
inclination = 85 ;
RAAN = 60;
ARGOFPERIAPSIS = 85;
TrueAnomaly_3am = 130;
% Creating and displaying first scenario with the satellite
startTime1 = datetime('2024-05-05 03:00:00','TimeZone','UTC');
stopTime1 = startTime1 + hours(2);
sampleTime1 = 1; % seconds
sc1 = satelliteScenario(startTime1,stopTime1,sampleTime1);
sat1 = satellite(sc1, sem, ecc, inclination, RAAN, ARGOFPERIAPSIS, TrueAnomaly_3am,...
"OrbitPropagator","two-body-keplerian");
% Start time of the second scenario
startTime2 = datetime('2024-05-05 04:00:00','TimeZone','UTC');
% Finding the true anomaly using the first satelliteScenario ('sc1')
timeDiff = seconds(startTime2-startTime1);
sc1.AutoSimulate = false;
for i = 1:round(timeDiff/sampleTime1)
sc1.advance;
end
sat1Orb = orbitalElements(sat1);
TrueAnomaly_4am = sat1Orb.TrueAnomaly;
sc1.AutoSimulate = true;
This would give “TrueAnomaly_4am” as 357.6445° which is the true anomaly at 2024-05-05 04:00:00 UTC. Finally, as expected, the position of the satellite in the two simulations are in sync, as seen in the attached image.
However, note that this procedure of finding the true anomaly might be slow depending on the time interval (“timeDiff”) and the sample time (“sampleTime1”). In such cases, you can use the “propagateOrbit” function to find the position and velocity vectors of the satellite at a desired time stamp, followed by the “ijk2keplerian” function to get the Keplerian orbit elements form the position and velocity vectors. The corresponding references are as follows:
Reference for the “satellite” function:
I hope this helps!

카테고리

Help CenterFile Exchange에서 Reference Applications에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by