give the possibility to include the grid in the cabrillo

This commit is contained in:
HB9HIL
2024-11-13 00:06:32 +01:00
parent 410e45249a
commit fefc7798ae
4 changed files with 19 additions and 3 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) {
@@ -123,7 +123,7 @@ class Cabrilloformat {
// 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") {
@@ -146,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 ." ";
}
@@ -155,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 ." ";