Merge pull request #339 from phl0/cbrExport

Fix cabrillo export
This commit is contained in:
Petr Hlozek 2020-10-28 08:00:49 +01:00 committed by GitHub
commit 107d23d01a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View File

@ -113,6 +113,7 @@ type
function IsAmbiguous(call : String) : Boolean;
function IsPrefix(pref : String; Date : TDateTime) : Boolean;
function GetCont(call : String; Date : TDateTime) : String;
function GetCountry(callsign : String; QsoDate : TDateTime) : String;
function id_country(znacka: string; us_state : String; datum : TDateTime; var pfx, cont, country, WAZ,
posun, ITU, lat, long: string) : Word; overload;
function id_country(znacka: string;datum : TDateTime; var pfx, cont, country, WAZ,
@ -655,6 +656,14 @@ begin
Result := id_country(znacka,datum,pfx,country,cont,itu,waz,posun,lat,long)
end;
function TdmDXCC.GetCountry(callsign : String; QsoDate : TDateTime) : String;
var
cont, WAZ, posun, ITU, lat, long, pfx, country: string;
begin
cont := '';WAZ := '';posun := '';ITU := '';lat := '';long := '';
Result := DXCCRefArray[id_country(callsign,qsodate,pfx,country,cont,itu,waz,posun,lat,long)].name
end;
function TdmDXCC.GetCont(call : String; Date : TDateTime) : String;
var
cont, WAZ, posun, ITU, lat, long, country, pfx: string;

View File

@ -383,7 +383,8 @@ var
f,r : TextFile;
tmp : String;
mycall,call,
myloc, loc : String;
myloc, loc,
mycountry : String;
myname : String;
mailingaddress, zipcity : String;
email : String;
@ -419,7 +420,7 @@ begin
date := dmUtils.GetDateTime(0);
mycall := cqrini.ReadString('Station','Call','');
cont := '';WAZ := '';posun := '';ITU := '';lat := '';long := '';
adif := dmDXCC.id_country(mycall,date,pfx,cont,country,itu,waz,posun,lat,long);
mycountry := dmDXCC.GetCountry(mycall, date);
myloc := cqrini.ReadString('Station','LOC','');
if length(myloc) = 4 then myloc := myloc +'ll';
myname := cqrini.ReadString('Station','Name','');
@ -666,16 +667,16 @@ begin
Writeln(f,'GRID-LOCATOR: '+UPcase(myloc)); //non standard upcase required
Writeln(f,'LOCATION: '+edtCabLocation.Text);
Writeln(f,'CLAIMED-SCORE: ');
Writeln(f,'SPECIFIC: ');
// Writeln(f,'SPECIFIC: '); // Unknown Cabrillo Tag (DF2ET 26.10.2020)
Writeln(f,'CLUB: '+club);
if (Operators.Count > 0) then
Writeln(f,'OPERATORS: '+OpString);
Writeln(f,'NAME: '+myname);
Writeln(f,'ADDRESS: '+mailingaddress);
Writeln(f,'ADDRESS-CITY: '+address[1]);
Writeln(f,'ADDRESS-COUNTRY: '+country);
Writeln(f,'ADDRESS-COUNTRY: '+mycountry);
Writeln(f,'ADDRESS-STATE-PROVINCE: ');
Writeln(f,'ADDRESS-POSTAL-CODE: '+address[0]);
Writeln(f,'ADDRESS-POSTALCODE: '+address[0]);
Writeln(f,'EMAIL: '+email);
Writeln(f,'SOAPBOX:'+edtCabSoapBox.Text);