www.pudn.com > GNSS_SDR.zip > OputRformat.asv, change:2007-05-20,size:2422b


function OputRformat(navSolutions,trackResults,settings) 
fid=fopen('RINEX.txt','wt'); 
fprintf(fid,'%9s','2.10'); 
fprintf(fid,'%38s','OBSERVATION DATA    G (GPS)'); 
fprintf(fid,'%33s\n','RINEX VERSION / TYPE'); 
fprintf(fid,'%17s','BLANK OR G = GPS,'); 
fprintf(fid,'%39s    %-20s\n','R = GLONASS, T = TRANSIT, M = MIXED','COMMENT'); 
fprintf(fid,'%-40S%-40s\n','teqc  2007Feb05','20070519 15:22:40UTCPGM / RUN BY / DATE'); 
fprintf(fid,'%-60s%-20s\n','EXAMPLE OF A MIXED RINEX FILE','COMMENT'); 
fprintf(fid,'%-60s%-20s\n','-Unknown-','MAKER NAME'); 
fprintf(fid,'%-20s%-40s%-20s\n','Jiffer','LSGI NAVLAB','OBSERVER / AGENCY'); 
fprintf(fid,'%-20s%-20s%-20s%-20s\n','X1234A123','XX','ZZZ','REC # / TYPE / VERS'); 
fprintf(fid,'%-20s%-40s%-20s\n','234','YY','ANT # / TYPE'); 
fprintf(fid,'%10s%14s      %-30s%-20s\n','4375274.','587466.','4589095.','APPROC POSITION XYZ'); 
fprintf(fid,'%10s%-13s%-14s%-23s%-20s\n','.','9030','.0000','.0000','ANTENNA: DELTA H/E/N'); 
fprintf(fid,'%-60s%-20s\n','     1','WAVELENGTH FACT L1/2'); 
fprintf(fid,'%-60s%-20s\n','     2    L1    C1','# / TYPES OF OBSERV'); 
fprintf(fid,'%-60s%-20s\n','     1.0000','INTERVAL'); 
fprintf(fid,'%-60s%-20s\n','  2007     5    18     7    38   43.000000','TIME OF FIRST OBS'); 
fprintf(fid,'%80s\n','END OF HEADER       '); 
Time=navSolutions.transmitTime(1); 
[AvaiSatlist,b]=size(navSolutions.channel.PRN); 
PhaseE=zeros(5,37000); 
for(channel=1:AvaiSatlist) 
    for(i=1:37000) 
        if(trackResults(1,channel).I_P(i)>0)PhaseE(channel,i)=trackResults(1,channel).pllDiscr(i); 
        else PhaseE(channel,i)=trackResults(1,channel).pllDiscr(i)+0.5; 
            if(PhaseE(channel,i)>0.5)  
        end 
        if 
    end 
end 
     
 
for TimeStep = 1:2:fix((settings.msToProcess - max(navSolutions.subFrameStart))/500) 
    hour=rem(Time,86400)/3600; 
    min=rem(rem(Time,86400),3600)/60; 
    sec=rem(rem(rem(Time,86400),3600),60); 
    Time=Time+1; 
    fprintf(fid,' %-10s%-2d%-3d%-12.7f%-3s%1d','07  5 18',fix(hour),fix(min),sec,'0',AvaiSatlist); 
    for(i=1:AvaiSatlist) 
        fprintf(fid,'G%2d',navSolutions.channel.PRN(i,TimeStep)); 
    end 
    fprintf(fid,'\n'); 
    for(i=1:AvaiSatlist) 
        Pherror=sum(PhaseE(i,1:(navSolutions.subFrameStart(i)+(TimeStep-1)*500))); 
        Prange=navSolutions.channel.rawP(i,TimeStep); 
        fprintf(fid,' %-17.5f%-62.4f\n',Pherror,Prange); 
    end 
end 
 
fclose(fid);