[LoTW][Upload] Remaps CA Prov QC to PQ

Thanks to @ve1cwj for reporting issue that LoTW expects PQ rather than QC as the CA Prov 👎
This commit is contained in:
Peter Goodhall
2022-03-15 13:14:03 +00:00
parent 414d2e6460
commit 4a847de5a6
2 changed files with 18 additions and 1 deletions

View File

@@ -921,6 +921,23 @@ class Lotw extends CI_Controller {
return array_search(strtoupper($satname),$arr,true);
}
/*
| Function: lotw_satellite_map
| Requires: OSCAR Satellite name $satname
|
| Outputs if LOTW uses a different satellite name
|
*/
function lotw_ca_province_map($ca_prov) {
switch ($ca_prov):
case "QC":
return "PQ";
break;
default:
return $ca_prov;
endswitch;
}
/*
| Function: mode_map
| Requires: mode as $mode, submode as $submode

View File

@@ -27,7 +27,7 @@ $cert2 = str_replace("-----END CERTIFICATE-----", "", $cert1);
<?php if(isset($station_profile->station_iota)) { ?><IOTA:<?php echo strlen($station_profile->station_iota); ?>><?php echo $station_profile->station_iota; ?><?php } ?>
<?php if($station_profile->state != "" && $station_profile->station_country == "CANADA") { ?><CA_PROVINCE:<?php echo strlen($station_profile->state); ?>><?php echo $station_profile->state; ?><?php } ?>
<?php if($station_profile->state != "" && $station_profile->station_country == "CANADA") { ?><CA_PROVINCE:<?php echo strlen($CI->lotw_ca_province_map($station_profile->state)); ?>><?php echo $CI->lotw_ca_province_map($station_profile->state); ?><?php } ?>
<?php if($station_profile->state != "" && $station_profile->station_country == "UNITED STATES OF AMERICA") { ?><US_STATE:<?php echo strlen($station_profile->state); ?>><?php echo $station_profile->state; ?><?php } ?>