Skip to content

Commit

Permalink
Tag 2.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbug authored Mar 6, 2024
2 parents 7ba9cbf + bac23f0 commit 9273c2c
Show file tree
Hide file tree
Showing 32 changed files with 2,700 additions and 2,355 deletions.
2 changes: 1 addition & 1 deletion application/config/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
|
*/

$config['migration_version'] = 172;
$config['migration_version'] = 173;

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions application/language/bulgarian/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Режим';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Sent';
$lang['gen_hamradio_rst_rcvd'] = 'Recv\'d';
$lang['gen_hamradio_band'] = 'Обхват';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
$lang['gen_hamradio_prefix'] = "前缀";
$lang['gen_hamradio_suffix'] = "后缀";
$lang['gen_hamradio_mode'] = '模式';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_de'] = '本台呼号(De)';
$lang['gen_hamradio_dx'] = '对方呼号(Dx)';
$lang['gen_hamradio_rst_sent'] = '发送 信号报告(RST)';
Expand Down
2 changes: 2 additions & 0 deletions application/language/czech/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Režim';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Odesláno';
$lang['gen_hamradio_rst_rcvd'] = 'Přijato';
$lang['gen_hamradio_band'] = 'Pásmo';
Expand Down
2 changes: 2 additions & 0 deletions application/language/dutch/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Mode';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Verzonden';
$lang['gen_hamradio_rst_rcvd'] = 'Ontvangen';
$lang['gen_hamradio_band'] = 'Band';
Expand Down
2 changes: 2 additions & 0 deletions application/language/english/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Mode';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Sent';
$lang['gen_hamradio_rst_rcvd'] = 'Recv\'d';
$lang['gen_hamradio_band'] = 'Band';
Expand Down
2 changes: 2 additions & 0 deletions application/language/finnish/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Lähetelaji';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Annettu raportti';
$lang['gen_hamradio_rst_rcvd'] = 'Saatu raportti';
$lang['gen_hamradio_band'] = 'Bandi';
Expand Down
2 changes: 2 additions & 0 deletions application/language/french/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = "De";
$lang['gen_hamradio_dx'] = "Dx";
$lang['gen_hamradio_mode'] = "Mode";
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = "Envoyé";
$lang['gen_hamradio_rst_rcvd'] = "Reçu";
$lang['gen_hamradio_band'] = "Bande";
Expand Down
2 changes: 2 additions & 0 deletions application/language/german/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Mode';
$lang['gen_hamradio_ant_az'] = 'Antennenazimut';
$lang['gen_hamradio_ant_el'] = 'Antennenelevation';
$lang['gen_hamradio_rst_sent'] = 'Gegeben';
$lang['gen_hamradio_rst_rcvd'] = 'Erhalten';
$lang['gen_hamradio_band'] = 'Band';
Expand Down
2 changes: 2 additions & 0 deletions application/language/greek/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Τρόπος';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Απεσταλμένα';
$lang['gen_hamradio_rst_rcvd'] = 'Ελήφθη\'d';
$lang['gen_hamradio_band'] = 'Ζώνη';
Expand Down
2 changes: 2 additions & 0 deletions application/language/italian/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Modo';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Inviato';
$lang['gen_hamradio_rst_rcvd'] = 'Ricevuto';
$lang['gen_hamradio_band'] = 'Banda';
Expand Down
2 changes: 2 additions & 0 deletions application/language/polish/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Modulacja';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Wysłany';
$lang['gen_hamradio_rst_rcvd'] = 'Odebrany\'d';
$lang['gen_hamradio_band'] = 'Pasmo';
Expand Down
2 changes: 2 additions & 0 deletions application/language/russian/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
$lang['gen_hamradio_de'] = 'от';
$lang['gen_hamradio_dx'] = 'DX';
$lang['gen_hamradio_mode'] = 'Вид модуляции';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Отправлено';
$lang['gen_hamradio_rst_rcvd'] = 'Получено';
$lang['gen_hamradio_bandgroup'] = "Bandgroup";
Expand Down
2 changes: 2 additions & 0 deletions application/language/spanish/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Modo';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Enviado';
$lang['gen_hamradio_rst_rcvd'] = 'Recibido';
$lang['gen_hamradio_band'] = 'Banda';
Expand Down
2 changes: 2 additions & 0 deletions application/language/swedish/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Mode';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Skickat';
$lang['gen_hamradio_rst_rcvd'] = 'Mottagen\'d';
$lang['gen_hamradio_band'] = 'Band';
Expand Down
2 changes: 2 additions & 0 deletions application/language/turkish/general_words_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
$lang['gen_hamradio_de'] = 'De';
$lang['gen_hamradio_dx'] = 'Dx';
$lang['gen_hamradio_mode'] = 'Mod';
$lang['gen_hamradio_ant_az'] = 'Antenna Azimuth';
$lang['gen_hamradio_ant_el'] = 'Antenna Elevation';
$lang['gen_hamradio_rst_sent'] = 'Gönderilen';
$lang['gen_hamradio_rst_rcvd'] = 'Alınan';
$lang['gen_hamradio_band'] = 'Bant';
Expand Down
56 changes: 53 additions & 3 deletions application/libraries/AdifHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

