% displayAntenna.m
% Drew Gashler
% 07 February 2001
%
% Loads and displays archived GPGSV satellite data information. 

function y = displayAntenna(filename);

data = readgpgsv(filename);

% Each row of the data array has 12 columns, 4 columns describing each bird, 
% 3 birds per row.   
prn1 = data(:,1);
el1 = data(:,2);
az1 = data(:,3);
snr1 = data(:,4);

prn2 = data(:,5);
el2 = data(:,6);
az2 = data(:,7);
snr2 = data(:,8);

prn3 = data(:,9);
el3 = data(:,10);
az3 = data(:,11);
snr3 = data(:,12);

figure
plot(prn1,snr1,'.',prn2,snr2,'.',prn3,snr3,'.')
xlabel('Satellite ID')
ylabel('Signal/Noise')
title('Signal To Noise Ratios')


figure
polar(az1,el1,'.')
title('Skyplot of Visible GPS Constellation')
hold on
polar(az2,el2,'.')
polar(az3,el3,'.')
xlabel('')
hold off

figure
plot(el1,snr1,'.',el2,snr2,'.',el3,snr3,'.')
xlabel('Satellite Elevation (Degrees)')
ylabel('Signal/Noise')
title('Signal to Noise vs Satellite Elevation')
