Fixed double TLE loading in controller

This commit is contained in:
Andreas Kristiansen
2024-12-09 13:00:15 +01:00
parent 07da7b2e24
commit ebdd86220e
2 changed files with 6 additions and 6 deletions

View File

@@ -337,21 +337,18 @@ class Satellite extends CI_Controller {
$custom_date_format = $this->config->item('qso_date_format');
}
$format = $custom_date_format . ' H:i:s';
$data['format'] = $custom_date_format . ' H:i:s';
$data['filtered'] = $filtered;
$data['zone'] = $timezone;
$data['format'] = $format;
return $data;
}
function calcSkedPass($sat_tle) {
function calcSkedPass($tle) {
if(!$this->user_model->authorize(3)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
$tle = $this->get_tle_for_predict();
$yourgrid = $this->security->xss_clean($this->input->post('yourgrid'));
$altitude = $this->security->xss_clean($this->input->post('altitude'));
$date = $this->security->xss_clean($this->input->post('date'));
@@ -380,6 +377,8 @@ class Satellite extends CI_Controller {
$data['zone'] = $timezone;
$data['yourgrid'] = $yourgrid;
$data['skedgrid'] = $skedgrid;
$data['date'] = $date;
$data['custom_date_format'] = $custom_date_format;
$this->load->view('satellite/skedtable', $data);
}

View File

@@ -71,10 +71,11 @@ foreach ($overlaps as $overlap) {
$skedAOS = $overlap['grid1']->visible_aos < $overlap['grid2']->visible_aos ? $overlap['grid2']->visible_aos : $overlap['grid1']->visible_aos;
$skedLOS = $overlap['grid1']->visible_los < $overlap['grid2']->visible_los ? $overlap['grid1']->visible_los : $overlap['grid2']->visible_los;
$timestamp = strtotime($date);
echo '<tr>';
echo "<td>". $satellite . "</td>";
echo "<td></td>";
echo "<td>" . date($custom_date_format, $timestamp) . "</td>";
echo "<td>" . Predict_Time::daynum2readable($skedAOS, $zone, $format) . "</td>";
echo "<td>" . Predict_Time::daynum2readable($skedLOS, $zone, $format) . "</td>";
echo "<td>" . returntimediff(Predict_Time::daynum2readable($skedAOS, $zone, $format), Predict_Time::daynum2readable($skedLOS, $zone, $format), $format) . "</td>";