Molniya satellite systems were military communications satellites used by the Soviet Union. The satellites used highly eccentric elliptical orbits of 63.4 degrees inclination and orbital period of about 12 hours. This type of orbits allowed satellites to be visible to polar regions for long periods.
In this example we will show how to plot ground track for satellites.
clear all; clc; % Earth topographic map figure(1); xwidth = 820; ywidth = 420; hFig = figure(1); set(gcf,'PaperPositionMode','auto') set(hFig, 'Position', [100 100 xwidth ywidth]) hold on; grid on; axis([0 360 -90 90]); load('topo.mat','topo','topomap1'); contour(0:359,-89:90,topo,[0 0],'b') axis equal box on set(gca,'XLim',[0 360],'YLim',[-90 90], ... 'XTick',[0 60 120 180 240 300 360], ... 'Ytick',[-90 -60 -30 0 30 60 90]); image([0 360],[-90 90],topo,'CDataMapping', 'scaled'); colormap(topomap1); ylabel('Latitude [deg]'); xlabel('Longitude [deg]'); title('MOLNIYA 1-93 satellite ground track'); R_e = 6378; % Earth's radius mu = 398600; % Earth’s gravitational parameter [km^3/s^2] J2 = 0.0010836; we = 360*(1 + 1/365.25)/(3600*24); % Earth's rotation [deg/s] % MOLNIYA 1-93 Orbital Elements /Source: AFSPC rp = 1523.9 + R_e; % [km] Perigee Radius ra = 38843.1 + R_e; % [km] Apogee Radius theta = 0; % [deg] True anomaly RAAN = 141.4992; % [deg] Right ascension of the ascending node i = 64.7; % [deg] Inclination omega = 253.3915 ; % [deg] Argument of perigee a = (ra+rp)/2; % Semimajor axis e = (ra -rp)/(ra+rp) ; % Eccentricity h = (mu*rp*(1 + e))^0.5; % Angular momentum T = 2*pi*a^1.5/mu^0.5; % Period dRAAN = -(1.5*mu^0.5*J2*R_e^2/((1-e^2)*a^3.5))*cosd(i)*180/pi; domega = dRAAN*(2.5*sind(i)^2 - 2)/cosd(i); % Initial state [R0 V0] = Orbital2State( h, i, RAAN, e,omega,theta); [ alfa0 ,delta0 ] = R2RA_Dec( R0 ); scatter(alfa0,delta0,'*k'); ind = 1; eps = 1E-9; dt = 20; % time step [sec] ti = 0; while(ti <= 2.5*T); E = 2*atan(tand(theta/2)*((1-e)/(1+e))^0.5); M = E - e*sin(E); t0 = M/(2*pi)*T; t = t0 + dt; M = 2*pi*t/T; E = keplerEq(M,e,eps); theta = 2*atan(tan(E/2)*((1+e)/(1-e))^0.5)*180/pi; RAAN = RAAN + dRAAN*dt ; omega = omega + domega*dt; [R V] = Orbital2State( h, i, RAAN, e,omega,theta); % Considering Earth's rotation fi_earth = we*ti; Rot = [cosd(fi_earth), sind(fi_earth),0;... -sind(fi_earth),cosd(fi_earth),0;0,0,1]; R = Rot*R; [ alfa(ind) ,delta(ind) ] = R2RA_Dec( R ); ti = ti+dt; ind = ind + 1; end scatter(alfa,delta,'.r'); text(280,-80,'smallsats.org','Color',[1 1 1], 'VerticalAlignment','middle',... 'HorizontalAlignment','left','FontSize',14 );
What is the function R2RA_Dec(R)?
It calculates right ascension and declination from position vector. Look algorithm and example calculation here. https://smallsats.org/2013/01/17/right-ascension-and-declination-from-position-vector/
This code didn’t work.
No ground track lines .How do you fix this?
Did you have the R2RA_Dec(R) code as well ? see the comments above and link to it. If you still have a problem mail me either using form email me the errors you get with the project help form.
Where is ‘Orbital2State()’ function in above code
Please look at this example for Orbital2State algorithm https://smallsats.org/2013/01/17/state-vectors-r-v-from-orbital-elements/
While going through your satellite ground track matlab code, I noticed following functions:
[ alfa0 ,delta0 ] = R2RA_Dec( R0 );
scatter(alfa0,delta0,’*k’);
I would like to know where is code listing for
1. R2RA_Dev(R0);
2. scatter(alfa0,delta0,’*k’);
If they are not available in MatLab library, can you send those code?
Thanks
Manohar
The R2RA_Dec( R0 ) calculates the right ascension and declination from position vector. The algorithm is here.. https://smallsats.org/2013/01/17/right-ascension-and-declination-from-position-vector/
Scatter is a standard matlab function(at lease it is included with 2010b). Hope this helps
Manohar, You can also send me an email (look contacts) and i can sent files to you.
My e-mail address is Manohar.d.deshpande@nasa.gov
Thanks for your help.
Manohar
I sent all files that you need. Good Luck !
Hello, I’m an engineering student, and I’m quite interested on this algorithm, I would like to know what is the langage you are using for this ground track. Would it be possible to get the files? And, is there any existing files which could be applied on any satellite? I’m giving you my e-mail ehretrapha@eisti.eu
Thanks a lot!
Hi Raphael
Sorry i just noticed this.
The code is in Matlab. If you just copy the code from here to the Matlab source file and run it it will do the job. yeap you just need to provide the correct satellite orbital parameters and thats it. You could also provide a TLE file.. check my posts regarding TLE. I will also send you an email. if You will have more questions I’ll try to help you. Good Luck !
I copied your coding but it does not work properly actually. I made function R2RA_Dec,keplerEq,and Orbital2state
properly. Plots were appeared on figure but it didn’t match with your result. It is weird… Would you sent me
your full file? Thank you.
Dear Eui,
Thats really strange. If u have all the functions required u shall get the same results. I will sent you my files when I get home. Thanks !
Okay, thanks! I will wait for your mail.
I’m really sorry but I’m in hurry.. I am doing project with my team. I cannot find what is going wrong…
would you let me know when I will be able to get file??
Oh!!! I solved it. My keplerEq function was wrong. I found correct code for it.
Now i’m curious about ti,T,dt variables. What are they? How does dt can work as time step?
Just in case I sent the files to your email . T is the orbital period. ti is initial time and knowing orbital state at ti you find the orbital state at ti + dt . if u use smaller dt you will get more points in ground track. hope it helps.
Hello Sir,
I have tried running the code but I keep having this error:
Error in keplerEq (line 45)
[R0 V0] = Orbital2State( h, i, RAAN, e,omega,theta);
I have the files keplerEq, Orbital2State and R2RA_Dec.
please help! I would really appreciate if you could send me the files needed!
Thank you very much,
Alvan
which version of mat lab you used for this code?
if i remember correctly it was Matlab R2014a
I am interested in some of the matlab codes you have mentioned. If I want to run them, how do I get the data file?
Thanks
Manohar