www.pudn.com > GNSS_SDR.zip > convert.m, change:2010-04-01,size:1224b


% Main Function 
clear; 
clc; 
fidin=fopen('1.txt'); 
fidout=fopen('compare.txt','wt'); 
SatlistNow=zeros(1,12); 
SatlistNext=zeros(1,12); 
CarrNow=zeros(1,12); 
CarrNext=zeros(1,12); 
CarrErr=zeros(1,12); 
while ~feof(fidin) 
    tline=fgetl(fidin); 
    SatNoNow=str2num(tline(32)); 
    for(i=1:SatNoNow) 
        SatlistNow(i)=str2num(tline((34+(i-1)*3):(35+(i-1)*3))); 
    end 
    for(i=1:SatNoNow) 
        tline=fgetl(fidin); 
        CarrNow(i)=str2num(tline(1:15)); 
    end 
    if(feof(fidin)==1) 
        break; 
    end 
    tline=fgetl(fidin); 
    Time=tline(1:27); 
    SatNoNext=str2num(tline(32)); 
    for(i=1:SatNoNext) 
        SatlistNext(i)=str2num(tline((34+(i-1)*3):(35+(i-1)*3))); 
    end 
    for(i=1:SatNoNext) 
        tline=fgetl(fidin); 
        CarrNext(i)=str2num(tline(1:15)); 
    end 
     
    if(SatNoNow==SatNoNext) 
        fprintf(fidout,'%15s\n',Time); 
        for(i=1:SatNoNext) 
            if(SatlistNow(i)==SatlistNext(i)) 
                fprintf(fidout,'  G%d',SatlistNow(i)); 
            end 
            CarrErr(i)=CarrNext(i)-CarrNow(i); 
            fprintf(fidout,'  %30f \n',CarrErr(i)); 
        end 
    end 
             
end 
fclose(fidin); 
fclose(fidout);