While not eof(InputFile) do
begin
ReadLn(InputFile,sLine);
ProcessDataLine(sLine,sStr);
if level = StrToInt(sStr[2]) then
begin
if (StrToFloat(sStr[3])= rUpLati) and (StrToFloat(sStr[4]) = rLeftLong) then
begin
end;
if (StrToFloat(sStr[3])= rUpLati)and (StrToFloat(sStr[4]) = rRightLong) then
begin
aValue[2,1] := StrToFloat(sStr[5]);
//Showmessage(sstr[5]+','+sstr[1]+','+sstr[2]+','+sstr[3]+','+sstr[4]);
aValue[2,2] := 1;
end;
if (StrToFloat(sStr[3]) = rDownLati) and (StrToFloat(sStr[4]) = rLeftLong) then
begin
aValue[3,1] := StrToFloat(sStr[5]);
aValue[3,2] := 1;
end;
if (StrToFloat(sStr[3]) = rDownLati) and (StrToFloat(sStr[4]) = rRightLong) then
begin
aValue[4,1] := StrToFloat(sStr[5]);
aValue[4,2] := 1;
//showmessage(FloatToStr(aValue[4,2]));
end;
if (aValue[1,2] = 0) or (aValue[2,2] = 0) or (aValue[3,2] = 0) or (aValue[4,2] = 0) then
begin
Continue;
end
else
begin
//Showmessage(sstr[5]+','+sstr[1]+','+sstr[2]+','+sstr[3]+','+sstr[4]);
//Showmessage(FloatToStr(aValue[1,1])+','+FloatToStr(aValue[2,1])+','+FloatToStr(aValue[3,1])+','+FloatToStr(aValue[4,1]));
Writeln(OutputFile,'时间,气压,纬度,经度,值');
rInter := (aValue[1,1]*Cx1 + aValue[2,1]*Cx2)* Cy2 +(aValue[3,1]*Cx1 + aValue[4,1]*Cx2)*Cy1;
rMean := (aValue[1,1] + aValue[2,1] + aValue[3,1]+ aValue[4,1])/4;
Writeln(OutputFile,sStr[1]+','+sStr[2]+','+sStr[3]+','+sStr[4]+',',rInter:6:2); 就是这一句!
For j := 1 to 4 do aValue[j,2] := 0;
end;
end;
end;
end;