Add satellite to IOTA timeline (though not supported by IOTA)

This commit is contained in:
phl0
2026-02-19 15:11:07 +01:00
parent f3f92bd540
commit df1a7f9b00
2 changed files with 19 additions and 8 deletions

View File

@@ -186,8 +186,11 @@ class Timeline_model extends CI_Model {
public function get_timeline_iota($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) {
$binding = [];
$sql = "select min(date(COL_TIME_ON)) date, col_iota, name, prefix from "
.$this->config->item('table_name'). " thcv
$sql = "SELECT * FROM (";
$sql .= "SELECT COL_TIME_ON AS date, col_iota, name, prefix, ";
$sql .= "COL_SAT_NAME AS sat_name, ";
$sql .= "ROW_NUMBER() OVER (PARTITION BY col_iota ORDER BY COL_TIME_ON ASC) AS rn ";
$sql .= "FROM ".$this->config->item('table_name'). " thcv
join iota on thcv.col_iota = iota.tag
where station_id in (" . $location_list . ")";
@@ -225,8 +228,10 @@ class Timeline_model extends CI_Model {
$sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz);
$sql .= " and col_iota <> '' group by col_iota, name, prefix
order by date desc";
$sql .= " and col_iota <> ''";
$sql .= ") ranked ";
$sql .= "WHERE rn = 1 ";
$sql .= "ORDER BY date DESC;";
$query = $this->db->query($sql, $binding);

View File

@@ -312,8 +312,11 @@ function write_iota_timeline($timeline_array, $custom_date_format, $bandselect,
<td>'.__("Date").'</td>
<td>'.__("IOTA").'</td>
<td>'.__("Name").'</td>
<td>'.__("Prefix").'</td>
<td>'.__("Show QSOs").'</td>
<td>'.__("Prefix").'</td>';
if ($propmode == 'SAT' || $propmode == 'All') {
echo ' <td>'.__("Satellite").'</td>';
}
echo ' <td>'.__("Show QSOs").'</td>
</tr>
</thead>
<tbody>';
@@ -326,8 +329,11 @@ function write_iota_timeline($timeline_array, $custom_date_format, $bandselect,
<td>' . date($custom_date_format, $date_as_timestamp) . '</td>
<td>' . $line->col_iota . '</td>
<td>' . $line->name . '</td>
<td>' . $line->prefix . '</td>
<td><a href=javascript:displayTimelineContacts("' . $line->col_iota . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").'</a></td>
<td>' . $line->prefix . '</td>';
if ($propmode == 'SAT' || $propmode == 'All') {
echo '<td>' . $line->sat_name . '</td>';
}
echo ' <td><a href=javascript:displayTimelineContacts("' . $line->col_iota . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").'</a></td>
</tr>';
}
echo '</tfoot></table></div>';