procedure TForm7.refreshSigInfo;
var prn,m,satv_f,row:integer;
begin
row:=0;
if readyflg=false then exit
else
for prn:=1 to 32 do
begin
satv_f:=satvisible(prn)
//DLL函数
if satv_f=1 then
begin
sig_p:=sig(prn); //DLL函数sig()返回存入数据的内存首地址
sat_p:=sat(prn); //DLL函数sat()返回存入数据的内存首地址
inc(sig_p,s_num)
//移动指针
inc(sat_p,s_num)
//移动指针
sigif:=sig_p^;
satif:=sat_p^;
rzlistview1.Items[row].SubItems[0]:=inttostr(prn);
rzlistview1.Items[row].SubItems[1]:=format('%.4f',[satif.el]);
rzlistview1.Items[row].SubItems[2]:=format('%.4f',[satif.az]);
rzlistview1.Items[row].SubItems[3]:=format('%.4f',[sigif.dop]);
rzlistview1.Items[row].SubItems[4]:=format('%.4f',[sigif.pr]);
rzlistview1.Items[row].SubItems[5]:=format('%.4f',[sigif.iono_delay*1000000000]);
rzlistview1.Items[row].SubItems[6]:=format('%.4f',[sigif.trop_delay*1000000000]);
rzlistview1.Items[row].SubItems[7]:=format('%.4f',[satif.p[0]]);
rzlistview1.Items[row].SubItems[8]:=format('%.4f',[satif.p[1]]);
rzlistview1.Items[row].SubItems[9]:=format('%.4f',[satif.p[2]]);
rzlistview1.Items[row].SubItems[10]:=format('%.4f',[satif.v[0]]);
//rzlistview1.Items[row].SubItems[11]:=format('%.4f',[sigif.ion]);
rzlistview1.Items[row].SubItems[11]:=format('%.4f',[satif.v[1]]);
rzlistview1.Items[row].SubItems[12]:=format('%.4f',[satif.v[2]])
inc(row);
end;
end;
end;
procedure TForm1.refreshfm;
var ready_f,n,tm:integer;
begin
n:=mdichildcount-1;
while (n>=0) do
begin
if (mdichildren[n] is tform7) then
(mdichildren[n] as tform7).refreshSigInfo
else if (mdichildren[n] is tform4) then
(mdichildren[n] as tform4).refreshsatview;
n:=n-1;
end;
inc(s_num,25)
end;
全局变量
SATINFO=record
p:array [0..2] of double
v:array [0..2] of double
el:double
az:double
end;
sat_if=^SATINFO;
SIGINFO=record
pr:double
dop:double
iono_delay:double
trop_delay:double
end;
sig_if=^SIGINFO;
s_num:integer;
sig_p:sig_if;
sat_p:sat_if;
运行方式:当数据写入内存后,开始执行refreshfm,