www.pudn.com > GPS_satellite_positions.rar > GPS_satellite_positions.m


wie=0;% 0->ECEF;1->ECI. 
 
load s1eph; 
sat_id_ehp=zeros(1,32); 
sat_firsttime_record=zeros(1,32); 
h=waitbar(0,'calculation of the 24h-arcs of the satellites'); 
for j=1:((length(s1eph))/24) 
   if sat_id_ehp(1,s1eph(24*(j-1)+1))==1 
       continue; 
   else 
       sat_id_ehp(1,s1eph(24*(j-1)+1))=1; 
   end 
   sat_firsttime_record(1,s1eph(24*(j-1)+1))=s1eph(24*(j-1)+2); 
   for i=1:(24*6) 
   [x(i,s1eph(24*(j-1)+1)),y(i,s1eph(24*(j-1)+1)),z(i,s1eph(24*(j-1)+1)),tsat(i,s1eph(24*(j-1)+1)),rela(i,s1eph(24*(j-1)+1))]=eph2xyzn(-600+i*600,0,s1eph((j*24-23):(j*24)),wie); 
    end 
waitbar(j/((length(s1eph))/24));    
end 
close(h); 
 
figure; 
title('GPS-Orbits in chosen system'); 
xlabel('meter'); 
ylabel('meter'); 
zlabel('meter'); 
plot3(x,y,z); 
view(3); 
axis equal; 
%box; 
%colormap('gray'); 
%colormap('white'); 
colormap('summer'); 
hold on; 
[a,b,c]=sphere(18); 
surfl(a*6380000,b*6380000,c*6380000,[0,-23]); 
hold off; 
grid on;