Re-add RDA support to ADIF exports

This commit is contained in:
phl0
2024-06-26 10:12:53 +02:00
parent 602c91a01c
commit cbc425f524

View File

@@ -198,14 +198,30 @@ class AdifHelper {
$line .= $this->getAdifFieldLine("MY_STATE", $qso->state);
// We fill county only if it has a value and it's USA, Alaska or Hawaii. Other countrys are not supported at the moment due complex adif specs
if ($qso->station_cnty && ($qso->station_dxcc == '291' || $qso->station_dxcc == '006' || $qso->station_dxcc == '110')) {
$county = trim($qso->state) . "," . trim($qso->station_cnty);
} else {
$county = '';
}
// We fill county only if it has a value and it's USA, Alaska, Hawaii or Russia (European or Asiaric). Other countrys are not supported at the moment due complex adif specs
$line .= $this->getAdifFieldLine("MY_CNTY", $county);
if ($qso->station_cnty) {
switch ($qso->station_dxcc) {
case '291':
case '6':
case '110':
$county = trim($qso->state) . "," . trim($qso->station_cnty);
break;
case '54':
case '15':
case '61':
case '126':
case '151':
$county = trim($qso->station_cnty);
break;
default:
$county = '';
}
} else {
$county = '';
}
$line .= $this->getAdifFieldLine("MY_CNTY", $county);
$stationsSig = $qso->station_sig;
// If MY_SIG is WWFF or "" and there's a station_wwff set, use data from station_wwff