function a = GetObservation(rfid)

endOfObs = 0;
while endOfObs ~= 1
	dataline = fgets(rfid);
	fileError = ferror(rfid);
	
	if fileError ~= [],
		break;
		end;
		
	linedesc = dataline(1:3);
	
	if strcmp('P01',linedesc)
		obs(2) = sscanf(dataline(31:39), '%f'); % 'New Code'
	
	elseif strcmp('P02',linedesc)
		obs(3) = sscanf(dataline(4:12), '%f'); % View Zenith
		
	elseif strcmp('T02',linedesc)
		obs(5) = sscanf(dataline(39:40), '%f'); % Solar Zenith
		obs(6) = sscanf(dataline(41:43), '%f'); % Solar Azimuth
		obs(1) = sscanf(dataline(53:57), '%d'); % Obs Number
		obs(4) = sscanf(dataline(67:69), '%f'); % View Azimuth
		
	elseif strcmp('D01',linedesc)
		obs(8:19) = sscanf(dataline,...
							'D01 0 %f %f %f %f %f %f %f %f %f %f %f %f');
		
	elseif strcmp('D02',linedesc)
		obs(20:28) = sscanf(dataline,... 
							'D02 0 %f %f %f %f %f %f %f %f %f');
		
	elseif strcmp('D03',linedesc)
		obs(29:40) = sscanf(dataline,...
							'D03 0 %f %f %f %f %f %f %f %f %f %f %f %f');
		endOfObs = 1;
	
	end;	% if strcmp('P01',linedesc), elseif...
	
	end;	% while endOfObs ~= 1
	
if fileError ~= [],
	a = [];

else	% if fileError ~= []
	a = obs;
	
end	% if fileError ~= [], else...
end;
