diff --git a/application/models/Satellite_model.php b/application/models/Satellite_model.php index 899ce0ad7..527fd700b 100644 --- a/application/models/Satellite_model.php +++ b/application/models/Satellite_model.php @@ -28,7 +28,7 @@ class Satellite_model extends CI_Model { } function get_all_satellites_with_tle() { - $sql = "select satellite.id, satellite.name as satname, tle.tle + $sql = "select satellite.id, satellite.name as satname, satellite.displayname as displayname, tle.tle from satellite join tle on satellite.id = tle.satelliteid order by satellite.name @@ -189,7 +189,7 @@ class Satellite_model extends CI_Model { } function get_tle($sat) { - $this->db->select('satellite.name AS satellite, tle.tle, tle.updated'); + $this->db->select('satellite.name AS satellite, satellite.displayname AS displayname, tle.tle, tle.updated'); $this->db->join('tle', 'satellite.id = tle.satelliteid'); $this->db->where('name', $sat); $query = $this->db->get('satellite'); diff --git a/application/views/satellite/flightpath.php b/application/views/satellite/flightpath.php index d331489ec..aad4b619a 100644 --- a/application/views/satellite/flightpath.php +++ b/application/views/satellite/flightpath.php @@ -42,7 +42,7 @@ satname . '"'; if ($sat->satname == $selsat) { echo ' selected'; } - echo '>' . $sat->satname . ''."\n"; + echo '>' . ($sat->satname != null ? ($sat->satname.' ('.$sat->displayname.')') : $sat->displayname). ''."\n"; } ?> diff --git a/assets/js/sections/flightpath.js b/assets/js/sections/flightpath.js index 6289fc1a9..3e6cfaebc 100644 --- a/assets/js/sections/flightpath.js +++ b/assets/js/sections/flightpath.js @@ -695,7 +695,7 @@ function getBearing(lat1, lng1, lat2, lng2) { } function start(data) { - init(data.satellite); + init((data.satellite != '' ? (data.satellite+' ('+data.displayname+')') : data.displayname)); initSats(parseTle(data.tle)); } @@ -726,7 +726,7 @@ function plot_sat() { }, success: function (data) { sats.start(data); - $("#satname").html($("#sats").val()); + $("#satname").html($("#sats :selected").text()); }, error: function (data) { alert('Something went wrong!');