Merge remote-tracking branch 'upstream/dev' into pr/HB9HIL/1165

This commit is contained in:
HB9HIL
2024-11-17 16:00:55 +01:00
50 changed files with 5847 additions and 5203 deletions

View File

@@ -62,7 +62,7 @@ class Cabrilloformat {
return "END-OF-LOG:";
}
public function qso($qso) {
public function qso($qso, $grid_export) {
$freq = substr($qso->COL_FREQ, 0, -3);
if ($freq > 30000) {
if ($freq > 250000000) {
@@ -121,12 +121,19 @@ class Cabrilloformat {
}
}
if($qso->COL_MODE == "SSB") {
// based on the official cabrillo documentation
// https://wwrof.org/cabrillo/cabrillo-qso-data/
if($qso->COL_MODE == "CW") {
$mode = "CW";
} elseif($qso->COL_MODE == "SSB" || $qso->COL_MODE == "AM") {
$mode = "PH";
} elseif($qso->COL_MODE == "FM") {
$mode = "FM";
} elseif($qso->COL_MODE == "RTTY") {
$mode = "RY";
} else {
$mode = $qso->COL_MODE;
$mode = "DG";
}
$time = substr($qso->COL_TIME_ON, 0, -3);
@@ -139,6 +146,10 @@ class Cabrilloformat {
$returnstring .= sprintf("%-6s", sprintf("%03d", $qso->COL_STX)) ." ";
}
if ($grid_export == true) {
$returnstring .= substr($qso->station_gridsquare, 0, 4) ?? '' ." ";
}
if ($qso->COL_STX_STRING != "") {
$returnstring .= $qso->COL_STX_STRING ." ";
}
@@ -148,6 +159,10 @@ class Cabrilloformat {
if ($qso->COL_SRX != NULL) {
$returnstring .= sprintf("%-6s", sprintf("%03d", $qso->COL_SRX)) ." ";
}
if ($grid_export == true) {
$returnstring .= substr($qso->COL_GRIDSQUARE, 0, 4) ?? '' ." ";
}
if ($qso->COL_SRX_STRING != "") {
$returnstring .= $qso->COL_SRX_STRING ." ";