91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 8KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-16
  • 語言: Matlab
  • 標簽: GPS/北斗??

資源簡介

GPS/北斗的O文件讀取程序 matlab版 讀取rinex3.0格式的

資源截圖

代碼片段和文件信息

function?[ofile]?=?ReadOfile_3
%?讀取rinex?O文件中的信息?version?3.02
%?包括各觀測值以及其文件頭的內容
%%
%讀取文件頭
[filenamefilepath]?=?uigetfile(‘*.**O‘‘選擇觀測文件‘);
fileName?=?strcat(filepathfilename);
fid?=?fopen(fileName‘r+‘);

while?1?
????tline?=?fgetl(fid);
????if?~ischar(tline)
????????break;
????end
????
????if?~isempty(regexp(tline?‘?+$‘?‘end‘))
????????temp?=?regexp(tline?‘?+$‘‘end‘);
????????for?ii?=?temp:-1:1
????????????if?strcmp(tline(ii)?‘?‘)~=1
????????????????break;
????????????end
????????end
????????tline?=?tline(1:ii);
????end
????
????str?=?char(regexp(tline‘RINEX?VERSION?/?TYPE‘?‘match‘));
????if?strcmp(str‘RINEX?VERSION?/?TYPE‘)
????????ofile.rnx_vrn?=?str2double(tline(6:8));
????????ofile.rnx_type?=?tline(40:41);
????end
????
????str?=?char(regexp(tline‘PGM?/?RUN?BY?/?DATE‘‘match‘));
????if?strcmp(str?‘PGM?/?RUN?BY?/?DATE‘)
????????ofile.pgm?=?tline(1:15);
????????ofile.company?=?tline(21:40);
????????ofile.ob_date?=?tline(41:59);
????end
????
????str?=?char(regexp(tline‘COMMENT‘‘match‘));
????if?strcmp(str‘COMMENT‘)
????????continue;
????end
????
????str?=?char(regexp(tline‘MARKER?NAME‘‘match‘));
????if?strcmp(str‘MARKER?NAME‘)
????????ofile.mark_name?=?tline(1:10);
????end
????
????str?=?char(regexp(tline‘MARKER?NUMBER‘‘match‘));
????if?strcmp(str‘MARKER?NUMBER‘)
????????ofile.mark_number?=?tline(1:10);
????end
????
????str?=?char(regexp(tline‘APPROX?POSITION?XYZ‘‘match‘));
????if?strcmp(str‘APPROX?POSITION?XYZ‘)
????????ofile.app_pos(11)?=?str2double(tline(1:14));
????????ofile.app_pos(21)?=?str2double(tline(16:28));
????????ofile.app_pos(31)?=?str2double(tline(30:42));
????end
????
????str?=?char(regexp(tline‘ANTENNA:?DELTA?H/E/N‘‘match‘));
????if?strcmp(str‘ANTENNA:?DELTA?H/E/N‘)
????????ofile.ant_HEN.H?=?str2double(tline(1:14));
????????ofile.ant_HEN.E?=?str2double(tline(21:29));
????????ofile.ant_HEN.N?=?str2double(tline(36:42));
????end
????
????str?=?char(regexp(tline‘SYS?/?#?/?OBS?TYPES‘‘match‘));
????if?strcmp(str‘SYS?/?#?/?OBS?TYPES‘)
????????if?tline(1)?==?‘G‘
????????????ofile.obs_GPS_typecount?=?str2double(tline(5:6));
????????????ofile.obs_GPS_type?=?[];
????????????for?ii?=?1:ofile.obs_GPS_typecount
????????????????ofile.obs_GPS_type?=?[ofile.obs_GPS_type?tline(4*(ii-1)+8:4*(ii-1)+10)];
????????????end
????????elseif?tline(1)?==?‘C‘
????????????ofile.obs_BDS_typecount=str2double(tline(5:6));
????????????ofile.obs_BDS_type?=?[];
????????????for?ii?=?1:ofile.obs_BDS_typecount
????????????????ofile.obs_BDS_type?=?[ofile.obs_BDS_type?tline(4*(ii-1)+8:4*(ii-1)+10)];
????????????end
%?????????elseif?tline(1)?==?‘R‘
%?????????????O_header.obs_GLO_typecount=str2double(tline(6:7));
%?????????????O_header.obs_GLO_type?=?[];
%?????????????for?ii?=?1:O_header.obs_GLO_typecount
%?????????????????O_header.obs_GLO_type?=?[O_header.obs_GLO_type?tline(4*(ii-1)+9:4*(ii-1)+11)];
%?????????????end
????????end
????end
????
????st

評論

共有 條評論

相關資源