Sei sulla pagina 1di 8

Samara State Aerospace University

Radio Engineering Department

Course project

Student:
Laila Amanzhol
5122M
Supervisor:
Professor
Kai Borre

Samara 2014

Introduction

The course project addresses the problem of GNSS GLONASS orbit


parameters as given by almanac.
The course paper is aimed at 1) identifying positions of satellites GLONASS
on the sky plot ,2) showing the numbers of visible satellites with respect to GPS
Time, 3) ploting time period when the visible satellites are10 or higher above the
horizon and 4) showing the number of satellites visible for a number of hours.
Materials
We downloaded the materials for the research from https://glonass
iac.ru/en/GLONASS/ephemeris.php in html format and called them glonass
Ephemeris.htm.
We identified the parameters of our location like geographical coordinates and
height above sea level. We have the following values for Samara city: longitude is
50.09, latitude is 53.12 and height above sea level is 117 m. We used an
elevation angle of 15.
Procedure
Firstly, we used M-file rinex_glonassAlm.m. to create matrix data from
glonass Ephemeris.htm file. The script of M-file is given below:
function rinex_glonassAlm(almanacfile, outputfile)
fida = fopen(almanacfile);
head_lines = 0;
while 1 % We skip possible header
head_lines = head_lines+1;
line = fgetl(fida);
answer = findstr(line,'*GLONASS ALMANAC*');
if ~isempty(answer), break; end;
end;
noeph = 24; % an almanac file always shall contain 24 satellites
ehp = zeros(21,24);
% Set aside memory for the input
line = fgetl(fida); % reading an empty line
line = fgetl(fida); % reading headers
[A, count] = fscanf(fida,'%f',[12,24]); % reading all data into A
status = fclose(fida)
% Allocating the actual values to eph
eph(1,:) = A(1,:); % svprn
eph(3,:) = 0; %M0;
eph(4,:) = 5048; % roota; this value also could be derived from
%Kepler's thrid law
eph(6,:) = A(6,:); % ecc;
eph(7,:) = A(9,:)*pi/180; %omega;
eph(12,:) = A(7,:)*pi/180; % i0;
eph(16,:) = A(8,:)*pi/180; % Omega0;

eph(18,:) = A(4,:); % toe;


eph(21,:) = A(4,:); % toe;
%fidu = fopen('ssau.nav','w');
fidu = fopen(outputfile,'w');
count = fwrite(fidu,[eph],'double');
fclose all
%%%%%%%%%%%%%%%%%%%%%%% end rinex_glonassAlm.m %%%%%

We changed the matrix data from actual values, which was necessary to
achieve the goals of the course project. The matrix data include: the PRN
(satellite) number (eph(1)), six Kepler elements (eph(3), eph(4), eph(6), eph(7),
eph(12)) and the time for almanacs issue (eph(18) = eph(21)).
All values are identified from glonass Ephemeris.htm, except the mean anomaly
eph(3) and the semi-major axis eph(4). But they can be calculated from the given
parameters.
The mean anomaly is defined as
=n(t-t0),
where, t0 equals the given TOW ; t is the actual time for the computed satellite and
n is mean motion.
The semi-major axis a is computed from Keplers third law:

The GLONASS value of the product GM is 3,986 0051014 m3/s2.


The mean anomaly is derived as 0 and the semi-major axis 5048. We put
this values directly to the script.
Secondly, we used M - file frgeod to change the geographical coordinates in
Cartesian coordinates .
Thirdly, we used the M-file satpos to compute the coordinates of a satellite for
a given time of week time and with given almanac.
Also, we used the next M-files: topocent to transform the vector dx into
topocentric coordinate system with origin at X; dms2rad to convert the degrees,
minutes, and seconds to radians; polarhg to draw coordinate lines of a polar plot.
Finally, to present our results to graphs we used M-file easy11y. All functions,
which were described above, are applied in this M-file.
The script of M-file is given below:
set(0,'DefaultTextFontName','Times');
set(0,'DefaultAxesFontName','Times');
set(0,'DefaultTextFontSize',16);
% the following five assignments are necessary
rinex_glonassAlm('glonass-Ephemeris.htm','ssau.nav');
almanac = 'ssau.nav';
mask = 10; % 10
phi = [53 12 00]% Samara values

lambda = [50 09 00];


%reading ephemerides
fide = fopen(almanac,'r');
Eph = fread(fide,inf,'double');
m = length(Eph);
eph = reshape(Eph,21,m/21);
% transformation of given location (phi,lambda,h) to (X,Y,Z)
Phi = dms2rad(phi(1),phi(2),phi(3));
Phi = Phi*180/pi;
Lambda = dms2rad(lambda(1),lambda(2),lambda(3));
Lambda = Lambda*180/pi;
[M(1,1),M(2,1),M(3,1)] = frgeod(6378137,298.257222101,Phi,Lambda,0);
% Computation of (azimuth, elevation) for each satellite
% for each 15 min.s. We use only one ephemeris for each PRN.
% Anyway, the plot is only for visual use
[prns, ind] = unique(eph(1,:));
az = ones(32,96)*inf;
el = ones(32,96)*inf;
for sat = [ind]
start_time = eph(18,sat);
j = 0;
i = eph(1,sat);
for time = start_time:900:start_time+86400
S = satpos(time,eph(:,sat));
j = j+1;
[azimuth,elevation,distance] = topocent(M,S-M);
az(i,j) = azimuth;
el(i,j) = elevation;
end
end
%%%%%%%%% stereographic plot %%%%%%%%%%%%%
figure(1);
% polarhg draws coordinate lines of a polar plot. We add
% circles with radii 30 and 60 degrees
polarhg([30 60])
XX = zeros(32,40)*inf; % a matrix of NaNs to store plot data
YY = XX;
hold on
for k = 1:32
if az(k,1) == 0, continue, end
AZ = az(k,:);
EL = el(k,:);
% remove data below the cut-off angle
AZ(find(EL <= mask)) = nan;
EL(find(EL <= mask)) = nan;
% convertion to polar coordinates
xx = (90-EL).*cos(AZ*pi/180);
yy = (90-EL).*sin(AZ*pi/180);
XX(k,1:length(xx)) = xx;
YY(k,1:length(yy)) = yy;
end % end-k
% the first coord. moves text vertically (increasing values up),
% the second coord. moves text horizontally (increasing values right)
text(135,-95,{['Skyplot for the position (\phi, \lambda) = (' ...
num2str(round(Phi)) '\circ, ' num2str(round(Lambda)) '\circ)']})
text(115,-45,{['Elevation mask ' num2str(mask) '\circ' ]}) %120
text(-120,-120,['All PRNs except ' num2str(setdiff(1:24,prns)) ])

plot(XX',YY','linewidth',2)
hold off
print -depsc2 easy111y
% preparation for visibility plot

%%%%%%%%%%%%%%%%%

% we choose a resolution of 5 min.s,


% ie. 24 hours times 12 = 288 which becomes the range of j
satsum = zeros(1,288);
visible = zeros(2*(size(prns,2)+1),288);
for sat = [ind]
Az = [];
El = [];
i = eph(1,sat);
for j = 1:288
time = 300*(j-1);
S = satpos(time,eph(:,sat));
[az,el,d] = topocent(M,S-M);
if el > mask
Az = [Az az];
El = [El el];
satsum(j) = satsum(j)+1;
visible(2*i,j) = 1;
end
end
end
figure(2);
set(gca,'Fontsize',16);
area(satsum)
set(gca,'XTick',1:71:288)
set(gca,'XTickLabel',{'0','6','12','18','24'})
xlabel('Time [hours]')
ylabel('# of Visible Satellites')
title(['Elevation Mask ' num2str(mask) '\circ'])
print -depsc2 easy112y
figure(3);
set(gca,'Fontsize',16);
imagesc(flipud(visible)); colormap(gray)
set(gca,'XTick',1:71:288)
set(gca,'XTickLabel',{'0','6','12','18','24'})
set(gca,'YTick',-3:16:(2*(size(prns,2)+1)))
set(gca,'YTickLabel',{'2','8','16','24','32'});
xlabel('Time [hours]')
ylabel('PRNs')
title('Solid Lines Indicate Visible Satellites')
colormap summer
print -depsc2 easy113y
figure(4);
set(gca,'Fontsize',16);
an = sum(visible,1);
total = zeros(1,14);
for i = 1:288
j = an(i);
total(j) = total(j)+1;
end
bar(6:13,total(6:13)/12); % total is in unit of hour

title('Number of Visible GLONASS Satellites')


ylabel('Hours')
print -depsc2 easy114y
%%%%%%%%%%%%%%%%%%%%% end easy11y.m %%%%%%%%%%%%%%

Results
As a result of the project, we obtained positions of GLONASS satellites, the
number and hours of visible satellites on sky plot are shown in Figure 1, Figure 2,
Figure 3, and Figure 4.

Figure 1: Sky plot including all GPS satellites for a period of 24 hours at a given
position. The elevation mask is 10
The sky plot shows the positions of satellites for the elevations mask -10
degree and period of 24 hours .
The Figure 2 diagram presents the number of visible satellites with respect to
GPS Time. The horizontal axis demonstrates GPS Time, and the vertical axis
indicates number of visible satellites.
We come to the conclusion that the most number of satellites -13- fly over
Samara from 6:00 to 6:30 a.m. , but the fewest number of satellites -4- fly over
Samara from 14:00 to 14:30 a.m.

Figure 2: Number of visible satellites


The time period of each visible satellite chart on Figure 3.The horizontal axis
indicates time a day and the vertical axis indicates the PRNs (satellites). The
longest continuous time period among satellites of GLONASS is about 5 hours a
day. The satellites 4, 5, 16, and 24 have such continuous duration of visibility.
The satellites 18, 19 and 20 are out of horizon for 9 hours. It is the longest
period of invisibility among satellites.

Figure 3: Time period when the visible satellites are 10


or higher above the horizon

Figure 4: Number of satellites visible in number of hours


In figure 4 shows that the horizontal axis of bar chart on the number of visible
GLONASS Satellites and the vertical axis presents the hours. It is demonstrates
that 6 satellites are visible 1.5 hours, 7 satellites 6.5 hours, 8 satellites 4.5
hours, 9 satellites 7 hours, 10 satellites 1 hour, 11 satellites 20 minutes, 12
satellites 10 minutes, and 13 satellites 30 minutes.

References
1. Borre, K., Strang, G. (2012) Algorithms for Global Positioning. WellesleyCambridge Press, Wellesley MA.
2. Gurtner, W., Estey, L. (2007) RINEX: The Receiver Independent Exchange
Format. ftp://igscb.jpl.nasa.gov/igscb/data/format/rinex300.txt,version 3.00
edition.

Potrebbero piacerti anche