我在学习GPS编程时写的DELPHI源码 ,比较简单.希望大虾不要见笑.多多指教.
代码说明:
procedure TfrmMain.DrawSatInfo(gps: TGPSInfo; pbx: TPaintBox); var i: integer; r: integer; dx,dy: integer; begin r := pbx.Width div 2; for i:= 1 to 12 do begin if gps.SatInfo[i].PRN 0 then begin dx := r + Round(r*(90-gps.SatInfo[i].EL)*sin((gps.SatInfo[i].AZ - 90)*Pi/180)/90); dy := r + Round(r*(90-gps.SatInfo[i].EL)*cos((gps.SatInfo[i].AZ - 90)*Pi/180)/90); dx := dx - 8; if dx < 0 then dx := 0; if gps.SatInfo[i].SN > 20 then begin pbx.Canvas.Font.Color := clBlue; pbx.Canvas.TextOut(dx,dy,inttostr(gps.SatInfo[i].PRN)); end else begin
下载说明:请别用迅雷下载,失败请重下,重下不扣分!