How can i get orbital elements at the stop time of the simulation.
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
akshatsood
il 22 Mar 2024
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 Commenti
Vedere anche
Categorie
Scopri di più su Reference Applications in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!