Clear Filters
Clear Filters

I want to chcek the SGP4 orbit Propogator. But MY CODING IS NOT WORKING. Can someone check and help me with the coding. I want to use orbital elements not the tle file.

8 views (last 30 days)
Here is my code;
% Orbital elements of starlink
a = 6925000; % Semi-major axis in km
e = 0.0001406; % Eccentricity
i = 53.0538; % Inclination in degrees
RAAN = 66.9644; % Right Ascension of Ascending Node in degrees
arg_perigee = 87.41; % Argument of Perigee in degrees
M = 272.6995; % Mean Anomaly in degrees
epoch = 23285; % Epoch time in days
[positions,velocities]= orbitPropagate(datetime(2020,2,2,12,0,2),a,e,i,RAAN, ...
Unrecognized function or variable 'orbitPropagate'.
Sam Chak
Sam Chak on 25 Feb 2024
Hey @Toshi, I wanted to inquire about the coding issue we discussed earlier. It's a fascinating problem, especially for satellite enthusiasts like us. I'm genuinely curious to know if any recent developments or breakthroughs have occurred that might have led to its resolution.
Toshi on 4 Mar 2024
I am still learning. But I think there are many new features available in matlab for satcom.There is PseudoRange Function available, high precision orbit propogator available.

Sign in to comment.

Answers (1)

Aiswarya on 12 Feb 2024
Hi Toshi,
The issue with your code as mentioned in the error message is because you are using an incorrect function name. The built-in function to do the same is 'propagateOrbit'. This gives you option to use orbital elements or tle file as well. You can modify your function call as follows:
[positions,velocities]= propagateOrbit(datetime(2020,2,2,12,0,2),a,e,i,RAAN,arg_perigee,M);
You may refer to the following documentation for more information on the 'propagateOrbit' function:
  1 Comment
Toshi on 4 Mar 2024
Thank you for the help.
I have one more question if you can help : how can i get the orbital elements at stoptime
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", ...
elements1 = orbitalElements(sat1);
[positionSGP4,velocitySGP4] = states(sat1);

Sign in to comment.


Find more on Satellite and Orbital Mechanics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!