Changeset 9434
- Timestamp:
- 08/25/11 16:04:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/solutions/flaim.m
r9421 r9434 41 41 ext='.log'; 42 42 filelog=fullfile(pathstr,[name ext versn]); 43 filesol='solution_best.kml'; 43 if ~isempty(md.fm_solution) 44 [pathstr,name,ext,versn] = fileparts(md.fm_solution); 45 filesol=fullfile('',[name '' '']); 46 else 47 filesol='solution_best'; 48 end 44 49 45 50 % calculate latitude and longitude, if necessary … … 97 102 98 103 display(['Post-processing the flaim output in the ''' options.fmdir ''' sub-directory.']); 99 if exist(filesol,'file') 104 if exist('solution_best.kml','file') 105 if ~strcmp(filesol,'solution_best') 106 system(['mv solution_best.kml ' filesol '.kml']); 107 end 100 108 md.results.FlaimSolution.solution=[options.fmdir '/' filesol]; 109 else 110 md.results.FlaimSolution.solution=''; 101 111 end 102 112 if exist(filelog,'file') … … 109 119 md.results.FlaimSolution.quality =NaN; 110 120 end 111 end 112 if ~exist(md.results.FlaimSolution.solution,'file') 113 md.results.FlaimSolution.solution=''; 121 fidi=fopen(filelog,'r'); 122 while true 123 fline=fgetl(fidi); 124 if ~ischar(fline) || strncmp(fline,'........',8) 125 break 126 end 127 end 128 fido=fopen([filesol '.log'],'w'); 129 while true 130 fline=fgetl(fidi); 131 if ~ischar(fline) 132 break 133 end 134 fprintf(fido,'%s\n',fline); 135 end 136 fclose(fidi); 137 fclose(fido); 114 138 end 115 139 display(md.results.FlaimSolution); … … 117 141 cd .. 118 142 if ~strncmpi(options.keep,'y',1) 143 system(['mv ' options.fmdir '/' filesol '.kml .']); 144 system(['mv ' options.fmdir '/' filesol '.log .']); 119 145 system(['rm -rf ' options.fmdir]); 120 146 end
Note:
See TracChangeset
for help on using the changeset viewer.