class AdifHelper {

public function getAdifLine($qso) {
/**
* Generates an ADIF line for a QSO record.
*
* @param object $qso The QSO record.
* @param bool $satellite_remap Flag indicating whether to remap satellite names.
* @return string The ADIF line.
*/
public function getAdifLine($qso, $satellite_remap = false) {
$normalFields = array(
'ADDRESS',
'AGE',
Expand Down Expand Up @@ -80,7 +87,6 @@ public function getAdifLine($qso) {
'RST_SENT',
'RX_PWR',
'SAT_MODE',
'SAT_NAME',
'SFI',
'SILENT_KEY',
'SKCC',
Expand Down Expand Up @@ -183,11 +189,23 @@ public function getAdifLine($qso) {
$line .= $this->getAdifFieldLine("MY_GRIDSQUARE", $qso->station_gridsquare);
}

if($qso->COL_SAT_NAME) {
if($satellite_remap === true) {
$satname = $this->lotw_satellite_map($qso->COL_SAT_NAME);
if($satname) {
$line .= $this->getAdifFieldLine("SAT_NAME", $satname);
} else {
$line .= $this->getAdifFieldLine("SAT_NAME", $qso->COL_SAT_NAME);
}
} else {
$line .= $this->getAdifFieldLine("SAT_NAME", $qso->COL_SAT_NAME);
}
}

$line .= $this->getAdifFieldLine("MY_IOTA", $qso->station_iota);

$line .= $this->getAdifFieldLine("MY_SOTA_REF", $qso->station_sota);


$line .= $this->getAdifFieldLine("MY_POTA_REF", $qso->station_pota);

$line .= $this->getAdifFieldLine("MY_CQ_ZONE", $qso->station_cq);
Expand Down Expand Up @@ -258,4 +276,36 @@ function getAdifFieldLine($adifcolumn, $dbvalue) {
return "";
}
}

/*
| Function: lotw_satellite_map
| Requires: OSCAR Satellite name $satname
|
| Outputs if LoTW uses a different satellite name
|
*/
function lotw_satellite_map($satname) {
$arr = array(
"ARISS" => "ISS",
"UKUBE1" => "UKUBE-1",
"KEDR" => "ARISSAT-1",
"TO-108" => "CAS-6",
"TAURUS" => "TAURUS-1",
"AISAT1" => "AISAT-1",
'UVSQ' => "UVSQ-SAT",
'CAS-3H' => "LILACSAT-2",
'IO-117' => "GREENCUBE",
"TEVEL1" => "TEVEL-1",
"TEVEL2" => "TEVEL-2",
"TEVEL3" => "TEVEL-3",
"TEVEL4" => "TEVEL-4",
"TEVEL5" => "TEVEL-5",
"TEVEL6" => "TEVEL-6",
"TEVEL7" => "TEVEL-7",
"TEVEL8" => "TEVEL-8",
"INSPR7" => "INSPIRE-SAT 7",
);

return array_search(strtoupper($satname),$arr,true);
}
}
30 changes: 30 additions & 0 deletions application/migrations/173_tag_2_6_6.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

/*
* Tag Cloudlog as 2.6.6
*/

class Migration_tag_2_6_6 extends CI_Migration {

public function up()
{

// Tag Cloudlog 2.6.3
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '2.6.6'));

// Trigger Version Info Dialog
$this->db->where('option_type', 'version_dialog');
$this->db->where('option_name', 'confirmed');
$this->db->update('user_options', array('option_value' => 'false'));

}

public function down()
{
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '2.6.5'));
}
}
24 changes: 17 additions & 7 deletions application/models/Logbook_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -2984,8 +2984,9 @@ function delete($id)
}

