[ADIF][Import] If RX PWR field is set to "K" convert it to 1000
N1MM+ seems to put K into the power rx power field for contests instead of converting it.
这个提交包含在:
父节点
54f6ff9e4c
当前提交
334aacbe94
共有 1 个文件被更改,包括 13 次插入 和 1 次删除
|
|
@ -2252,6 +2252,18 @@ class Logbook_model extends CI_Model {
|
|||
$tx_pwr = NULL;
|
||||
}
|
||||
|
||||
// Sanitise RX Power
|
||||
if (isset($record['rx_pwr'])){
|
||||
// Check if RX_PWR is "K" which N1MM+ uses to indicate 1000W
|
||||
if($record['rx_pwr'] == "K") {
|
||||
$rx_pwr = 1000;
|
||||
} else {
|
||||
$rx_pwr = filter_var($record['rx_pwr'],FILTER_VALIDATE_FLOAT);
|
||||
}
|
||||
}else{
|
||||
$rx_pwr = NULL;
|
||||
}
|
||||
|
||||
if (isset($record['a_index'])){
|
||||
$input_a_index = filter_var($record['a_index'],FILTER_SANITIZE_NUMBER_INT);
|
||||
} else {
|
||||
|
|
@ -2567,7 +2579,7 @@ class Logbook_model extends CI_Model {
|
|||
'COL_RIG_INTL' => (!empty($record['rig_intl'])) ? $record['rig_intl'] : '',
|
||||
'COL_RST_RCVD' => $rst_rx,
|
||||
'COL_RST_SENT' => $rst_tx,
|
||||
'COL_RX_PWR' => (!empty($record['rx_pwr'])) ? $record['rx_pwr'] : null,
|
||||
'COL_RX_PWR' => $rx_pwr,
|
||||
'COL_SAT_MODE' => (!empty($record['sat_mode'])) ? $record['sat_mode'] : '',
|
||||
'COL_SAT_NAME' => (!empty($record['sat_name'])) ? $record['sat_name'] : '',
|
||||
'COL_SFI' => (!empty($record['sfi'])) ? $record['sfi'] : null,
|
||||
|
|
|
|||
正在加载…
在新工单中引用