%% GPS Sky Plot

function skyPlot(Az,El,PRN,angle)

    % Az = azimuth angles in degrees
    % El = elevation angles in degrees
    % PRN = GPS satellite ID numbers
    % angle = angle orientation for the polar plot in degrees (arbitrary)
   
    theta = (90 - Az)*(pi/180);
    rho = 90 - El;
    
    % Number of Satellite Channels
    channelSize = length(Az);

    % First Satellite
    polarplot(theta(1),rho(1),'o','markerEdgeColor','k',...
        'markerFaceColor','m','markerSize',10,'lineWidth',1);
    hold on
    text(theta(1),rho(1),['  ',num2str(PRN(1))],'FontSize',14,...
        'color','m','FontWeight','bold');
    
    % Other Satellites
    for s = 2:1:channelSize
        polarplot(theta(s),rho(s),'o','markerEdgeColor','k',...
            'markerFaceColor','m','markerSize',10,'lineWidth',1); 
        text(theta(s),rho(s),['  ',num2str(PRN(s))],'FontSize',12,...
            'color','m','FontWeight','bold');
    end % for s = 2:1:channelSize
    
    % R-Tick Customization
    rlim([0 90]);
    rticks(0:15:90);
    rticklabels({});
    angle = angle*(pi/180);
    text(angle,0+2,'90');
    text(angle,15+2,'75');
    text(angle,30+2,'60');
    text(angle,45+2,'45');
    text(angle,60+2,'30');
    text(angle,75+2,'15');  
    
    % Theta-Tick Customization
    thetaticks([0 30 60 90 120 150 180 210 240 270 300 330])
    thetaticklabels({'','60','30','','330','300','','240','210','',...
        '150','120'})
    set(gca,'FontSize',11);
    text(0,93,'East','FontWeight','bold','FontSize',14);
    text(pi/2+pi/24,97,'North','FontWeight','bold','FontSize',14);
    text(pi,116,'West','FontWeight','bold','FontSize',14);
    text(-pi/2-pi/24,97,'South','FontWeight','bold','FontSize',14);
    
    % Polar Plot Grid Line Style
    set(gca,'GridLineStyle','-');
    
end 