How to calculate semiMajorAxis and trueAnomaly from TLE file
34 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am trying to add satelltie to satellite scenario by following the documentaion.
The general way is to simply use the TLE file
sat1 = satellite(sc,tleFile,"Name","Sat1")
If I want to find the Keplerian elements the function orbitalElements(sat1) can give eccentricity, inclination, rightAscensionOfAscendingNode and argumentOfPeriapsis. But how does MATLAB computes semiMajorAxis and trueAnomaly?
Any help is appreicated.
Thank you
0 commentaires
Réponses (2)
Garmit Pant
le 12 Août 2024
Hello Raghav,
I see that you require MATLAB functions to compute the 'semiMajorAxis' and 'trueAnomaly' of a satellite from its TLE file. This can be achieved by the following two methods:
- Using the “orbitalElements” Function: The “orbitalElements” function calculates the ‘SemiMajorAxis’ and ‘TrueAnomaly’ of a satellite if the “OrbitalPropagator” property is set to ‘two-body-keplerian’. The following code snippet adds the satellite to the scenario using the “satellite” method to read the file and returns the orbital elements using the “orbitalElements” function:
sc = satelliteScenario;
tleFile = "eccentricOrbitSatellite.tle";
sat1 = satellite(sc,tleFile,OrbitPropagator="two-body-keplerian");
elements1 = orbitalElements(sat1)
- Using the “ijk2keplerian” Function: The “ijk2keplerian” function is used to calculate Keplerian orbit elements using position and velocity vectors. You can read the data from a TLE file using “tleread”, use it as an input to “propagateOrbit” to calculate the position and velocity of the satellite corresponding to an input time, and subsequently use the position and velocity data to calculate Keplerian orbit elements using “ijk2keplerian”. The following code snippet demonstrates this workflow:
tleStruct = tleread('leoSatelliteConstellation.tle');
[r,v] = propagateOrbit(datetime(2022, 1, 3, 12, 0, 0),tleStruct);
[SMA,ecc,incl,RAAN,argp,nu,truelon,arglat,lonper] = ijk2keplerian(r(:,:,1), v(:,:,1))
For further understanding, kindly refer to the following MathWorks Documentation:
- Refer to the ‘Output Arguments’ section to understand the different elements returned based on the OrbitPropagator: https://www.mathworks.com/help/releases/R2023b/satcom/ref/matlabshared.satellitescenario.satellite.orbitalelements.html
- Refer to the ‘Output Arguments’ section to understand the different elements returned: https://www.mathworks.com/help/releases/R2023b/aerotbx/ug/ijk2keplerian.html
I hope you find the above explanation and suggestions useful!
Voir également
Catégories
En savoir plus sur CubeSat and Satellites dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!