How can i get orbital elements at the stop time of the simulation.
3 次查看(过去 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!