How can i get orbital elements at the stop time of the simulation.

조회 수: 6 (최근 30일)
Toshi
Toshi 2024년 3월 4일
답변: akshatsood 2024년 3월 22일
startTime = datetime(2024,3,1,22,07,37);
stopTime = startTime + days(3);
sampleTime = 60;
sc = satelliteScenario(startTime,stopTime,sampleTime);
tleFile = "o3b.tle" ;
sat1 = satellite(sc,tleFile);
sat1 = satellite(sc,tleFile, ...
"Name","sat1", ...
"OrbitPropagator","sgp4");
elements1 = orbitalElements(sat1);
[positionSGP4,velocitySGP4] = states(sat1);
display(elements1);
display(velocitySGP4);
display(positionSGP4);
satelliteScenarioViewer(sc);

답변 (1개)

akshatsood
akshatsood 2024년 3월 22일
I see that you want to retireve the orbital elements at the stop time of the simulation. Your current approach sets up the satellite scenario, adds a satellite using TLE data, and then immediately queries for the orbital elements and state vectors (position and velocity). However, this approach captures the state at the beginning of the simulation by default. To obtain the orbital elements at the stop time, you need to explicitly specify the time at which you want to query the orbital elements and states. To do so, use the "states" function with the "stopTime" as an input to get the position and velocity at the stop time.
% calculate the position and velocity at the stop time
[positionStop, velocityStop] = states(sat1, stopTime);
% display the position and velocity at the stop time
display(positionStop);
display(velocityStop);
However, it is important to note that the "orbitalElements" function directly doesn't accept position and velocity as inputs to return the orbital elements at a specific time. You would typically use the position and velocity to understand the satellite's state or to perform further custom calculations.
I hope this helps.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by