How can i get orbital elements at the stop time of the simulation.
6 ビュー (過去 30 日間)
古いコメントを表示
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);
0 件のコメント
回答 (1 件)
akshatsood
2024 年 3 月 22 日
Hi @Toshi
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Reference Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!