/* Used to check if the qso is already in the database */
function import_check($datetime, $callsign, $band, $mode, $station_callsign, $station_id = null) {
$mode=$this->get_main_mode_from_mode($mode);
function import_check($datetime, $callsign, $band, $mode, $station_callsign, $station_id = null)
{
$mode = $this->get_main_mode_from_mode($mode);

$this->db->select('COL_PRIMARY_KEY, COL_TIME_ON, COL_CALL, COL_BAND');
$this->db->where('COL_TIME_ON >= DATE_ADD(DATE_FORMAT("' . $datetime . '", \'%Y-%m-%d %H:%i\' ), INTERVAL -15 MINUTE )');
Expand All @@ -2995,8 +2996,8 @@ function import_check($datetime, $callsign, $band, $mode, $station_callsign, $st
$this->db->where('COL_BAND', $band);
$this->db->where('COL_MODE', $mode);

if(isset($station_id) && $station_id > 0) {
$this->db->where('station_id', $station_id);
if (isset($station_id) && $station_id > 0) {
$this->db->where('station_id', $station_id);
}

$query = $this->db->get($this->config->item('table_name'));
Expand Down Expand Up @@ -3412,8 +3413,15 @@ function import($record, $station_id = "0", $skipDuplicate = false, $markClublog
// Check if RX_PWR is "K" which N1MM+ uses to indicate 1000W
if ($record['rx_pwr'] == "K") {
$rx_pwr = 1000;
} elseif ($record['rx_pwr'] == "KW") {
$rx_pwr = 1000;
} else {
$rx_pwr = filter_var($record['rx_pwr'], FILTER_VALIDATE_FLOAT);
if (isset($record['rx_pwr']) && is_numeric($record['rx_pwr'])) {
$rx_pwr = $record['rx_pwr'];
} else {
$rx_pwr = null;
$my_error .= "Error QSO: Date: " . $time_on . " Callsign: " . $record['call'] . " RX_PWR (".$record['rx_pwr'].") is not a number<br>";
}
}
} else {
$rx_pwr = NULL;
Expand All @@ -3432,13 +3440,15 @@ function import($record, $station_id = "0", $skipDuplicate = false, $markClublog
}

if (isset($record['ant_az'])) {
$input_ant_az = filter_var($record['ant_az'], FILTER_SANITIZE_NUMBER_INT);
$input_ant_az = filter_var($record['ant_az'], FILTER_VALIDATE_FLOAT);
$input_ant_az = fmod($input_ant_az, 360);
} else {
$input_ant_az = NULL;
}

if (isset($record['ant_el'])) {
$input_ant_el = filter_var($record['ant_el'], FILTER_SANITIZE_NUMBER_INT);
$input_ant_el = filter_var($record['ant_el'], FILTER_VALIDATE_FLOAT);
$input_ant_el = fmod($input_ant_el, 90);
} else {
$input_ant_el = NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion application/views/adif/data/clublog.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
$CI->load->library('AdifHelper');

foreach ($qsos->result() as $qso) {
echo $CI->adifhelper->getAdifLine($qso);
echo $CI->adifhelper->getAdifLine($qso, $satellite_remap = true);
}
10 changes: 5 additions & 5 deletions application/views/components/upcoming_dxccs.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<table class="table table-striped border-top">
<table id="upcoming_dxccs_component" class="table table-striped border-top">
<tr class="titles">
<td colspan="3"><i class="fas fa-chart-bar"></i> DXPeditions (This Week)</td>
</tr>

<?php
foreach ($thisWeekRecords as $record) {
$color = $record['workedBefore'] == 1 ? '#ddffdd' : '#ffdddd';
$name = $record['workedBefore'] == 1 ? 'worked_before' : 'not_worked_before';
echo '<tr>';
echo '<td style="background-color: ' . $color . ';" width="33%">' . $record['daysLeft'] . '</td>'; // Date
echo '<td style="background-color: ' . $color . ';" width="33%">' . '<a href="#" data-bs-toggle="tooltip" data-bs-title="'.$record['6'].'">'.$record['callsign'] . '</a>'. '</td>'; // Callsign
echo '<td style="background-color: ' . $color . ';" width="33%">' . $record['2'] . '</td>'; // Country
echo '<td id="' . $name . '">' . $record['daysLeft'] . '</td>'; // Date
echo '<td id="' . $name . '">' . '<a target="_blank" href="https://dxheat.com/db/'.$record['callsign'].'" data-bs-toggle="tooltip" data-bs-title="'.$record['6'].'">'.$record['callsign'] . '</a>'. '</td>'; // Callsign
echo '<td id="' . $name . '">' . $record['2'] . '</td>'; // Country
echo '</tr>';
}
?>
Expand Down
Loading

0 comments on commit 9273c2c

Please sign in to comment.