
Untitled
By: a guest on
Aug 21st, 2012 | syntax:
None | size: 1.50 KB | hits: 24 | expires: Never
procedure TfrmGPS.tmrUploadTimer(Sender: TObject);
var
Vehicle, URL, Password: String;
ReportedSpeed: Double;
begin
try
tmrUpload.Enabled := False;
pnlUploading.Color := clYellow;
pnlUploading.Refresh;
if chkUploadPosition.Checked and (LatitudeString <> '') then begin
if ParamCount >= 4 then begin
Vehicle := ParamStr(4);
end else begin
Vehicle := 'daveake_Chase';
end;
Password := 'aurora';
ReportedSpeed := Speed;
if chkSpeedLimiter.Checked then begin
ReportedSpeed := Min(Speed, 112);
end;
URL := 'http://spacenear.us/tracker/track.php' +
'?vehicle=' + Vehicle +
'&time=' + UTCTime +
'&lat=' + FormatFloat('00.000000', Latitude) +
'&lon=' + FormatFloat('00.000000', Longitude) +
'&speed=' + FormatFloat('0.0', ReportedSpeed) +
'&alt=' + FormatFloat('0', Altitude) +
'&heading=' + FormatFloat('0', Direction) +
'&pass=' + Password;
HttpCli1.URL := URL;
tmrTimeout.Enabled := True;
HttpCli1.Get;
pnlStatus.Color := clLime;
LastUpload := Now;
end;
except
pnlStatus.Color := clRed;
end;
pnlUploading.Color := clGray;
tmrUpload.Enabled := True;
end;