⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gpsdop.txt

📁 An Example Simulation of Differential GPS
💻 TXT
字号:
% DOP.m
% Dilution of Precision
% Author: Jim Connor
% 04/16/2002
% This Program reads a log file produced by the NovAtel RT20 
% receiver and imports data into the matlab workspace
% The log file must contain the P20A log and the DOPA log
% This function seperates the two formats into temp files so the
% textread function can extract the data in the workspace



    FID=fopen(file,'r');           % Opens
    FID2=fopen('temp1.txt','w');
   
while feof(FID)==0,
   line=fgetl(FID);
   length1=max(size(line));
   if length1>30
      if line(2)=='P'
         if line(3)=='2'
            if line(4)=='0'
               fprintf(FID2,'%s\n',line);
            end
         end
      end
   end
end

fclose(FID);
fclose(FID2);


	FID=fopen(file,'r');
	FID2=fopen('temp2.txt','w');
   
while feof(FID)==0,
   line=fgetl(FID);
   length1=max(size(line));
   if length1>30
      if line(2)=='D'
         if line(3)=='O'
            if line(4)=='P'
               fprintf(FID2,'%s\n',line);
            end
         end
      end
   end
end

fclose(FID);
fclose(FID2);


[time sat lat long height rt20stat stat] = textread('temp1.txt', ' %*s %*d %f %*f %d %f %f %f %*f %*f  %*f  %*f  %*f  %*f  %d %d %*[^\n]', 'delimiter',',');


[gdop pdop htdop hdop tdop sats] = textread('temp2.txt', ' %*s %*d %*f %f %f %f %f %f %f %*[^\n]', 'delimiter',',');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -