diff --git a/application/config/migration.php b/application/config/migration.php index f0527720d..4b866b010 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 213; +$config['migration_version'] = 214; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Satellite.php b/application/controllers/Satellite.php index ef49f6ce0..1c94fd5f1 100644 --- a/application/controllers/Satellite.php +++ b/application/controllers/Satellite.php @@ -138,4 +138,135 @@ class Satellite extends CI_Controller { echo json_encode($sat_list, JSON_FORCE_OBJECT); } + public function flightpath() { + $this->load->model('satellite_model'); + $this->load->model('stations'); + + $pageData['satellites'] = $this->satellite_model->get_all_satellites_with_tle(); + + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/satellite.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/satellite.js")), + 'assets/js/sections/three-orbit-controls.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/three-orbit-controls.js")), + 'assets/js/sections/satellite_functions.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/satellite_functions.js")), + 'assets/js/sections/flightpath.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/flightpath.js")), + ]; + + $homegrid = explode(',', $this->stations->find_gridsquare()); + + $this->load->library('Qra'); + $pageData['latlng'] = $this->qra->qra2latlong($homegrid[0]); + + // Render Page + $pageData['page_title'] = "Satellite Flightpath"; + $this->load->view('interface_assets/header', $pageData); + $this->load->view('satellite/flightpath'); + $this->load->view('interface_assets/footer', $footerData); + } + + public function get_tle() { + $sat = $this->security->xss_clean($this->input->post('sat')); + $this->load->model('satellite_model'); + $satellite_data = $this->satellite_model->get_tle($sat); + + header('Content-Type: application/json'); + echo json_encode($satellite_data, JSON_FORCE_OBJECT); + } + + public function pass() { + $this->load->model('satellite_model'); + $this->load->model('stations'); + $active_station_id = $this->stations->find_active(); + $pageData['activegrid'] = $this->stations->gridsquare_from_station($active_station_id); + + $pageData['satellites'] = $this->satellite_model->get_all_satellites_with_tle(); + + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/satpasses.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/satpasses.js")), + ]; + + // Render Page + $pageData['page_title'] = "Satellite pass"; + $this->load->view('interface_assets/header', $pageData); + $this->load->view('satellite/pass'); + $this->load->view('interface_assets/footer', $footerData); + } + + public function searchpasses() { + try { + $result = $this->get_tle_for_predict(); + $this->calcpass($result); + } + catch (Exception $e) { + header("Content-type: application/json"); + echo json_encode(['ok' => 'Error', 'message' => $e->getMessage() . $e->getCode()]); + } + } + + public function get_tle_for_predict() { + $sat = $this->security->xss_clean($this->input->post('sat')); + $this->load->model('satellite_model'); + return $this->satellite_model->get_tle($sat); + } + + function calcpass($sat_tle) { + require_once realpath(__DIR__ . "/../../predict/Predict.php"); + require_once realpath(__DIR__ . "/../../predict/Predict/Sat.php"); + require_once realpath(__DIR__ . "/../../predict/Predict/QTH.php"); + require_once realpath(__DIR__ . "/../../predict/Predict/Time.php"); + require_once realpath(__DIR__ . "/../../predict/Predict/TLE.php"); + + // The observer or groundstation is called QTH in ham radio terms + $predict = new Predict(); + $qth = new Predict_QTH(); + $qth->alt = $this->security->xss_clean($this->input->post('altitude')); // Altitude in meters + + $strQRA = $this->security->xss_clean($this->input->post('yourgrid')); + + if ((strlen($strQRA) % 2 == 0) && (strlen($strQRA) <= 10)) { // Check if QRA is EVEN (the % 2 does that) and smaller/equal 8 + $strQRA = strtoupper($strQRA); + if (strlen($strQRA) == 4) $strQRA .= "LL"; // Only 4 Chars? Fill with center "LL" as only A-R allowed + if (strlen($strQRA) == 6) $strQRA .= "55"; // Only 6 Chars? Fill with center "55" + if (strlen($strQRA) == 8) $strQRA .= "LL"; // Only 8 Chars? Fill with center "LL" as only A-R allowed + + if (!preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}[0-9]{2}[A-X]{2}$/', $strQRA)) { + return false; + } + } + + if(!$this->load->is_loaded('Qra')) { + $this->load->library('Qra'); + } + $homecoordinates = $this->qra->qra2latlong($this->security->xss_clean($this->input->post('yourgrid'))); + + $qth->lat = $homecoordinates[0]; + $qth->lon = $homecoordinates[1]; + + $temp = preg_split('/\n/', $sat_tle->tle); + + $tle = new Predict_TLE($sat_tle->satellite, $temp[0], $temp[1]); // Instantiate it + $sat = new Predict_Sat($tle); // Load up the satellite data + + $now = Predict_Time::get_current_daynum(); // get the current time as Julian Date (daynum) + + // You can modify some preferences in Predict(), the defaults are below + // + $predict->minEle = intval($this->security->xss_clean($this->input->post('minelevation'))); // Minimum elevation for a pass + $predict->timeRes = 1; // Pass details: time resolution in seconds + $predict->numEntries = 20; // Pass details: number of entries per pass + // $predict->threshold = -6; // Twilight threshold (sun must be at this lat or lower) + + // Get the passes and filter visible only, takes about 4 seconds for 10 days + $results = $predict->get_passes($sat, $qth, $now, 1); + $filtered = $predict->filterVisiblePasses($results); + + $zone = $this->security->xss_clean($this->input->post('timezone')); + $format = 'm-d-Y H:i:s'; // Time format from PHP's date() function + + $data['filtered'] = $filtered; + $data['zone'] = $zone; + $data['format'] = $format; + $this->load->view('satellite/passtable', $data); + } } diff --git a/application/controllers/Update.php b/application/controllers/Update.php index a1537ef69..8c1ba2ca9 100644 --- a/application/controllers/Update.php +++ b/application/controllers/Update.php @@ -372,5 +372,60 @@ class Update extends CI_Controller { } + public function update_tle() { + $mtime = microtime(); + $mtime = explode(" ",$mtime); + $mtime = $mtime[1] + $mtime[0]; + $starttime = $mtime; + + $url = 'https://www.amsat.org/tle/dailytle.txt'; + $curl = curl_init($url); + + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + + $response = curl_exec($curl); + + $count = 0; + + if ($response === false) { + echo 'Error: ' . curl_error($curl); + } else { + $this->db->empty_table("tle"); + // Split the response into an array of lines + $lines = explode("\n", $response); + + $satname = ''; + $tleline1 = ''; + $tleline2 = ''; + // Process each line + for ($i = 0; $i < count($lines); $i += 3) { + $count++; + // Check if there are at least three lines remaining + if (isset($lines[$i], $lines[$i + 1], $lines[$i + 2])) { + // Get the three lines + $satname = $lines[$i]; + $tleline1 = $lines[$i + 1]; + $tleline2 = $lines[$i + 2]; + $sql = "INSERT INTO tle (satelliteid, tle) select id, ? from satellite where name = ? or exportname = ?"; + $this->db->query($sql,array($tleline1."\n".$tleline2,$satname,$satname)); + } + } + } + + curl_close($curl); + + $mtime = microtime(); + $mtime = explode(" ",$mtime); + $mtime = $mtime[1] + $mtime[0]; + $endtime = $mtime; + $totaltime = ($endtime - $starttime); + echo "This page was created in ".$totaltime." seconds
"; + echo "Records inserted: " . $count . "
"; + $datetime = new DateTime("now", new DateTimeZone('UTC')); + $datetime = $datetime->format('Ymd h:i'); + $this->optionslib->update('tle_update', $datetime , 'no'); + } + } ?> diff --git a/application/locale/bg_BG/LC_MESSAGES/messages.po b/application/locale/bg_BG/LC_MESSAGES/messages.po index 5731eebae..0ab23d871 100644 --- a/application/locale/bg_BG/LC_MESSAGES/messages.po +++ b/application/locale/bg_BG/LC_MESSAGES/messages.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-08-06 18:03+0000\n" +"POT-Creation-Date: 2024-08-08 14:50+0000\n" "PO-Revision-Date: 2024-07-09 13:25+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Bulgarian \n" "Language-Team: Czech \n" -"Language-Team: German \n" +"Language-Team: German \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -84,7 +84,7 @@ msgid "ADIF Export" msgstr "ADIF Export" #: application/controllers/Adif.php:145 -#: application/views/interface_assets/header.php:378 +#: application/views/interface_assets/header.php:384 msgid "ADIF Import / Export" msgstr "ADIF Import / Export" @@ -404,7 +404,7 @@ msgid "ITU Zones" msgstr "ITU-Zonen" #: application/controllers/Backup.php:15 application/views/backup/main.php:14 -#: application/views/interface_assets/header.php:274 +#: application/views/interface_assets/header.php:280 msgid "Backup" msgstr "Backup" @@ -418,7 +418,7 @@ msgstr "Notizen - Backup" #: application/controllers/Band.php:25 application/views/bands/index.php:28 #: application/views/bands/index.php:32 -#: application/views/interface_assets/header.php:373 +#: application/views/interface_assets/header.php:379 #: application/views/statistics/index.php:16 #: application/views/statistics/index.php:56 msgid "Bands" @@ -445,7 +445,7 @@ msgid "Export Cabrillo" msgstr "Cabrillo-Export" #: application/controllers/Cfdexport.php:20 -#: application/views/interface_assets/header.php:390 +#: application/views/interface_assets/header.php:396 msgid "CFD Export" msgstr "CFD-Export" @@ -472,7 +472,7 @@ msgid "Contest Logging" msgstr "Contest-Logging" #: application/controllers/Contesting.php:111 -#: application/views/interface_assets/header.php:268 +#: application/views/interface_assets/header.php:274 msgid "Contests" msgstr "Conteste" @@ -488,7 +488,7 @@ msgid "Continents" msgstr "Kontinente" #: application/controllers/Cron.php:38 -#: application/views/interface_assets/header.php:278 +#: application/views/interface_assets/header.php:284 msgid "Cron Manager" msgstr "Cron-Manager" @@ -497,7 +497,7 @@ msgid "Edit Cronjob" msgstr "Bearbeite Cronjob" #: application/controllers/Csv.php:20 application/views/csv/index.php:3 -#: application/views/interface_assets/header.php:386 +#: application/views/interface_assets/header.php:392 msgid "SOTA CSV Export" msgstr "SOTA CSV-Export" @@ -569,7 +569,7 @@ msgid "and band" msgstr "und Band" #: application/controllers/Dxatlas.php:19 -#: application/views/interface_assets/header.php:384 +#: application/views/interface_assets/header.php:390 msgid "DX Atlas Gridsquare Export" msgstr "DX-Atlas Planquadrat-Export" @@ -639,7 +639,7 @@ msgid "No QSOs found to upload." msgstr "Keine QSOs zum hochladen gefunden." #: application/controllers/Kmlexport.php:24 -#: application/views/interface_assets/header.php:382 +#: application/views/interface_assets/header.php:388 #: application/views/kml/index.php:3 msgid "KML Export" msgstr "KML-Export" @@ -1327,7 +1327,7 @@ msgstr "Schnellsuche" #: application/controllers/Lotw.php:54 application/controllers/Lotw.php:83 #: application/controllers/Lotw.php:125 application/views/adif/import.php:27 -#: application/views/interface_assets/header.php:417 +#: application/views/interface_assets/header.php:423 #: application/views/lotw/import.php:3 #: application/views/lotw_views/index.php:12 #: application/views/lotw_views/upload_cert.php:3 @@ -1356,7 +1356,7 @@ msgid "LoTW .TQ8 Not Sent" msgstr "LoTW .TQ8 nicht gesendet" #: application/controllers/Mode.php:25 -#: application/views/interface_assets/header.php:266 +#: application/views/interface_assets/header.php:272 #: application/views/mode/index.php:15 msgid "Modes" msgstr "Modes" @@ -1508,7 +1508,7 @@ msgid "Log Search & OQRS" msgstr "Logsuche & OQRS" #: application/controllers/Oqrs.php:104 -#: application/views/interface_assets/header.php:407 +#: application/views/interface_assets/header.php:413 msgid "OQRS Requests" msgstr "OQRS-Anforderungen" @@ -1517,7 +1517,7 @@ msgid "QRB Calculator" msgstr "QRB-Rechner" #: application/controllers/Qrz.php:173 -#: application/views/interface_assets/header.php:420 +#: application/views/interface_assets/header.php:426 msgid "QRZ Logbook" msgstr "QRZ-Logbuch" @@ -1553,7 +1553,7 @@ msgid "Add QSO" msgstr "Logge QSO" #: application/controllers/Radio.php:18 -#: application/views/interface_assets/header.php:426 +#: application/views/interface_assets/header.php:432 msgid "Hardware Interfaces" msgstr "Hardware-Schnittstellen" @@ -1589,8 +1589,8 @@ msgstr "Satelliten-Timer" #: application/controllers/Search.php:19 #: application/views/continents/index.php:49 -#: application/views/interface_assets/header.php:330 -#: application/views/interface_assets/header.php:337 +#: application/views/interface_assets/header.php:336 +#: application/views/interface_assets/header.php:343 #: application/views/logbookadvanced/index.php:511 #: application/views/oqrs/index.php:28 #: application/views/oqrs/showrequests.php:67 @@ -1656,8 +1656,8 @@ msgid "Duplicate Station Location:" msgstr "Doppelter Stationsstandort:" #: application/controllers/Stationsetup.php:35 -#: application/views/interface_assets/header.php:371 -#: application/views/interface_assets/header.php:482 +#: application/views/interface_assets/header.php:377 +#: application/views/interface_assets/header.php:488 msgid "Station Setup" msgstr "Stationssetup" @@ -1721,7 +1721,7 @@ msgid "Set as Active Logbook" msgstr "Setze als aktives Logbuch" #: application/controllers/Stationsetup.php:263 -#: application/views/interface_assets/header.php:480 +#: application/views/interface_assets/header.php:486 #: application/views/stationsetup/stationsetup.php:46 #: application/views/view_log/index.php:4 msgid "Active Logbook" @@ -1880,7 +1880,7 @@ msgid "QSL Statistics" msgstr "QSL-Statistiken" #: application/controllers/Themes.php:27 -#: application/views/interface_assets/header.php:272 +#: application/views/interface_assets/header.php:278 msgid "Themes" msgstr "Themes" @@ -1941,7 +1941,7 @@ msgid "Dxcc Prefixes:" msgstr "DXCC-Präfixe:" #: application/controllers/User.php:12 -#: application/views/interface_assets/header.php:262 +#: application/views/interface_assets/header.php:268 msgid "User Accounts" msgstr "Benutzerkonten" @@ -1983,7 +1983,7 @@ msgid "Login failed. Try again." msgstr "Login fehlgeschlagen. Bitte erneut versuchen." #: application/controllers/User.php:860 -#: application/views/interface_assets/header.php:350 +#: application/views/interface_assets/header.php:356 #: application/views/user/login.php:89 #: application/views/visitor/layout/header.php:88 msgid "Login" @@ -2069,7 +2069,7 @@ msgstr "Karte exportieren" #: application/controllers/Webadif.php:90 #: application/controllers/Webadif.php:137 -#: application/views/interface_assets/header.php:421 +#: application/views/interface_assets/header.php:427 msgid "QO-100 Dx Club Upload" msgstr "QO-100 DX Club Upload" @@ -2360,6 +2360,7 @@ msgstr "Anzeigen" #: application/views/gridmap/index.php:25 application/views/hamsat/index.php:32 #: application/views/logbookadvanced/edit.php:16 #: application/views/logbookadvanced/index.php:192 +#: application/views/satellite/flightpath.php:34 #: application/views/sattimers/index.php:38 #: application/views/statistics/index.php:112 msgid "Satellite" @@ -2401,6 +2402,7 @@ msgstr "QRZ.com" #: application/views/activated_gridmap/index.php:86 #: application/views/gridmap/index.php:130 +#: application/views/satellite/flightpath.php:42 msgid "Plot" msgstr "Kartieren" @@ -2972,7 +2974,7 @@ msgid "Save" msgstr "Speichern" #: application/views/api/help.php:14 -#: application/views/interface_assets/header.php:425 +#: application/views/interface_assets/header.php:431 msgid "API Keys" msgstr "API-Schlüssel" @@ -4743,7 +4745,7 @@ msgstr "ADIF-Name" #: application/views/contesting/add.php:44 #: application/views/contesting/edit.php:43 #: application/views/contesting/edit.php:46 -#: application/views/interface_assets/header.php:460 +#: application/views/interface_assets/header.php:466 #: application/views/mode/create.php:46 application/views/mode/create.php:48 #: application/views/mode/edit.php:57 application/views/mode/edit.php:60 #: application/views/mode/index.php:43 @@ -6310,7 +6312,7 @@ msgstr "" "Ausbreitungsart wird von LotW nicht unterstützt. LoTW QSL-Felder deaktiviert." #: application/views/interface_assets/footer.php:127 -#: application/views/interface_assets/header.php:428 +#: application/views/interface_assets/header.php:434 #: application/views/options/sidebar.php:11 msgid "Version Info" msgstr "Versionsinfo" @@ -6569,17 +6571,25 @@ msgstr "Bandmap" msgid "SAT Timers" msgstr "SAT Timer" -#: application/views/interface_assets/header.php:259 +#: application/views/interface_assets/header.php:256 +msgid "Satellite Flightpath" +msgstr "" + +#: application/views/interface_assets/header.php:258 +msgid "Satellite Pass" +msgstr "" + +#: application/views/interface_assets/header.php:265 #: application/views/station_profile/index.php:33 #: application/views/stationsetup/stationsetup.php:113 msgid "Admin" msgstr "Admin" -#: application/views/interface_assets/header.php:264 +#: application/views/interface_assets/header.php:270 msgid "Global Options" msgstr "Globale Optionen" -#: application/views/interface_assets/header.php:270 +#: application/views/interface_assets/header.php:276 #: application/views/notes/add.php:38 application/views/notes/edit.php:39 #: application/views/satellite/index.php:11 #: application/views/statistics/custom.php:20 @@ -6589,79 +6599,79 @@ msgstr "Globale Optionen" msgid "Satellites" msgstr "Satelliten" -#: application/views/interface_assets/header.php:276 +#: application/views/interface_assets/header.php:282 msgid "Update Country Files" msgstr "Länderdaten aktualisieren" -#: application/views/interface_assets/header.php:280 +#: application/views/interface_assets/header.php:286 msgid "Debug Information" msgstr "Debug Informationen" -#: application/views/interface_assets/header.php:327 +#: application/views/interface_assets/header.php:333 msgid "Add/Search Callsign" msgstr "Logge/Suche Call" -#: application/views/interface_assets/header.php:329 +#: application/views/interface_assets/header.php:335 msgid "Log" msgstr "Logge" -#: application/views/interface_assets/header.php:336 +#: application/views/interface_assets/header.php:342 #: application/views/logbookadvanced/index.php:447 #: application/views/oqrs/index.php:27 application/views/user/edit.php:441 #: application/views/visitor/layout/header.php:97 msgid "Search Callsign" msgstr "Suche Rufzeichen" -#: application/views/interface_assets/header.php:365 +#: application/views/interface_assets/header.php:371 #: application/views/user/edit.php:49 msgid "Account" msgstr "Benutzerkonto" -#: application/views/interface_assets/header.php:380 +#: application/views/interface_assets/header.php:386 msgid "Other Export Options" msgstr "Andere Export-Optionen" -#: application/views/interface_assets/header.php:388 +#: application/views/interface_assets/header.php:394 msgid "Cabrillo Export" msgstr "Cabrillo Export" -#: application/views/interface_assets/header.php:412 +#: application/views/interface_assets/header.php:418 msgid "QSL Queue" msgstr "QSL-Warteschlange" -#: application/views/interface_assets/header.php:413 +#: application/views/interface_assets/header.php:419 msgid "Labels" msgstr "Etiketten" -#: application/views/interface_assets/header.php:415 +#: application/views/interface_assets/header.php:421 msgid "Third-Party Services" msgstr "Drittanbieter-Dienste" -#: application/views/interface_assets/header.php:418 +#: application/views/interface_assets/header.php:424 msgid "eQSL Import / Export" msgstr "eQSL Import/Export" -#: application/views/interface_assets/header.php:419 +#: application/views/interface_assets/header.php:425 msgid "HRDLog Logbook" msgstr "HRDLog Logbuch" -#: application/views/interface_assets/header.php:429 +#: application/views/interface_assets/header.php:435 msgid "Help" msgstr "Hilfe" -#: application/views/interface_assets/header.php:430 +#: application/views/interface_assets/header.php:436 msgid "Forum" msgstr "Forum" -#: application/views/interface_assets/header.php:432 +#: application/views/interface_assets/header.php:438 msgid "Logout" msgstr "Ausloggen" -#: application/views/interface_assets/header.php:440 +#: application/views/interface_assets/header.php:446 msgid "Select a Location" msgstr "Wähle einen Stationsstandort" -#: application/views/interface_assets/header.php:519 +#: application/views/interface_assets/header.php:525 msgid "Extras" msgstr "Extras" @@ -8935,6 +8945,14 @@ msgstr "Satellitenmodus hinzufügen" msgid "Add a satellite" msgstr "Satellit hinzufügen" +#: application/views/satellite/pass.php:2 +msgid "Satellite passes" +msgstr "" + +#: application/views/satellite/pass.php:548 +msgid "Load predictions" +msgstr "" + #: application/views/sattimers/index.php:15 #, php-format msgid "" diff --git a/application/locale/el_GR/LC_MESSAGES/messages.po b/application/locale/el_GR/LC_MESSAGES/messages.po index a71943c9a..ca53c63ee 100644 --- a/application/locale/el_GR/LC_MESSAGES/messages.po +++ b/application/locale/el_GR/LC_MESSAGES/messages.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-08-06 18:03+0000\n" +"POT-Creation-Date: 2024-08-08 14:50+0000\n" "PO-Revision-Date: 2024-07-09 13:25+0000\n" "Last-Translator: Fabian Berg \n" "Language-Team: Greek \n" "Language-Team: Spanish \n" "Language-Team: Finnish \n" "Language-Team: French \n" "Language-Team: Italian \n" "Language-Team: Dutch \n" "Language-Team: Polish \n" "Language-Team: Portuguese (Portugal) \n" "Language-Team: Russian \n" "Language-Team: Swedish \n" "Language-Team: Turkish \n" "Language-Team: Chinese (Simplified) db->table_exists('tle')) { + + $this->dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => 6, + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + 'null' => FALSE + ), + 'satelliteid' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + 'null' => FALSE, + ), + 'tle' => array( + 'type' => 'TEXT', + 'null' => TRUE, + ), + 'updated' => array( + 'type' => 'timestamp', + 'null' => false, + 'default' => 'CURRENT_TIMESTAMP' + ), + )); + $this->dbforge->add_key('id', TRUE); + + $this->dbforge->create_table('tle'); + + $this->db->query("INSERT INTO tle (satelliteid, tle) select id, '1 53106U 22080B 24108.26757684 -.00000003 00000-0 00000-0 0 9991 +2 53106 70.1428 213.6795 0007982 119.5170 240.6286 6.42557181 41352' from satellite where name = 'IO-117'"); + + $this->db->query("INSERT INTO tle (satelliteid, tle) select id, '1 43700U 18090A 24108.89503844 .00000137 00000-0 00000-0 0 9999 +2 43700 0.0157 247.0647 0001348 170.1236 137.3539 1.00275203 19758' from satellite where name = 'QO-100'"); + + $this->db->query("INSERT INTO tle (satelliteid, tle) select id, '1 27607U 02058C 24108.20375939 .00004950 00000+0 68675-3 0 9992 +2 27607 64.5563 48.9470 0031938 141.6898 218.6483 14.78629101147515' from satellite where name = 'SO-50'"); + + } + } + + public function down() + { + $this->dbforge->drop_table('tle'); + } +} diff --git a/application/models/Satellite_model.php b/application/models/Satellite_model.php index 7f0c4f770..a566e5dc1 100644 --- a/application/models/Satellite_model.php +++ b/application/models/Satellite_model.php @@ -11,6 +11,16 @@ class Satellite_model extends CI_Model { return $this->db->query($sql)->result(); } + function get_all_satellites_with_tle() { + $sql = "select satellite.id, satellite.name as satname, tle.tle + from satellite + join tle on satellite.id = tle.satelliteid + order by satellite.name + "; + + return $this->db->query($sql)->result(); + } + function delete($id) { // Clean ID $clean_id = $this->security->xss_clean($id); @@ -102,19 +112,27 @@ class Satellite_model extends CI_Model { return $query->result(); } - function array_group_by($flds, $arr) { - $groups = array(); - foreach ($arr as $rec) { - $keys = array_map(function($f) use($rec) { return $rec[$f]; }, $flds); - $k = implode('@', $keys); - if (isset($groups[$k])) { - $groups[$k][] = $rec; - } else { - $groups[$k] = array($rec); - } - } - return $groups; - } + function array_group_by($flds, $arr) { + $groups = array(); + foreach ($arr as $rec) { + $keys = array_map(function($f) use($rec) { return $rec[$f]; }, $flds); + $k = implode('@', $keys); + if (isset($groups[$k])) { + $groups[$k][] = $rec; + } else { + $groups[$k] = array($rec); + } + } + return $groups; + } + + function get_tle($sat) { + $this->db->select('satellite.name AS satellite, tle.tle'); + $this->db->join('tle', 'satellite.id = tle.satelliteid'); + $this->db->where('name', $sat); + $query = $this->db->get('satellite'); + return $query->row(); + } } diff --git a/application/views/gridmap/index.php b/application/views/gridmap/index.php index ab31b6de5..c2bba6095 100644 --- a/application/views/gridmap/index.php +++ b/application/views/gridmap/index.php @@ -56,7 +56,7 @@ - + diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 03917d896..54e614a6a 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -61,7 +61,7 @@ $actstation=$this->stations->find_active() ?? ''; echo "var activeStationId = '".$actstation."';\n"; $profile_info = $this->stations->profile($actstation)->row(); - echo "var activeStationTXPower = '".xss_clean($profile_info->station_power)."';\n"; + echo "var activeStationTXPower = '".xss_clean($profile_info->station_power ?? 0)."';\n"; echo "var activeStationOP = '".xss_clean($this->session->userdata('operator_callsign'))."';\n"; } ?> @@ -251,6 +251,12 @@
  • + + + Beta + + Beta + diff --git a/application/views/satellite/flightpath.php b/application/views/satellite/flightpath.php new file mode 100644 index 000000000..a40c66301 --- /dev/null +++ b/application/views/satellite/flightpath.php @@ -0,0 +1,49 @@ + + + + + + +
    + +
    + +

    + +
    + + + + + +
    + +
    + +
    +
    +
    diff --git a/application/views/satellite/pass.php b/application/views/satellite/pass.php new file mode 100644 index 000000000..f2c6dd180 --- /dev/null +++ b/application/views/satellite/pass.php @@ -0,0 +1,555 @@ +
    +

    +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    +
    + diff --git a/application/views/satellite/passtable.php b/application/views/satellite/passtable.php new file mode 100644 index 000000000..f8087cb67 --- /dev/null +++ b/application/views/satellite/passtable.php @@ -0,0 +1,47 @@ + + + Satellite + AOS Time + Duration + AOS az + AOS el + Max El + LOS Time + LOS Az + LOS El + '; + foreach ($filtered as $pass) { + echo ''; + echo '' . $pass->satname . ''; + echo '' . Predict_Time::daynum2readable($pass->visible_aos, $zone, $format) . ''; + echo '' . returntimediff(Predict_Time::daynum2readable($pass->visible_aos, $zone, $format), Predict_Time::daynum2readable($pass->visible_los, $zone, $format)) . ''; + echo '' . round($pass->visible_aos_az) . ' (' . azDegreesToDirection($pass->visible_aos_az) . ')'; + echo '' . round($pass->visible_aos_el) . ''; + echo '' . round($pass->max_el) . ''; + echo '' . Predict_Time::daynum2readable($pass->visible_los, $zone, $format) . ''; + echo '' . round($pass->visible_los_az) . ' (' . azDegreesToDirection($pass->visible_los_az) . ')'; + echo '' . round($pass->visible_los_el) . ''; + echo ''; + } + echo ''; +} + +function returntimediff($start, $end) { + $datetime1 = DateTime::createFromFormat('m-d-Y H:i:s', $end); + $datetime2 = DateTime::createFromFormat('m-d-Y H:i:s', $start); + $interval = $datetime1->diff($datetime2); + + $minutesDifference = ($interval->days * 24 * 60) + ($interval->h * 60) + $interval->i + ($interval->s / 60); + + return round($minutesDifference) . ' min'; +} + +function azDegreesToDirection($az = 0) { + $i = floor($az / 22.5); + $m = (22.5 * (2 * $i + 1)) / 2; + $i = ($az >= $m) ? $i + 1 : $i; + + return trim(substr('N NNENE ENEE ESESE SSES SSWSW WSWW WNWNW NNWN ', $i * 3, 3)); +} diff --git a/assets/icons/saticon.png b/assets/icons/saticon.png new file mode 100644 index 000000000..e32656299 Binary files /dev/null and b/assets/icons/saticon.png differ diff --git a/assets/js/sections/flightpath.js b/assets/js/sections/flightpath.js new file mode 100644 index 000000000..24145ea92 --- /dev/null +++ b/assets/js/sections/flightpath.js @@ -0,0 +1,486 @@ +var satmarker; +var icon_dot_url = base_url + "assets/icons/saticon.png"; +var saticon = L.icon({ iconUrl: icon_dot_url, iconSize: [30, 30] }); + +var homeicon = L.icon({ iconUrl: icon_home_url, iconSize: [15, 15] }); + +var sats = (function (L, d3, satelliteJs) { + var RADIANS = Math.PI / 180; + var DEGREES = 180 / Math.PI; + var R_EARTH = 6378.137; // equatorial radius (km) + + /* =============================================== */ + /* =============== CLOCK ========================= */ + /* =============================================== */ + + /** + * Factory function for keeping track of elapsed time and rates. + */ + function Clock() { + this._rate = 60; // 1ms elapsed : 60sec simulated + this._date = d3.now(); + this._elapsed = 0; + }; + + Clock.prototype.date = function (timeInMs) { + if (!arguments.length) return this._date + (this._elapsed * this._rate); + this._date = timeInMs; + return this; + }; + + Clock.prototype.elapsed = function (ms) { + if (!arguments.length) return this._date - d3.now(); // calculates elapsed + this._elapsed = ms; + return this; + }; + + Clock.prototype.rate = function (secondsPerMsElapsed) { + if (!arguments.length) return this._rate; + this._rate = secondsPerMsElapsed; + return this; + }; + + /* ==================================================== */ + /* =============== CONVERSION ========================= */ + /* ==================================================== */ + + function satrecToFeature(satrec, date, props) { // DJ7NT: This is never called + var properties = props || {}; + var positionAndVelocity = satelliteJs.propagate(satrec, date); + var gmst = satelliteJs.gstime(date); + var positionGd = satelliteJs.eciToGeodetic(positionAndVelocity.position, gmst); + properties.height = positionGd.height; + return { + type: "FeatureCollection", + "features": [ { + type: 'Feature', + properties: properties, + geometry: { + type: 'Point', + coordinates: [ + positionGd.longitude * DEGREES, + positionGd.latitude * DEGREES + ] + } + }, + { + type: 'Feature', + properties: {infoText: 'blabla'}, + geometry: { + type: 'Point', + coordinates: [ + positionGd.longitude * DEGREES, + positionGd.latitude * DEGREES + ] + } + }] + }; + }; + /* ==================================================== */ + /* =============== TLE ================================ */ + /* ==================================================== */ + + /** + * Factory function for working with TLE. + */ + function TLE() { + this._properties; + this._date; + }; + TLE.prototype._lines = function (arry) { + return arry.slice(0, 2); + }; + + TLE.prototype.satrecs = function (tles) { + return tles.map(function (d) { + return satelliteJs.twoline2satrec.apply(null, this._lines(d)); + }); + }; + + TLE.prototype.features = function (tles) { + var date = this._date || d3.now(); + + return tles.map(function (d) { + var satrec = satelliteJs.twoline2satrec.apply(null, this._lines(d)); + return satrecToFeature(satrec, date, this._properties(d)); + }); + }; + + TLE.prototype.lines = function (func) { + if (!arguments.length) return this._lines; + this._lines = func; + return this; + }; + + TLE.prototype.properties = function (func) { + if (!arguments.length) return this._properties; + this._properties = func; + return this; + }; + + TLE.prototype.date = function (ms) { + if (!arguments.length) return this._date; + this._date = ms; + return this; + }; + + + /* ==================================================== */ + /* =============== PARSE ============================== */ + /* ==================================================== */ + + /** + * Parses text file string of tle into groups. + * @return {string[][]} Like [['tle line 1', 'tle line 2'], ...] + */ + function parseTle(tleString) { + // remove last newline so that we can properly split all the lines + var lines = tleString.replace(/\r?\n$/g, '').split(/\r?\n/); + + return lines.reduce(function (acc, cur, index) { + if (index % 2 === 0) acc.push([]); + acc[acc.length - 1].push(cur); + return acc; + }, []); + }; + + + /* ==================================================== */ + /* =============== SATELLITE ========================== */ + /* ==================================================== */ + + /** + * Satellite factory function that wraps satellitejs functionality + * and can compute footprints based on TLE and date + * + * @param {string[][]} tle two-line element + * @param {Date} date date to propagate with TLE + */ + function Satellite(tle, date) { + this._satrec = satelliteJs.twoline2satrec(tle[0], tle[1]); + this._satNum = this._satrec.satnum; // NORAD Catalog Number + + this._altitude; // km + this._position = { + lat: null, + lng: null + }; + this._halfAngle; // degrees + this._date; + this._gmst; + + this.setDate(date); + this.update(); + this._orbitType = this.orbitTypeFromAlt(this._altitude); // LEO, MEO, or GEO + }; + + /** + * Updates satellite position and altitude based on current TLE and date + */ + Satellite.prototype.update = function () { + try { + var positionAndVelocity = satelliteJs.propagate(this._satrec, this._date); + var positionGd = satelliteJs.eciToGeodetic(positionAndVelocity.position, this._gmst); + + this._position = { + lat: positionGd.latitude * DEGREES, + lng: positionGd.longitude * DEGREES + }; + this._altitude = positionGd.height; + satmarker.setLatLng(this._position); + } catch (e) { + // Malicious // non-calcable SAT Found + } finally { + return this; + } + }; + + /** + * @returns {GeoJSON.Polygon} GeoJSON describing the satellite's current footprint on the Earth + */ + Satellite.prototype.getFootprint = function () { + var theta = this._halfAngle * RADIANS; + + coreAngle = this._coreAngle(theta, this._altitude, R_EARTH) * DEGREES; + + return d3.geoCircle() + .center([this._position.lng, this._position.lat]) + .radius(coreAngle)(); + }; + + Satellite.prototype.getLocation = function () { + return d3.geoCircle() + .center([this._position.lng, this._position.lat]) + .radius(1)(); + }; + + /** + * A conical satellite with half angle casts a circle on the Earth. Find the angle + * from the center of the earth to the radius of this circle + * @param {number} theta: Satellite half angle in radians + * @param {number} altitude Satellite altitude + * @param {number} r Earth radius + * @returns {number} core angle in radians + */ + Satellite.prototype._coreAngle = function (theta, altitude, r) { + // if FOV is larger than Earth, assume it goes to the tangential point + // if (Math.sin(theta) != r / (altitude + r)) { + return Math.acos(r / (r + altitude)); + // } + // return Math.abs(Math.asin((r + altitude) * Math.sin(theta) / r)) - theta; + }; + + Satellite.prototype.halfAngle = function (halfAngle) { + if (!arguments.length) return this._halfAngle; + this._halfAngle = halfAngle; + return this; + }; + + Satellite.prototype.satNum = function (satNum) { + if (!arguments.length) return this._satNum; + this._satNum = satNum; + return this; + }; + + Satellite.prototype.altitude = function (altitude) { + if (!arguments.length) return this._altitude; + this._altitude = altitude; + return this; + }; + + Satellite.prototype.position = function (position) { + if (!arguments.length) return this._position; + this._position = position; + return this; + }; + + Satellite.prototype.getOrbitType = function () { + return this._orbitType; + }; + + /** + * sets both the date and the Greenwich Mean Sidereal Time + * @param {Date} date + */ + Satellite.prototype.setDate = function (date) { + this._date = date; + this._gmst = satelliteJs.gstime(date); + return this; + }; + + /** + * Maps an altitude to a type of satellite + * @param {number} altitude (in KM) + * @returns {'LEO' | 'MEO' | 'GEO'} + */ + Satellite.prototype.orbitTypeFromAlt = function (altitude) { + console.log(altitude); + this._altitude = altitude || this._altitude; + return this._altitude < 1200 ? 'LEO' : this._altitude > 22000 ? 'GEO' : 'MEO'; + }; + + + /* =============================================== */ + /* =============== LEAFLET MAP =================== */ + /* =============================================== */ + + // Approximate date the tle data was aquired from https://www.space-track.org/#recent + // var TLE_DATA_DATE = new Date(2024, 04, 18).getTime(); + var TLE_DATA_DATE = Date.now(); + + var leafletMap; + var attributionControl; + var activeClock; + var sats; + var svgLayer; + + function projectPointCurry(map) { + return function (x, y) { + const point = map.latLngToLayerPoint(L.latLng(y, x)); + this.stream.point(point.x, point.y); + } + }; + + function init(satellite) { + svgLayer = L.svg(); + leafletMap = L.map('sat_map', { + zoom: 3, + center: [20, 0], + // attributionControl: false, + layers: [ + L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + // noWrap: false, + }), + svgLayer + ] + }); + + satmarker = L.marker( + [0, 0], { + icon: saticon, + title: satellite, + zIndex: 1000, + } + ).addTo(leafletMap); + + L.marker( + [homelat, homelon], { + icon: homeicon, + title: 'Home', + zIndex: 1000, + } + ).addTo(leafletMap); + + /*Legend specific*/ + var legend = L.control({ position: "topright" }); + + legend.onAdd = function(map) { + var div = L.DomUtil.create("div", "legend"); + div.innerHTML += "

    Satellite Orbit

    "; + div.innerHTML += "LEO
    "; + div.innerHTML += "MEO
    "; + div.innerHTML += "GEO
    "; + return div; + }; + + legend.addTo(leafletMap); + + attributionControl = L.control.attribution({ + prefix: '' + }).addTo(leafletMap); + + var transform = d3.geoTransform({ + point: projectPointCurry(leafletMap) + }); + + path = d3.geoPath() + .projection(transform) + .pointRadius(2.5); + }; + + function updateSats(date) { + sats.forEach(function (sat) { + sat.setDate(date).update(); + }); + return sats + }; + + /** + * Create satellite objects for each record in the TLEs and begin animation + * @param {string[][]} parsedTles + */ + function initSats(parsedTles) { + activeClock = new Clock() + .rate(1) + .date(TLE_DATA_DATE); + sats = parsedTles.map(function (tle) { + var sat = new Satellite(tle, new Date()); + sat.halfAngle(30); + // sat.halfAngle(sat.getOrbitType() === 'LEO' ? Math.random() * (30 - 15) + 15 : Math.random() * 4 + 1); + return sat; + }); + + leafletMap.on('zoom', draw); + + window.requestAnimationFrame(animateSats); + return sats; + }; + + function invertProjection(projection) { + return function (x, y) { + const point = projection.invert([x, y]); + this.stream.point(point[0], point[1]); + }; + } + + function clipMercator(geoJson) { + const mercator = d3.geoMercator(); + const inverseMercator = d3.geoTransform({ + point: invertProjection(mercator) + }); + // D3 geoProject handles Mercator clipping + const newJson = d3.geoProject(geoJson, mercator); + return d3.geoProject(newJson, inverseMercator); + } + + function draw() { + var transform = d3.geoTransform({ + point: projectPointCurry(leafletMap) + }); + var geoPath = d3.geoPath() + .projection(transform); + + d3.select(svgLayer._container) + .selectAll('.footprint') + .data(sats, function (sat) { + return sat._satNum; // DJ7NT: This is the Number of the SAT + }) + .join( + function (enter) { + return enter.append('path').attr('class', function (sat) { + return 'footprint footprint--' + sat.getOrbitType(); + }); + }, + function (update) { + return update; + }, + function (exit) { + return exit.remove(); + } + ).attr('d', function (sat) { + // return geoPath(clipMercator(sat.getLocation())); // DJ7NT: this is the "point" of the SAT + let xx= geoPath(clipMercator(sat.getFootprint())); + return xx; + }); + }; + + function animateSats(elapsed) { + var dateInMs = activeClock.elapsed(elapsed) + .date(); + var date = new Date(dateInMs); + attributionControl.setPrefix(date); + + updateSats(date); + draw(); + window.requestAnimationFrame(animateSats); + } + + function start(data) { + init(data.satellite); + initSats(parseTle(data.tle)); + } + + return { + start: start +}; + + + }(window.L, window.d3, window.satellite)) + +function plot_sat() { + var container = L.DomUtil.get('sat_map'); + if(container != null){ + container._leaflet_id = null; + container.remove(); + + } + + amap = $('#sat_map').val(); + if (amap == undefined) { + $("#satcontainer").append('
    '); + } + + $.ajax({ + url: base_url + 'index.php/satellite/get_tle', + type: 'post', + data: { + sat: $("#sats").val(), + }, + success: function (data) { + sats.start(data); + }, + error: function (data) { + alert('Something went wrong!'); + }, + }); +} diff --git a/assets/js/sections/satellite_functions.js b/assets/js/sections/satellite_functions.js new file mode 100644 index 000000000..b1ac01dbe --- /dev/null +++ b/assets/js/sections/satellite_functions.js @@ -0,0 +1,3069 @@ +/*! + * satellite-js v3.0.0 + * (c) 2013 Shashwat Kandadai and UCSC + * https://github.com/shashwatak/satellite-js + * License: MIT + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.satellite = factory()); +}(this, (function () { 'use strict'; + + var pi = Math.PI; + var twoPi = pi * 2; + var deg2rad = pi / 180.0; + var rad2deg = 180 / pi; + var minutesPerDay = 1440.0; + var mu = 398600.5; // in km3 / s2 + + var earthRadius = 6378.137; // in km + + var xke = 60.0 / Math.sqrt(earthRadius * earthRadius * earthRadius / mu); + var tumin = 1.0 / xke; + var j2 = 0.00108262998905; + var j3 = -0.00000253215306; + var j4 = -0.00000161098761; + var j3oj2 = j3 / j2; + var x2o3 = 2.0 / 3.0; + + var constants = /*#__PURE__*/Object.freeze({ + pi: pi, + twoPi: twoPi, + deg2rad: deg2rad, + rad2deg: rad2deg, + minutesPerDay: minutesPerDay, + mu: mu, + earthRadius: earthRadius, + xke: xke, + tumin: tumin, + j2: j2, + j3: j3, + j4: j4, + j3oj2: j3oj2, + x2o3: x2o3 + }); + + /* ----------------------------------------------------------------------------- + * + * procedure days2mdhms + * + * this procedure converts the day of the year, days, to the equivalent month + * day, hour, minute and second. + * + * algorithm : set up array for the number of days per month + * find leap year - use 1900 because 2000 is a leap year + * loop through a temp value while the value is < the days + * perform int conversions to the correct day and month + * convert remainder into h m s using type conversions + * + * author : david vallado 719-573-2600 1 mar 2001 + * + * inputs description range / units + * year - year 1900 .. 2100 + * days - julian day of the year 0.0 .. 366.0 + * + * outputs : + * mon - month 1 .. 12 + * day - day 1 .. 28,29,30,31 + * hr - hour 0 .. 23 + * min - minute 0 .. 59 + * sec - second 0.0 .. 59.999 + * + * locals : + * dayofyr - day of year + * temp - temporary extended values + * inttemp - temporary int value + * i - index + * lmonth[12] - int array containing the number of days per month + * + * coupling : + * none. + * --------------------------------------------------------------------------- */ + function days2mdhms(year, days) { + var lmonth = [31, year % 4 === 0 ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + var dayofyr = Math.floor(days); // ----------------- find month and day of month ---------------- + + var i = 1; + var inttemp = 0; + + while (dayofyr > inttemp + lmonth[i - 1] && i < 12) { + inttemp += lmonth[i - 1]; + i += 1; + } + + var mon = i; + var day = dayofyr - inttemp; // ----------------- find hours minutes and seconds ------------- + + var temp = (days - dayofyr) * 24.0; + var hr = Math.floor(temp); + temp = (temp - hr) * 60.0; + var minute = Math.floor(temp); + var sec = (temp - minute) * 60.0; + return { + mon: mon, + day: day, + hr: hr, + minute: minute, + sec: sec + }; + } + /* ----------------------------------------------------------------------------- + * + * procedure jday + * + * this procedure finds the julian date given the year, month, day, and time. + * the julian date is defined by each elapsed day since noon, jan 1, 4713 bc. + * + * algorithm : calculate the answer in one step for efficiency + * + * author : david vallado 719-573-2600 1 mar 2001 + * + * inputs description range / units + * year - year 1900 .. 2100 + * mon - month 1 .. 12 + * day - day 1 .. 28,29,30,31 + * hr - universal time hour 0 .. 23 + * min - universal time min 0 .. 59 + * sec - universal time sec 0.0 .. 59.999 + * + * outputs : + * jd - julian date days from 4713 bc + * + * locals : + * none. + * + * coupling : + * none. + * + * references : + * vallado 2007, 189, alg 14, ex 3-14 + * + * --------------------------------------------------------------------------- */ + + function jdayInternal(year, mon, day, hr, minute, sec) { + var msec = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; + return 367.0 * year - Math.floor(7 * (year + Math.floor((mon + 9) / 12.0)) * 0.25) + Math.floor(275 * mon / 9.0) + day + 1721013.5 + ((msec / 60000 + sec / 60.0 + minute) / 60.0 + hr) / 24.0 // ut in days + // # - 0.5*sgn(100.0*year + mon - 190002.5) + 0.5; + ; + } + + function jday(year, mon, day, hr, minute, sec, msec) { + if (year instanceof Date) { + var date = year; + return jdayInternal(date.getUTCFullYear(), date.getUTCMonth() + 1, // Note, this function requires months in range 1-12. + date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()); + } + + return jdayInternal(year, mon, day, hr, minute, sec, msec); + } + /* ----------------------------------------------------------------------------- + * + * procedure invjday + * + * this procedure finds the year, month, day, hour, minute and second + * given the julian date. tu can be ut1, tdt, tdb, etc. + * + * algorithm : set up starting values + * find leap year - use 1900 because 2000 is a leap year + * find the elapsed days through the year in a loop + * call routine to find each individual value + * + * author : david vallado 719-573-2600 1 mar 2001 + * + * inputs description range / units + * jd - julian date days from 4713 bc + * + * outputs : + * year - year 1900 .. 2100 + * mon - month 1 .. 12 + * day - day 1 .. 28,29,30,31 + * hr - hour 0 .. 23 + * min - minute 0 .. 59 + * sec - second 0.0 .. 59.999 + * + * locals : + * days - day of year plus fractional + * portion of a day days + * tu - julian centuries from 0 h + * jan 0, 1900 + * temp - temporary double values + * leapyrs - number of leap years from 1900 + * + * coupling : + * days2mdhms - finds month, day, hour, minute and second given days and year + * + * references : + * vallado 2007, 208, alg 22, ex 3-13 + * --------------------------------------------------------------------------- */ + + function invjday(jd, asArray) { + // --------------- find year and days of the year - + var temp = jd - 2415019.5; + var tu = temp / 365.25; + var year = 1900 + Math.floor(tu); + var leapyrs = Math.floor((year - 1901) * 0.25); // optional nudge by 8.64x10-7 sec to get even outputs + + var days = temp - ((year - 1900) * 365.0 + leapyrs) + 0.00000000001; // ------------ check for case of beginning of a year ----------- + + if (days < 1.0) { + year -= 1; + leapyrs = Math.floor((year - 1901) * 0.25); + days = temp - ((year - 1900) * 365.0 + leapyrs); + } // ----------------- find remaing data ------------------------- + + + var mdhms = days2mdhms(year, days); + var mon = mdhms.mon, + day = mdhms.day, + hr = mdhms.hr, + minute = mdhms.minute; + var sec = mdhms.sec - 0.00000086400; + + if (asArray) { + return [year, mon, day, hr, minute, Math.floor(sec)]; + } + + return new Date(Date.UTC(year, mon - 1, day, hr, minute, Math.floor(sec))); + } + + /* ----------------------------------------------------------------------------- + * + * procedure dpper + * + * this procedure provides deep space long period periodic contributions + * to the mean elements. by design, these periodics are zero at epoch. + * this used to be dscom which included initialization, but it's really a + * recurring function. + * + * author : david vallado 719-573-2600 28 jun 2005 + * + * inputs : + * e3 - + * ee2 - + * peo - + * pgho - + * pho - + * pinco - + * plo - + * se2 , se3 , sgh2, sgh3, sgh4, sh2, sh3, si2, si3, sl2, sl3, sl4 - + * t - + * xh2, xh3, xi2, xi3, xl2, xl3, xl4 - + * zmol - + * zmos - + * ep - eccentricity 0.0 - 1.0 + * inclo - inclination - needed for lyddane modification + * nodep - right ascension of ascending node + * argpp - argument of perigee + * mp - mean anomaly + * + * outputs : + * ep - eccentricity 0.0 - 1.0 + * inclp - inclination + * nodep - right ascension of ascending node + * argpp - argument of perigee + * mp - mean anomaly + * + * locals : + * alfdp - + * betdp - + * cosip , sinip , cosop , sinop , + * dalf - + * dbet - + * dls - + * f2, f3 - + * pe - + * pgh - + * ph - + * pinc - + * pl - + * sel , ses , sghl , sghs , shl , shs , sil , sinzf , sis , + * sll , sls + * xls - + * xnoh - + * zf - + * zm - + * + * coupling : + * none. + * + * references : + * hoots, roehrich, norad spacetrack report #3 1980 + * hoots, norad spacetrack report #6 1986 + * hoots, schumacher and glover 2004 + * vallado, crawford, hujsak, kelso 2006 + ----------------------------------------------------------------------------*/ + + function dpper(satrec, options) { + var e3 = satrec.e3, + ee2 = satrec.ee2, + peo = satrec.peo, + pgho = satrec.pgho, + pho = satrec.pho, + pinco = satrec.pinco, + plo = satrec.plo, + se2 = satrec.se2, + se3 = satrec.se3, + sgh2 = satrec.sgh2, + sgh3 = satrec.sgh3, + sgh4 = satrec.sgh4, + sh2 = satrec.sh2, + sh3 = satrec.sh3, + si2 = satrec.si2, + si3 = satrec.si3, + sl2 = satrec.sl2, + sl3 = satrec.sl3, + sl4 = satrec.sl4, + t = satrec.t, + xgh2 = satrec.xgh2, + xgh3 = satrec.xgh3, + xgh4 = satrec.xgh4, + xh2 = satrec.xh2, + xh3 = satrec.xh3, + xi2 = satrec.xi2, + xi3 = satrec.xi3, + xl2 = satrec.xl2, + xl3 = satrec.xl3, + xl4 = satrec.xl4, + zmol = satrec.zmol, + zmos = satrec.zmos; + var init = options.init, + opsmode = options.opsmode; + var ep = options.ep, + inclp = options.inclp, + nodep = options.nodep, + argpp = options.argpp, + mp = options.mp; // Copy satellite attributes into local variables for convenience + // and symmetry in writing formulae. + + var alfdp; + var betdp; + var cosip; + var sinip; + var cosop; + var sinop; + var dalf; + var dbet; + var dls; + var f2; + var f3; + var pe; + var pgh; + var ph; + var pinc; + var pl; + var sinzf; + var xls; + var xnoh; + var zf; + var zm; // ---------------------- constants ----------------------------- + + var zns = 1.19459e-5; + var zes = 0.01675; + var znl = 1.5835218e-4; + var zel = 0.05490; // --------------- calculate time varying periodics ----------- + + zm = zmos + zns * t; // be sure that the initial call has time set to zero + + if (init === 'y') { + zm = zmos; + } + + zf = zm + 2.0 * zes * Math.sin(zm); + sinzf = Math.sin(zf); + f2 = 0.5 * sinzf * sinzf - 0.25; + f3 = -0.5 * sinzf * Math.cos(zf); + var ses = se2 * f2 + se3 * f3; + var sis = si2 * f2 + si3 * f3; + var sls = sl2 * f2 + sl3 * f3 + sl4 * sinzf; + var sghs = sgh2 * f2 + sgh3 * f3 + sgh4 * sinzf; + var shs = sh2 * f2 + sh3 * f3; + zm = zmol + znl * t; + + if (init === 'y') { + zm = zmol; + } + + zf = zm + 2.0 * zel * Math.sin(zm); + sinzf = Math.sin(zf); + f2 = 0.5 * sinzf * sinzf - 0.25; + f3 = -0.5 * sinzf * Math.cos(zf); + var sel = ee2 * f2 + e3 * f3; + var sil = xi2 * f2 + xi3 * f3; + var sll = xl2 * f2 + xl3 * f3 + xl4 * sinzf; + var sghl = xgh2 * f2 + xgh3 * f3 + xgh4 * sinzf; + var shll = xh2 * f2 + xh3 * f3; + pe = ses + sel; + pinc = sis + sil; + pl = sls + sll; + pgh = sghs + sghl; + ph = shs + shll; + + if (init === 'n') { + pe -= peo; + pinc -= pinco; + pl -= plo; + pgh -= pgho; + ph -= pho; + inclp += pinc; + ep += pe; + sinip = Math.sin(inclp); + cosip = Math.cos(inclp); + /* ----------------- apply periodics directly ------------ */ + // sgp4fix for lyddane choice + // strn3 used original inclination - this is technically feasible + // gsfc used perturbed inclination - also technically feasible + // probably best to readjust the 0.2 limit value and limit discontinuity + // 0.2 rad = 11.45916 deg + // use next line for original strn3 approach and original inclination + // if (inclo >= 0.2) + // use next line for gsfc version and perturbed inclination + + if (inclp >= 0.2) { + ph /= sinip; + pgh -= cosip * ph; + argpp += pgh; + nodep += ph; + mp += pl; + } else { + // ---- apply periodics with lyddane modification ---- + sinop = Math.sin(nodep); + cosop = Math.cos(nodep); + alfdp = sinip * sinop; + betdp = sinip * cosop; + dalf = ph * cosop + pinc * cosip * sinop; + dbet = -ph * sinop + pinc * cosip * cosop; + alfdp += dalf; + betdp += dbet; + nodep %= twoPi; // sgp4fix for afspc written intrinsic functions + // nodep used without a trigonometric function ahead + + if (nodep < 0.0 && opsmode === 'a') { + nodep += twoPi; + } + + xls = mp + argpp + cosip * nodep; + dls = pl + pgh - pinc * nodep * sinip; + xls += dls; + xnoh = nodep; + nodep = Math.atan2(alfdp, betdp); // sgp4fix for afspc written intrinsic functions + // nodep used without a trigonometric function ahead + + if (nodep < 0.0 && opsmode === 'a') { + nodep += twoPi; + } + + if (Math.abs(xnoh - nodep) > pi) { + if (nodep < xnoh) { + nodep += twoPi; + } else { + nodep -= twoPi; + } + } + + mp += pl; + argpp = xls - mp - cosip * nodep; + } + } + + return { + ep: ep, + inclp: inclp, + nodep: nodep, + argpp: argpp, + mp: mp + }; + } + + /*----------------------------------------------------------------------------- + * + * procedure dscom + * + * this procedure provides deep space common items used by both the secular + * and periodics subroutines. input is provided as shown. this routine + * used to be called dpper, but the functions inside weren't well organized. + * + * author : david vallado 719-573-2600 28 jun 2005 + * + * inputs : + * epoch - + * ep - eccentricity + * argpp - argument of perigee + * tc - + * inclp - inclination + * nodep - right ascension of ascending node + * np - mean motion + * + * outputs : + * sinim , cosim , sinomm , cosomm , snodm , cnodm + * day - + * e3 - + * ee2 - + * em - eccentricity + * emsq - eccentricity squared + * gam - + * peo - + * pgho - + * pho - + * pinco - + * plo - + * rtemsq - + * se2, se3 - + * sgh2, sgh3, sgh4 - + * sh2, sh3, si2, si3, sl2, sl3, sl4 - + * s1, s2, s3, s4, s5, s6, s7 - + * ss1, ss2, ss3, ss4, ss5, ss6, ss7, sz1, sz2, sz3 - + * sz11, sz12, sz13, sz21, sz22, sz23, sz31, sz32, sz33 - + * xgh2, xgh3, xgh4, xh2, xh3, xi2, xi3, xl2, xl3, xl4 - + * nm - mean motion + * z1, z2, z3, z11, z12, z13, z21, z22, z23, z31, z32, z33 - + * zmol - + * zmos - + * + * locals : + * a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 - + * betasq - + * cc - + * ctem, stem - + * x1, x2, x3, x4, x5, x6, x7, x8 - + * xnodce - + * xnoi - + * zcosg , zsing , zcosgl , zsingl , zcosh , zsinh , zcoshl , zsinhl , + * zcosi , zsini , zcosil , zsinil , + * zx - + * zy - + * + * coupling : + * none. + * + * references : + * hoots, roehrich, norad spacetrack report #3 1980 + * hoots, norad spacetrack report #6 1986 + * hoots, schumacher and glover 2004 + * vallado, crawford, hujsak, kelso 2006 + ----------------------------------------------------------------------------*/ + + function dscom(options) { + var epoch = options.epoch, + ep = options.ep, + argpp = options.argpp, + tc = options.tc, + inclp = options.inclp, + nodep = options.nodep, + np = options.np; + var a1; + var a2; + var a3; + var a4; + var a5; + var a6; + var a7; + var a8; + var a9; + var a10; + var cc; + var x1; + var x2; + var x3; + var x4; + var x5; + var x6; + var x7; + var x8; + var zcosg; + var zsing; + var zcosh; + var zsinh; + var zcosi; + var zsini; + var ss1; + var ss2; + var ss3; + var ss4; + var ss5; + var ss6; + var ss7; + var sz1; + var sz2; + var sz3; + var sz11; + var sz12; + var sz13; + var sz21; + var sz22; + var sz23; + var sz31; + var sz32; + var sz33; + var s1; + var s2; + var s3; + var s4; + var s5; + var s6; + var s7; + var z1; + var z2; + var z3; + var z11; + var z12; + var z13; + var z21; + var z22; + var z23; + var z31; + var z32; + var z33; // -------------------------- constants ------------------------- + + var zes = 0.01675; + var zel = 0.05490; + var c1ss = 2.9864797e-6; + var c1l = 4.7968065e-7; + var zsinis = 0.39785416; + var zcosis = 0.91744867; + var zcosgs = 0.1945905; + var zsings = -0.98088458; // --------------------- local variables ------------------------ + + var nm = np; + var em = ep; + var snodm = Math.sin(nodep); + var cnodm = Math.cos(nodep); + var sinomm = Math.sin(argpp); + var cosomm = Math.cos(argpp); + var sinim = Math.sin(inclp); + var cosim = Math.cos(inclp); + var emsq = em * em; + var betasq = 1.0 - emsq; + var rtemsq = Math.sqrt(betasq); // ----------------- initialize lunar solar terms --------------- + + var peo = 0.0; + var pinco = 0.0; + var plo = 0.0; + var pgho = 0.0; + var pho = 0.0; + var day = epoch + 18261.5 + tc / 1440.0; + var xnodce = (4.5236020 - 9.2422029e-4 * day) % twoPi; + var stem = Math.sin(xnodce); + var ctem = Math.cos(xnodce); + var zcosil = 0.91375164 - 0.03568096 * ctem; + var zsinil = Math.sqrt(1.0 - zcosil * zcosil); + var zsinhl = 0.089683511 * stem / zsinil; + var zcoshl = Math.sqrt(1.0 - zsinhl * zsinhl); + var gam = 5.8351514 + 0.0019443680 * day; + var zx = 0.39785416 * stem / zsinil; + var zy = zcoshl * ctem + 0.91744867 * zsinhl * stem; + zx = Math.atan2(zx, zy); + zx += gam - xnodce; + var zcosgl = Math.cos(zx); + var zsingl = Math.sin(zx); // ------------------------- do solar terms --------------------- + + zcosg = zcosgs; + zsing = zsings; + zcosi = zcosis; + zsini = zsinis; + zcosh = cnodm; + zsinh = snodm; + cc = c1ss; + var xnoi = 1.0 / nm; + var lsflg = 0; + + while (lsflg < 2) { + lsflg += 1; + a1 = zcosg * zcosh + zsing * zcosi * zsinh; + a3 = -zsing * zcosh + zcosg * zcosi * zsinh; + a7 = -zcosg * zsinh + zsing * zcosi * zcosh; + a8 = zsing * zsini; + a9 = zsing * zsinh + zcosg * zcosi * zcosh; + a10 = zcosg * zsini; + a2 = cosim * a7 + sinim * a8; + a4 = cosim * a9 + sinim * a10; + a5 = -sinim * a7 + cosim * a8; + a6 = -sinim * a9 + cosim * a10; + x1 = a1 * cosomm + a2 * sinomm; + x2 = a3 * cosomm + a4 * sinomm; + x3 = -a1 * sinomm + a2 * cosomm; + x4 = -a3 * sinomm + a4 * cosomm; + x5 = a5 * sinomm; + x6 = a6 * sinomm; + x7 = a5 * cosomm; + x8 = a6 * cosomm; + z31 = 12.0 * x1 * x1 - 3.0 * x3 * x3; + z32 = 24.0 * x1 * x2 - 6.0 * x3 * x4; + z33 = 12.0 * x2 * x2 - 3.0 * x4 * x4; + z1 = 3.0 * (a1 * a1 + a2 * a2) + z31 * emsq; + z2 = 6.0 * (a1 * a3 + a2 * a4) + z32 * emsq; + z3 = 3.0 * (a3 * a3 + a4 * a4) + z33 * emsq; + z11 = -6.0 * a1 * a5 + emsq * (-24.0 * x1 * x7 - 6.0 * x3 * x5); + z12 = -6.0 * (a1 * a6 + a3 * a5) + emsq * (-24.0 * (x2 * x7 + x1 * x8) + -6.0 * (x3 * x6 + x4 * x5)); + z13 = -6.0 * a3 * a6 + emsq * (-24.0 * x2 * x8 - 6.0 * x4 * x6); + z21 = 6.0 * a2 * a5 + emsq * (24.0 * x1 * x5 - 6.0 * x3 * x7); + z22 = 6.0 * (a4 * a5 + a2 * a6) + emsq * (24.0 * (x2 * x5 + x1 * x6) - 6.0 * (x4 * x7 + x3 * x8)); + z23 = 6.0 * a4 * a6 + emsq * (24.0 * x2 * x6 - 6.0 * x4 * x8); + z1 = z1 + z1 + betasq * z31; + z2 = z2 + z2 + betasq * z32; + z3 = z3 + z3 + betasq * z33; + s3 = cc * xnoi; + s2 = -0.5 * s3 / rtemsq; + s4 = s3 * rtemsq; + s1 = -15.0 * em * s4; + s5 = x1 * x3 + x2 * x4; + s6 = x2 * x3 + x1 * x4; + s7 = x2 * x4 - x1 * x3; // ----------------------- do lunar terms ------------------- + + if (lsflg === 1) { + ss1 = s1; + ss2 = s2; + ss3 = s3; + ss4 = s4; + ss5 = s5; + ss6 = s6; + ss7 = s7; + sz1 = z1; + sz2 = z2; + sz3 = z3; + sz11 = z11; + sz12 = z12; + sz13 = z13; + sz21 = z21; + sz22 = z22; + sz23 = z23; + sz31 = z31; + sz32 = z32; + sz33 = z33; + zcosg = zcosgl; + zsing = zsingl; + zcosi = zcosil; + zsini = zsinil; + zcosh = zcoshl * cnodm + zsinhl * snodm; + zsinh = snodm * zcoshl - cnodm * zsinhl; + cc = c1l; + } + } + + var zmol = (4.7199672 + (0.22997150 * day - gam)) % twoPi; + var zmos = (6.2565837 + 0.017201977 * day) % twoPi; // ------------------------ do solar terms ---------------------- + + var se2 = 2.0 * ss1 * ss6; + var se3 = 2.0 * ss1 * ss7; + var si2 = 2.0 * ss2 * sz12; + var si3 = 2.0 * ss2 * (sz13 - sz11); + var sl2 = -2.0 * ss3 * sz2; + var sl3 = -2.0 * ss3 * (sz3 - sz1); + var sl4 = -2.0 * ss3 * (-21.0 - 9.0 * emsq) * zes; + var sgh2 = 2.0 * ss4 * sz32; + var sgh3 = 2.0 * ss4 * (sz33 - sz31); + var sgh4 = -18.0 * ss4 * zes; + var sh2 = -2.0 * ss2 * sz22; + var sh3 = -2.0 * ss2 * (sz23 - sz21); // ------------------------ do lunar terms ---------------------- + + var ee2 = 2.0 * s1 * s6; + var e3 = 2.0 * s1 * s7; + var xi2 = 2.0 * s2 * z12; + var xi3 = 2.0 * s2 * (z13 - z11); + var xl2 = -2.0 * s3 * z2; + var xl3 = -2.0 * s3 * (z3 - z1); + var xl4 = -2.0 * s3 * (-21.0 - 9.0 * emsq) * zel; + var xgh2 = 2.0 * s4 * z32; + var xgh3 = 2.0 * s4 * (z33 - z31); + var xgh4 = -18.0 * s4 * zel; + var xh2 = -2.0 * s2 * z22; + var xh3 = -2.0 * s2 * (z23 - z21); + return { + snodm: snodm, + cnodm: cnodm, + sinim: sinim, + cosim: cosim, + sinomm: sinomm, + cosomm: cosomm, + day: day, + e3: e3, + ee2: ee2, + em: em, + emsq: emsq, + gam: gam, + peo: peo, + pgho: pgho, + pho: pho, + pinco: pinco, + plo: plo, + rtemsq: rtemsq, + se2: se2, + se3: se3, + sgh2: sgh2, + sgh3: sgh3, + sgh4: sgh4, + sh2: sh2, + sh3: sh3, + si2: si2, + si3: si3, + sl2: sl2, + sl3: sl3, + sl4: sl4, + s1: s1, + s2: s2, + s3: s3, + s4: s4, + s5: s5, + s6: s6, + s7: s7, + ss1: ss1, + ss2: ss2, + ss3: ss3, + ss4: ss4, + ss5: ss5, + ss6: ss6, + ss7: ss7, + sz1: sz1, + sz2: sz2, + sz3: sz3, + sz11: sz11, + sz12: sz12, + sz13: sz13, + sz21: sz21, + sz22: sz22, + sz23: sz23, + sz31: sz31, + sz32: sz32, + sz33: sz33, + xgh2: xgh2, + xgh3: xgh3, + xgh4: xgh4, + xh2: xh2, + xh3: xh3, + xi2: xi2, + xi3: xi3, + xl2: xl2, + xl3: xl3, + xl4: xl4, + nm: nm, + z1: z1, + z2: z2, + z3: z3, + z11: z11, + z12: z12, + z13: z13, + z21: z21, + z22: z22, + z23: z23, + z31: z31, + z32: z32, + z33: z33, + zmol: zmol, + zmos: zmos + }; + } + + /*----------------------------------------------------------------------------- + * + * procedure dsinit + * + * this procedure provides deep space contributions to mean motion dot due + * to geopotential resonance with half day and one day orbits. + * + * author : david vallado 719-573-2600 28 jun 2005 + * + * inputs : + * cosim, sinim- + * emsq - eccentricity squared + * argpo - argument of perigee + * s1, s2, s3, s4, s5 - + * ss1, ss2, ss3, ss4, ss5 - + * sz1, sz3, sz11, sz13, sz21, sz23, sz31, sz33 - + * t - time + * tc - + * gsto - greenwich sidereal time rad + * mo - mean anomaly + * mdot - mean anomaly dot (rate) + * no - mean motion + * nodeo - right ascension of ascending node + * nodedot - right ascension of ascending node dot (rate) + * xpidot - + * z1, z3, z11, z13, z21, z23, z31, z33 - + * eccm - eccentricity + * argpm - argument of perigee + * inclm - inclination + * mm - mean anomaly + * xn - mean motion + * nodem - right ascension of ascending node + * + * outputs : + * em - eccentricity + * argpm - argument of perigee + * inclm - inclination + * mm - mean anomaly + * nm - mean motion + * nodem - right ascension of ascending node + * irez - flag for resonance 0-none, 1-one day, 2-half day + * atime - + * d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433 - + * dedt - + * didt - + * dmdt - + * dndt - + * dnodt - + * domdt - + * del1, del2, del3 - + * ses , sghl , sghs , sgs , shl , shs , sis , sls + * theta - + * xfact - + * xlamo - + * xli - + * xni + * + * locals : + * ainv2 - + * aonv - + * cosisq - + * eoc - + * f220, f221, f311, f321, f322, f330, f441, f442, f522, f523, f542, f543 - + * g200, g201, g211, g300, g310, g322, g410, g422, g520, g521, g532, g533 - + * sini2 - + * temp - + * temp1 - + * theta - + * xno2 - + * + * coupling : + * getgravconst + * + * references : + * hoots, roehrich, norad spacetrack report #3 1980 + * hoots, norad spacetrack report #6 1986 + * hoots, schumacher and glover 2004 + * vallado, crawford, hujsak, kelso 2006 + ----------------------------------------------------------------------------*/ + + function dsinit(options) { + var cosim = options.cosim, + argpo = options.argpo, + s1 = options.s1, + s2 = options.s2, + s3 = options.s3, + s4 = options.s4, + s5 = options.s5, + sinim = options.sinim, + ss1 = options.ss1, + ss2 = options.ss2, + ss3 = options.ss3, + ss4 = options.ss4, + ss5 = options.ss5, + sz1 = options.sz1, + sz3 = options.sz3, + sz11 = options.sz11, + sz13 = options.sz13, + sz21 = options.sz21, + sz23 = options.sz23, + sz31 = options.sz31, + sz33 = options.sz33, + t = options.t, + tc = options.tc, + gsto = options.gsto, + mo = options.mo, + mdot = options.mdot, + no = options.no, + nodeo = options.nodeo, + nodedot = options.nodedot, + xpidot = options.xpidot, + z1 = options.z1, + z3 = options.z3, + z11 = options.z11, + z13 = options.z13, + z21 = options.z21, + z23 = options.z23, + z31 = options.z31, + z33 = options.z33, + ecco = options.ecco, + eccsq = options.eccsq; + var emsq = options.emsq, + em = options.em, + argpm = options.argpm, + inclm = options.inclm, + mm = options.mm, + nm = options.nm, + nodem = options.nodem, + irez = options.irez, + atime = options.atime, + d2201 = options.d2201, + d2211 = options.d2211, + d3210 = options.d3210, + d3222 = options.d3222, + d4410 = options.d4410, + d4422 = options.d4422, + d5220 = options.d5220, + d5232 = options.d5232, + d5421 = options.d5421, + d5433 = options.d5433, + dedt = options.dedt, + didt = options.didt, + dmdt = options.dmdt, + dnodt = options.dnodt, + domdt = options.domdt, + del1 = options.del1, + del2 = options.del2, + del3 = options.del3, + xfact = options.xfact, + xlamo = options.xlamo, + xli = options.xli, + xni = options.xni; + var f220; + var f221; + var f311; + var f321; + var f322; + var f330; + var f441; + var f442; + var f522; + var f523; + var f542; + var f543; + var g200; + var g201; + var g211; + var g300; + var g310; + var g322; + var g410; + var g422; + var g520; + var g521; + var g532; + var g533; + var sini2; + var temp; + var temp1; + var xno2; + var ainv2; + var aonv; + var cosisq; + var eoc; + var q22 = 1.7891679e-6; + var q31 = 2.1460748e-6; + var q33 = 2.2123015e-7; + var root22 = 1.7891679e-6; + var root44 = 7.3636953e-9; + var root54 = 2.1765803e-9; + var rptim = 4.37526908801129966e-3; // equates to 7.29211514668855e-5 rad/sec + + var root32 = 3.7393792e-7; + var root52 = 1.1428639e-7; + var znl = 1.5835218e-4; + var zns = 1.19459e-5; // -------------------- deep space initialization ------------ + + irez = 0; + + if (nm < 0.0052359877 && nm > 0.0034906585) { + irez = 1; + } + + if (nm >= 8.26e-3 && nm <= 9.24e-3 && em >= 0.5) { + irez = 2; + } // ------------------------ do solar terms ------------------- + + + var ses = ss1 * zns * ss5; + var sis = ss2 * zns * (sz11 + sz13); + var sls = -zns * ss3 * (sz1 + sz3 - 14.0 - 6.0 * emsq); + var sghs = ss4 * zns * (sz31 + sz33 - 6.0); + var shs = -zns * ss2 * (sz21 + sz23); // sgp4fix for 180 deg incl + + if (inclm < 5.2359877e-2 || inclm > pi - 5.2359877e-2) { + shs = 0.0; + } + + if (sinim !== 0.0) { + shs /= sinim; + } + + var sgs = sghs - cosim * shs; // ------------------------- do lunar terms ------------------ + + dedt = ses + s1 * znl * s5; + didt = sis + s2 * znl * (z11 + z13); + dmdt = sls - znl * s3 * (z1 + z3 - 14.0 - 6.0 * emsq); + var sghl = s4 * znl * (z31 + z33 - 6.0); + var shll = -znl * s2 * (z21 + z23); // sgp4fix for 180 deg incl + + if (inclm < 5.2359877e-2 || inclm > pi - 5.2359877e-2) { + shll = 0.0; + } + + domdt = sgs + sghl; + dnodt = shs; + + if (sinim !== 0.0) { + domdt -= cosim / sinim * shll; + dnodt += shll / sinim; + } // ----------- calculate deep space resonance effects -------- + + + var dndt = 0.0; + var theta = (gsto + tc * rptim) % twoPi; + em += dedt * t; + inclm += didt * t; + argpm += domdt * t; + nodem += dnodt * t; + mm += dmdt * t; // sgp4fix for negative inclinations + // the following if statement should be commented out + // if (inclm < 0.0) + // { + // inclm = -inclm; + // argpm = argpm - pi; + // nodem = nodem + pi; + // } + // -------------- initialize the resonance terms ------------- + + if (irez !== 0) { + aonv = Math.pow(nm / xke, x2o3); // ---------- geopotential resonance for 12 hour orbits ------ + + if (irez === 2) { + cosisq = cosim * cosim; + var emo = em; + em = ecco; + var emsqo = emsq; + emsq = eccsq; + eoc = em * emsq; + g201 = -0.306 - (em - 0.64) * 0.440; + + if (em <= 0.65) { + g211 = 3.616 - 13.2470 * em + 16.2900 * emsq; + g310 = -19.302 + 117.3900 * em - 228.4190 * emsq + 156.5910 * eoc; + g322 = -18.9068 + 109.7927 * em - 214.6334 * emsq + 146.5816 * eoc; + g410 = -41.122 + 242.6940 * em - 471.0940 * emsq + 313.9530 * eoc; + g422 = -146.407 + 841.8800 * em - 1629.014 * emsq + 1083.4350 * eoc; + g520 = -532.114 + 3017.977 * em - 5740.032 * emsq + 3708.2760 * eoc; + } else { + g211 = -72.099 + 331.819 * em - 508.738 * emsq + 266.724 * eoc; + g310 = -346.844 + 1582.851 * em - 2415.925 * emsq + 1246.113 * eoc; + g322 = -342.585 + 1554.908 * em - 2366.899 * emsq + 1215.972 * eoc; + g410 = -1052.797 + 4758.686 * em - 7193.992 * emsq + 3651.957 * eoc; + g422 = -3581.690 + 16178.110 * em - 24462.770 * emsq + 12422.520 * eoc; + + if (em > 0.715) { + g520 = -5149.66 + 29936.92 * em - 54087.36 * emsq + 31324.56 * eoc; + } else { + g520 = 1464.74 - 4664.75 * em + 3763.64 * emsq; + } + } + + if (em < 0.7) { + g533 = -919.22770 + 4988.6100 * em - 9064.7700 * emsq + 5542.21 * eoc; + g521 = -822.71072 + 4568.6173 * em - 8491.4146 * emsq + 5337.524 * eoc; + g532 = -853.66600 + 4690.2500 * em - 8624.7700 * emsq + 5341.4 * eoc; + } else { + g533 = -37995.780 + 161616.52 * em - 229838.20 * emsq + 109377.94 * eoc; + g521 = -51752.104 + 218913.95 * em - 309468.16 * emsq + 146349.42 * eoc; + g532 = -40023.880 + 170470.89 * em - 242699.48 * emsq + 115605.82 * eoc; + } + + sini2 = sinim * sinim; + f220 = 0.75 * (1.0 + 2.0 * cosim + cosisq); + f221 = 1.5 * sini2; + f321 = 1.875 * sinim * (1.0 - 2.0 * cosim - 3.0 * cosisq); + f322 = -1.875 * sinim * (1.0 + 2.0 * cosim - 3.0 * cosisq); + f441 = 35.0 * sini2 * f220; + f442 = 39.3750 * sini2 * sini2; + f522 = 9.84375 * sinim * (sini2 * (1.0 - 2.0 * cosim - 5.0 * cosisq) + 0.33333333 * (-2.0 + 4.0 * cosim + 6.0 * cosisq)); + f523 = sinim * (4.92187512 * sini2 * (-2.0 - 4.0 * cosim + 10.0 * cosisq) + 6.56250012 * (1.0 + 2.0 * cosim - 3.0 * cosisq)); + f542 = 29.53125 * sinim * (2.0 - 8.0 * cosim + cosisq * (-12.0 + 8.0 * cosim + 10.0 * cosisq)); + f543 = 29.53125 * sinim * (-2.0 - 8.0 * cosim + cosisq * (12.0 + 8.0 * cosim - 10.0 * cosisq)); + xno2 = nm * nm; + ainv2 = aonv * aonv; + temp1 = 3.0 * xno2 * ainv2; + temp = temp1 * root22; + d2201 = temp * f220 * g201; + d2211 = temp * f221 * g211; + temp1 *= aonv; + temp = temp1 * root32; + d3210 = temp * f321 * g310; + d3222 = temp * f322 * g322; + temp1 *= aonv; + temp = 2.0 * temp1 * root44; + d4410 = temp * f441 * g410; + d4422 = temp * f442 * g422; + temp1 *= aonv; + temp = temp1 * root52; + d5220 = temp * f522 * g520; + d5232 = temp * f523 * g532; + temp = 2.0 * temp1 * root54; + d5421 = temp * f542 * g521; + d5433 = temp * f543 * g533; + xlamo = (mo + nodeo + nodeo - (theta + theta)) % twoPi; + xfact = mdot + dmdt + 2.0 * (nodedot + dnodt - rptim) - no; + em = emo; + emsq = emsqo; + } // ---------------- synchronous resonance terms -------------- + + + if (irez === 1) { + g200 = 1.0 + emsq * (-2.5 + 0.8125 * emsq); + g310 = 1.0 + 2.0 * emsq; + g300 = 1.0 + emsq * (-6.0 + 6.60937 * emsq); + f220 = 0.75 * (1.0 + cosim) * (1.0 + cosim); + f311 = 0.9375 * sinim * sinim * (1.0 + 3.0 * cosim) - 0.75 * (1.0 + cosim); + f330 = 1.0 + cosim; + f330 *= 1.875 * f330 * f330; + del1 = 3.0 * nm * nm * aonv * aonv; + del2 = 2.0 * del1 * f220 * g200 * q22; + del3 = 3.0 * del1 * f330 * g300 * q33 * aonv; + del1 = del1 * f311 * g310 * q31 * aonv; + xlamo = (mo + nodeo + argpo - theta) % twoPi; + xfact = mdot + xpidot + dmdt + domdt + dnodt - (no + rptim); + } // ------------ for sgp4, initialize the integrator ---------- + + + xli = xlamo; + xni = no; + atime = 0.0; + nm = no + dndt; + } + + return { + em: em, + argpm: argpm, + inclm: inclm, + mm: mm, + nm: nm, + nodem: nodem, + irez: irez, + atime: atime, + d2201: d2201, + d2211: d2211, + d3210: d3210, + d3222: d3222, + d4410: d4410, + d4422: d4422, + d5220: d5220, + d5232: d5232, + d5421: d5421, + d5433: d5433, + dedt: dedt, + didt: didt, + dmdt: dmdt, + dndt: dndt, + dnodt: dnodt, + domdt: domdt, + del1: del1, + del2: del2, + del3: del3, + xfact: xfact, + xlamo: xlamo, + xli: xli, + xni: xni + }; + } + + /* ----------------------------------------------------------------------------- + * + * function gstime + * + * this function finds the greenwich sidereal time. + * + * author : david vallado 719-573-2600 1 mar 2001 + * + * inputs description range / units + * jdut1 - julian date in ut1 days from 4713 bc + * + * outputs : + * gstime - greenwich sidereal time 0 to 2pi rad + * + * locals : + * temp - temporary variable for doubles rad + * tut1 - julian centuries from the + * jan 1, 2000 12 h epoch (ut1) + * + * coupling : + * none + * + * references : + * vallado 2004, 191, eq 3-45 + * --------------------------------------------------------------------------- */ + + function gstimeInternal(jdut1) { + var tut1 = (jdut1 - 2451545.0) / 36525.0; + var temp = -6.2e-6 * tut1 * tut1 * tut1 + 0.093104 * tut1 * tut1 + (876600.0 * 3600 + 8640184.812866) * tut1 + 67310.54841; // # sec + + temp = temp * deg2rad / 240.0 % twoPi; // 360/86400 = 1/240, to deg, to rad + // ------------------------ check quadrants --------------------- + + if (temp < 0.0) { + temp += twoPi; + } + + return temp; + } + + function gstime() { + if ((arguments.length <= 0 ? undefined : arguments[0]) instanceof Date || arguments.length > 1) { + return gstimeInternal(jday.apply(void 0, arguments)); + } + + return gstimeInternal.apply(void 0, arguments); + } + + /*----------------------------------------------------------------------------- + * + * procedure initl + * + * this procedure initializes the sgp4 propagator. all the initialization is + * consolidated here instead of having multiple loops inside other routines. + * + * author : david vallado 719-573-2600 28 jun 2005 + * + * inputs : + * ecco - eccentricity 0.0 - 1.0 + * epoch - epoch time in days from jan 0, 1950. 0 hr + * inclo - inclination of satellite + * no - mean motion of satellite + * satn - satellite number + * + * outputs : + * ainv - 1.0 / a + * ao - semi major axis + * con41 - + * con42 - 1.0 - 5.0 cos(i) + * cosio - cosine of inclination + * cosio2 - cosio squared + * eccsq - eccentricity squared + * method - flag for deep space 'd', 'n' + * omeosq - 1.0 - ecco * ecco + * posq - semi-parameter squared + * rp - radius of perigee + * rteosq - square root of (1.0 - ecco*ecco) + * sinio - sine of inclination + * gsto - gst at time of observation rad + * no - mean motion of satellite + * + * locals : + * ak - + * d1 - + * del - + * adel - + * po - + * + * coupling : + * getgravconst + * gstime - find greenwich sidereal time from the julian date + * + * references : + * hoots, roehrich, norad spacetrack report #3 1980 + * hoots, norad spacetrack report #6 1986 + * hoots, schumacher and glover 2004 + * vallado, crawford, hujsak, kelso 2006 + ----------------------------------------------------------------------------*/ + + function initl(options) { + var ecco = options.ecco, + epoch = options.epoch, + inclo = options.inclo, + opsmode = options.opsmode; + var no = options.no; // sgp4fix use old way of finding gst + // ----------------------- earth constants --------------------- + // sgp4fix identify constants and allow alternate values + // ------------- calculate auxillary epoch quantities ---------- + + var eccsq = ecco * ecco; + var omeosq = 1.0 - eccsq; + var rteosq = Math.sqrt(omeosq); + var cosio = Math.cos(inclo); + var cosio2 = cosio * cosio; // ------------------ un-kozai the mean motion ----------------- + + var ak = Math.pow(xke / no, x2o3); + var d1 = 0.75 * j2 * (3.0 * cosio2 - 1.0) / (rteosq * omeosq); + var delPrime = d1 / (ak * ak); + var adel = ak * (1.0 - delPrime * delPrime - delPrime * (1.0 / 3.0 + 134.0 * delPrime * delPrime / 81.0)); + delPrime = d1 / (adel * adel); + no /= 1.0 + delPrime; + var ao = Math.pow(xke / no, x2o3); + var sinio = Math.sin(inclo); + var po = ao * omeosq; + var con42 = 1.0 - 5.0 * cosio2; + var con41 = -con42 - cosio2 - cosio2; + var ainv = 1.0 / ao; + var posq = po * po; + var rp = ao * (1.0 - ecco); + var method = 'n'; // sgp4fix modern approach to finding sidereal time + + var gsto; + + if (opsmode === 'a') { + // sgp4fix use old way of finding gst + // count integer number of days from 0 jan 1970 + var ts70 = epoch - 7305.0; + var ds70 = Math.floor(ts70 + 1.0e-8); + var tfrac = ts70 - ds70; // find greenwich location at epoch + + var c1 = 1.72027916940703639e-2; + var thgr70 = 1.7321343856509374; + var fk5r = 5.07551419432269442e-15; + var c1p2p = c1 + twoPi; + gsto = (thgr70 + c1 * ds70 + c1p2p * tfrac + ts70 * ts70 * fk5r) % twoPi; + + if (gsto < 0.0) { + gsto += twoPi; + } + } else { + gsto = gstime(epoch + 2433281.5); + } + + return { + no: no, + method: method, + ainv: ainv, + ao: ao, + con41: con41, + con42: con42, + cosio: cosio, + cosio2: cosio2, + eccsq: eccsq, + omeosq: omeosq, + posq: posq, + rp: rp, + rteosq: rteosq, + sinio: sinio, + gsto: gsto + }; + } + + /*----------------------------------------------------------------------------- + * + * procedure dspace + * + * this procedure provides deep space contributions to mean elements for + * perturbing third body. these effects have been averaged over one + * revolution of the sun and moon. for earth resonance effects, the + * effects have been averaged over no revolutions of the satellite. + * (mean motion) + * + * author : david vallado 719-573-2600 28 jun 2005 + * + * inputs : + * d2201, d2211, d3210, d3222, d4410, d4422, d5220, d5232, d5421, d5433 - + * dedt - + * del1, del2, del3 - + * didt - + * dmdt - + * dnodt - + * domdt - + * irez - flag for resonance 0-none, 1-one day, 2-half day + * argpo - argument of perigee + * argpdot - argument of perigee dot (rate) + * t - time + * tc - + * gsto - gst + * xfact - + * xlamo - + * no - mean motion + * atime - + * em - eccentricity + * ft - + * argpm - argument of perigee + * inclm - inclination + * xli - + * mm - mean anomaly + * xni - mean motion + * nodem - right ascension of ascending node + * + * outputs : + * atime - + * em - eccentricity + * argpm - argument of perigee + * inclm - inclination + * xli - + * mm - mean anomaly + * xni - + * nodem - right ascension of ascending node + * dndt - + * nm - mean motion + * + * locals : + * delt - + * ft - + * theta - + * x2li - + * x2omi - + * xl - + * xldot - + * xnddt - + * xndt - + * xomi - + * + * coupling : + * none - + * + * references : + * hoots, roehrich, norad spacetrack report #3 1980 + * hoots, norad spacetrack report #6 1986 + * hoots, schumacher and glover 2004 + * vallado, crawford, hujsak, kelso 2006 + ----------------------------------------------------------------------------*/ + + function dspace(options) { + var irez = options.irez, + d2201 = options.d2201, + d2211 = options.d2211, + d3210 = options.d3210, + d3222 = options.d3222, + d4410 = options.d4410, + d4422 = options.d4422, + d5220 = options.d5220, + d5232 = options.d5232, + d5421 = options.d5421, + d5433 = options.d5433, + dedt = options.dedt, + del1 = options.del1, + del2 = options.del2, + del3 = options.del3, + didt = options.didt, + dmdt = options.dmdt, + dnodt = options.dnodt, + domdt = options.domdt, + argpo = options.argpo, + argpdot = options.argpdot, + t = options.t, + tc = options.tc, + gsto = options.gsto, + xfact = options.xfact, + xlamo = options.xlamo, + no = options.no; + var atime = options.atime, + em = options.em, + argpm = options.argpm, + inclm = options.inclm, + xli = options.xli, + mm = options.mm, + xni = options.xni, + nodem = options.nodem, + nm = options.nm; + var fasx2 = 0.13130908; + var fasx4 = 2.8843198; + var fasx6 = 0.37448087; + var g22 = 5.7686396; + var g32 = 0.95240898; + var g44 = 1.8014998; + var g52 = 1.0508330; + var g54 = 4.4108898; + var rptim = 4.37526908801129966e-3; // equates to 7.29211514668855e-5 rad/sec + + var stepp = 720.0; + var stepn = -720.0; + var step2 = 259200.0; + var delt; + var x2li; + var x2omi; + var xl; + var xldot; + var xnddt; + var xndt; + var xomi; + var dndt = 0.0; + var ft = 0.0; // ----------- calculate deep space resonance effects ----------- + + var theta = (gsto + tc * rptim) % twoPi; + em += dedt * t; + inclm += didt * t; + argpm += domdt * t; + nodem += dnodt * t; + mm += dmdt * t; // sgp4fix for negative inclinations + // the following if statement should be commented out + // if (inclm < 0.0) + // { + // inclm = -inclm; + // argpm = argpm - pi; + // nodem = nodem + pi; + // } + + /* - update resonances : numerical (euler-maclaurin) integration - */ + + /* ------------------------- epoch restart ---------------------- */ + // sgp4fix for propagator problems + // the following integration works for negative time steps and periods + // the specific changes are unknown because the original code was so convoluted + // sgp4fix take out atime = 0.0 and fix for faster operation + + if (irez !== 0) { + // sgp4fix streamline check + if (atime === 0.0 || t * atime <= 0.0 || Math.abs(t) < Math.abs(atime)) { + atime = 0.0; + xni = no; + xli = xlamo; + } // sgp4fix move check outside loop + + + if (t > 0.0) { + delt = stepp; + } else { + delt = stepn; + } + + var iretn = 381; // added for do loop + + while (iretn === 381) { + // ------------------- dot terms calculated ------------- + // ----------- near - synchronous resonance terms ------- + if (irez !== 2) { + xndt = del1 * Math.sin(xli - fasx2) + del2 * Math.sin(2.0 * (xli - fasx4)) + del3 * Math.sin(3.0 * (xli - fasx6)); + xldot = xni + xfact; + xnddt = del1 * Math.cos(xli - fasx2) + 2.0 * del2 * Math.cos(2.0 * (xli - fasx4)) + 3.0 * del3 * Math.cos(3.0 * (xli - fasx6)); + xnddt *= xldot; + } else { + // --------- near - half-day resonance terms -------- + xomi = argpo + argpdot * atime; + x2omi = xomi + xomi; + x2li = xli + xli; + xndt = d2201 * Math.sin(x2omi + xli - g22) + d2211 * Math.sin(xli - g22) + d3210 * Math.sin(xomi + xli - g32) + d3222 * Math.sin(-xomi + xli - g32) + d4410 * Math.sin(x2omi + x2li - g44) + d4422 * Math.sin(x2li - g44) + d5220 * Math.sin(xomi + xli - g52) + d5232 * Math.sin(-xomi + xli - g52) + d5421 * Math.sin(xomi + x2li - g54) + d5433 * Math.sin(-xomi + x2li - g54); + xldot = xni + xfact; + xnddt = d2201 * Math.cos(x2omi + xli - g22) + d2211 * Math.cos(xli - g22) + d3210 * Math.cos(xomi + xli - g32) + d3222 * Math.cos(-xomi + xli - g32) + d5220 * Math.cos(xomi + xli - g52) + d5232 * Math.cos(-xomi + xli - g52) + 2.0 * d4410 * Math.cos(x2omi + x2li - g44) + d4422 * Math.cos(x2li - g44) + d5421 * Math.cos(xomi + x2li - g54) + d5433 * Math.cos(-xomi + x2li - g54); + xnddt *= xldot; + } // ----------------------- integrator ------------------- + // sgp4fix move end checks to end of routine + + + if (Math.abs(t - atime) >= stepp) { + iretn = 381; + } else { + ft = t - atime; + iretn = 0; + } + + if (iretn === 381) { + xli += xldot * delt + xndt * step2; + xni += xndt * delt + xnddt * step2; + atime += delt; + } + } + + nm = xni + xndt * ft + xnddt * ft * ft * 0.5; + xl = xli + xldot * ft + xndt * ft * ft * 0.5; + + if (irez !== 1) { + mm = xl - 2.0 * nodem + 2.0 * theta; + dndt = nm - no; + } else { + mm = xl - nodem - argpm + theta; + dndt = nm - no; + } + + nm = no + dndt; + } + + return { + atime: atime, + em: em, + argpm: argpm, + inclm: inclm, + xli: xli, + mm: mm, + xni: xni, + nodem: nodem, + dndt: dndt, + nm: nm + }; + } + + /*---------------------------------------------------------------------------- + * + * procedure sgp4 + * + * this procedure is the sgp4 prediction model from space command. this is an + * updated and combined version of sgp4 and sdp4, which were originally + * published separately in spacetrack report //3. this version follows the + * methodology from the aiaa paper (2006) describing the history and + * development of the code. + * + * author : david vallado 719-573-2600 28 jun 2005 + * + * inputs : + * satrec - initialised structure from sgp4init() call. + * tsince - time since epoch (minutes) + * + * outputs : + * r - position vector km + * v - velocity km/sec + * return code - non-zero on error. + * 1 - mean elements, ecc >= 1.0 or ecc < -0.001 or a < 0.95 er + * 2 - mean motion less than 0.0 + * 3 - pert elements, ecc < 0.0 or ecc > 1.0 + * 4 - semi-latus rectum < 0.0 + * 5 - epoch elements are sub-orbital + * 6 - satellite has decayed + * + * locals : + * am - + * axnl, aynl - + * betal - + * cosim , sinim , cosomm , sinomm , cnod , snod , cos2u , + * sin2u , coseo1 , sineo1 , cosi , sini , cosip , sinip , + * cosisq , cossu , sinsu , cosu , sinu + * delm - + * delomg - + * dndt - + * eccm - + * emsq - + * ecose - + * el2 - + * eo1 - + * eccp - + * esine - + * argpm - + * argpp - + * omgadf - + * pl - + * r - + * rtemsq - + * rdotl - + * rl - + * rvdot - + * rvdotl - + * su - + * t2 , t3 , t4 , tc + * tem5, temp , temp1 , temp2 , tempa , tempe , templ + * u , ux , uy , uz , vx , vy , vz + * inclm - inclination + * mm - mean anomaly + * nm - mean motion + * nodem - right asc of ascending node + * xinc - + * xincp - + * xl - + * xlm - + * mp - + * xmdf - + * xmx - + * xmy - + * nodedf - + * xnode - + * nodep - + * np - + * + * coupling : + * getgravconst- + * dpper + * dspace + * + * references : + * hoots, roehrich, norad spacetrack report //3 1980 + * hoots, norad spacetrack report //6 1986 + * hoots, schumacher and glover 2004 + * vallado, crawford, hujsak, kelso 2006 + ----------------------------------------------------------------------------*/ + + function sgp4(satrec, tsince) { + /* eslint-disable no-param-reassign */ + var coseo1; + var sineo1; + var cosip; + var sinip; + var cosisq; + var delm; + var delomg; + var eo1; + var argpm; + var argpp; + var su; + var t3; + var t4; + var tc; + var tem5; + var temp; + var tempa; + var tempe; + var templ; + var inclm; + var mm; + var nm; + var nodem; + var xincp; + var xlm; + var mp; + var nodep; + /* ------------------ set mathematical constants --------------- */ + // sgp4fix divisor for divide by zero check on inclination + // the old check used 1.0 + cos(pi-1.0e-9), but then compared it to + // 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency + + var temp4 = 1.5e-12; + var vkmpersec = earthRadius * xke / 60.0; // --------------------- clear sgp4 error flag ----------------- + + satrec.t = tsince; + satrec.error = 0; // ------- update for secular gravity and atmospheric drag ----- + + var xmdf = satrec.mo + satrec.mdot * satrec.t; + var argpdf = satrec.argpo + satrec.argpdot * satrec.t; + var nodedf = satrec.nodeo + satrec.nodedot * satrec.t; + argpm = argpdf; + mm = xmdf; + var t2 = satrec.t * satrec.t; + nodem = nodedf + satrec.nodecf * t2; + tempa = 1.0 - satrec.cc1 * satrec.t; + tempe = satrec.bstar * satrec.cc4 * satrec.t; + templ = satrec.t2cof * t2; + + if (satrec.isimp !== 1) { + delomg = satrec.omgcof * satrec.t; // sgp4fix use mutliply for speed instead of pow + + var delmtemp = 1.0 + satrec.eta * Math.cos(xmdf); + delm = satrec.xmcof * (delmtemp * delmtemp * delmtemp - satrec.delmo); + temp = delomg + delm; + mm = xmdf + temp; + argpm = argpdf - temp; + t3 = t2 * satrec.t; + t4 = t3 * satrec.t; + tempa = tempa - satrec.d2 * t2 - satrec.d3 * t3 - satrec.d4 * t4; + tempe += satrec.bstar * satrec.cc5 * (Math.sin(mm) - satrec.sinmao); + templ = templ + satrec.t3cof * t3 + t4 * (satrec.t4cof + satrec.t * satrec.t5cof); + } + + nm = satrec.no; + var em = satrec.ecco; + inclm = satrec.inclo; + + if (satrec.method === 'd') { + tc = satrec.t; + var dspaceOptions = { + irez: satrec.irez, + d2201: satrec.d2201, + d2211: satrec.d2211, + d3210: satrec.d3210, + d3222: satrec.d3222, + d4410: satrec.d4410, + d4422: satrec.d4422, + d5220: satrec.d5220, + d5232: satrec.d5232, + d5421: satrec.d5421, + d5433: satrec.d5433, + dedt: satrec.dedt, + del1: satrec.del1, + del2: satrec.del2, + del3: satrec.del3, + didt: satrec.didt, + dmdt: satrec.dmdt, + dnodt: satrec.dnodt, + domdt: satrec.domdt, + argpo: satrec.argpo, + argpdot: satrec.argpdot, + t: satrec.t, + tc: tc, + gsto: satrec.gsto, + xfact: satrec.xfact, + xlamo: satrec.xlamo, + no: satrec.no, + atime: satrec.atime, + em: em, + argpm: argpm, + inclm: inclm, + xli: satrec.xli, + mm: mm, + xni: satrec.xni, + nodem: nodem, + nm: nm + }; + var dspaceResult = dspace(dspaceOptions); + em = dspaceResult.em; + argpm = dspaceResult.argpm; + inclm = dspaceResult.inclm; + mm = dspaceResult.mm; + nodem = dspaceResult.nodem; + nm = dspaceResult.nm; + } + + if (nm <= 0.0) { + // printf("// error nm %f\n", nm); + satrec.error = 2; // sgp4fix add return + + return [false, false]; + } + + var am = Math.pow(xke / nm, x2o3) * tempa * tempa; + nm = xke / Math.pow(am, 1.5); + em -= tempe; // fix tolerance for error recognition + // sgp4fix am is fixed from the previous nm check + + if (em >= 1.0 || em < -0.001) { + // || (am < 0.95) + // printf("// error em %f\n", em); + satrec.error = 1; // sgp4fix to return if there is an error in eccentricity + + return [false, false]; + } // sgp4fix fix tolerance to avoid a divide by zero + + + if (em < 1.0e-6) { + em = 1.0e-6; + } + + mm += satrec.no * templ; + xlm = mm + argpm + nodem; + nodem %= twoPi; + argpm %= twoPi; + xlm %= twoPi; + mm = (xlm - argpm - nodem) % twoPi; // ----------------- compute extra mean quantities ------------- + + var sinim = Math.sin(inclm); + var cosim = Math.cos(inclm); // -------------------- add lunar-solar periodics -------------- + + var ep = em; + xincp = inclm; + argpp = argpm; + nodep = nodem; + mp = mm; + sinip = sinim; + cosip = cosim; + + if (satrec.method === 'd') { + var dpperParameters = { + inclo: satrec.inclo, + init: 'n', + ep: ep, + inclp: xincp, + nodep: nodep, + argpp: argpp, + mp: mp, + opsmode: satrec.operationmod + }; + var dpperResult = dpper(satrec, dpperParameters); + ep = dpperResult.ep; + nodep = dpperResult.nodep; + argpp = dpperResult.argpp; + mp = dpperResult.mp; + xincp = dpperResult.inclp; + + if (xincp < 0.0) { + xincp = -xincp; + nodep += pi; + argpp -= pi; + } + + if (ep < 0.0 || ep > 1.0) { + // printf("// error ep %f\n", ep); + satrec.error = 3; // sgp4fix add return + + return [false, false]; + } + } // -------------------- long period periodics ------------------ + + + if (satrec.method === 'd') { + sinip = Math.sin(xincp); + cosip = Math.cos(xincp); + satrec.aycof = -0.5 * j3oj2 * sinip; // sgp4fix for divide by zero for xincp = 180 deg + + if (Math.abs(cosip + 1.0) > 1.5e-12) { + satrec.xlcof = -0.25 * j3oj2 * sinip * (3.0 + 5.0 * cosip) / (1.0 + cosip); + } else { + satrec.xlcof = -0.25 * j3oj2 * sinip * (3.0 + 5.0 * cosip) / temp4; + } + } + + var axnl = ep * Math.cos(argpp); + temp = 1.0 / (am * (1.0 - ep * ep)); + var aynl = ep * Math.sin(argpp) + temp * satrec.aycof; + var xl = mp + argpp + nodep + temp * satrec.xlcof * axnl; // --------------------- solve kepler's equation --------------- + + var u = (xl - nodep) % twoPi; + eo1 = u; + tem5 = 9999.9; + var ktr = 1; // sgp4fix for kepler iteration + // the following iteration needs better limits on corrections + + while (Math.abs(tem5) >= 1.0e-12 && ktr <= 10) { + sineo1 = Math.sin(eo1); + coseo1 = Math.cos(eo1); + tem5 = 1.0 - coseo1 * axnl - sineo1 * aynl; + tem5 = (u - aynl * coseo1 + axnl * sineo1 - eo1) / tem5; + + if (Math.abs(tem5) >= 0.95) { + if (tem5 > 0.0) { + tem5 = 0.95; + } else { + tem5 = -0.95; + } + } + + eo1 += tem5; + ktr += 1; + } // ------------- short period preliminary quantities ----------- + + + var ecose = axnl * coseo1 + aynl * sineo1; + var esine = axnl * sineo1 - aynl * coseo1; + var el2 = axnl * axnl + aynl * aynl; + var pl = am * (1.0 - el2); + + if (pl < 0.0) { + // printf("// error pl %f\n", pl); + satrec.error = 4; // sgp4fix add return + + return [false, false]; + } + + var rl = am * (1.0 - ecose); + var rdotl = Math.sqrt(am) * esine / rl; + var rvdotl = Math.sqrt(pl) / rl; + var betal = Math.sqrt(1.0 - el2); + temp = esine / (1.0 + betal); + var sinu = am / rl * (sineo1 - aynl - axnl * temp); + var cosu = am / rl * (coseo1 - axnl + aynl * temp); + su = Math.atan2(sinu, cosu); + var sin2u = (cosu + cosu) * sinu; + var cos2u = 1.0 - 2.0 * sinu * sinu; + temp = 1.0 / pl; + var temp1 = 0.5 * j2 * temp; + var temp2 = temp1 * temp; // -------------- update for short period periodics ------------ + + if (satrec.method === 'd') { + cosisq = cosip * cosip; + satrec.con41 = 3.0 * cosisq - 1.0; + satrec.x1mth2 = 1.0 - cosisq; + satrec.x7thm1 = 7.0 * cosisq - 1.0; + } + + var mrt = rl * (1.0 - 1.5 * temp2 * betal * satrec.con41) + 0.5 * temp1 * satrec.x1mth2 * cos2u; + su -= 0.25 * temp2 * satrec.x7thm1 * sin2u; + var xnode = nodep + 1.5 * temp2 * cosip * sin2u; + var xinc = xincp + 1.5 * temp2 * cosip * sinip * cos2u; + var mvt = rdotl - nm * temp1 * satrec.x1mth2 * sin2u / xke; + var rvdot = rvdotl + nm * temp1 * (satrec.x1mth2 * cos2u + 1.5 * satrec.con41) / xke; // --------------------- orientation vectors ------------------- + + var sinsu = Math.sin(su); + var cossu = Math.cos(su); + var snod = Math.sin(xnode); + var cnod = Math.cos(xnode); + var sini = Math.sin(xinc); + var cosi = Math.cos(xinc); + var xmx = -snod * cosi; + var xmy = cnod * cosi; + var ux = xmx * sinsu + cnod * cossu; + var uy = xmy * sinsu + snod * cossu; + var uz = sini * sinsu; + var vx = xmx * cossu - cnod * sinsu; + var vy = xmy * cossu - snod * sinsu; + var vz = sini * cossu; // --------- position and velocity (in km and km/sec) ---------- + + var r = { + x: mrt * ux * earthRadius, + y: mrt * uy * earthRadius, + z: mrt * uz * earthRadius + }; + var v = { + x: (mvt * ux + rvdot * vx) * vkmpersec, + y: (mvt * uy + rvdot * vy) * vkmpersec, + z: (mvt * uz + rvdot * vz) * vkmpersec + }; // sgp4fix for decaying satellites + + if (mrt < 1.0) { + // printf("// decay condition %11.6f \n",mrt); + satrec.error = 6; + return { + position: false, + velocity: false + }; + } + + return { + position: r, + velocity: v + }; + /* eslint-enable no-param-reassign */ + } + + /*----------------------------------------------------------------------------- + * + * procedure sgp4init + * + * this procedure initializes variables for sgp4. + * + * author : david vallado 719-573-2600 28 jun 2005 + * author : david vallado 719-573-2600 28 jun 2005 + * + * inputs : + * opsmode - mode of operation afspc or improved 'a', 'i' + * satn - satellite number + * bstar - sgp4 type drag coefficient kg/m2er + * ecco - eccentricity + * epoch - epoch time in days from jan 0, 1950. 0 hr + * argpo - argument of perigee (output if ds) + * inclo - inclination + * mo - mean anomaly (output if ds) + * no - mean motion + * nodeo - right ascension of ascending node + * + * outputs : + * rec - common values for subsequent calls + * return code - non-zero on error. + * 1 - mean elements, ecc >= 1.0 or ecc < -0.001 or a < 0.95 er + * 2 - mean motion less than 0.0 + * 3 - pert elements, ecc < 0.0 or ecc > 1.0 + * 4 - semi-latus rectum < 0.0 + * 5 - epoch elements are sub-orbital + * 6 - satellite has decayed + * + * locals : + * cnodm , snodm , cosim , sinim , cosomm , sinomm + * cc1sq , cc2 , cc3 + * coef , coef1 + * cosio4 - + * day - + * dndt - + * em - eccentricity + * emsq - eccentricity squared + * eeta - + * etasq - + * gam - + * argpm - argument of perigee + * nodem - + * inclm - inclination + * mm - mean anomaly + * nm - mean motion + * perige - perigee + * pinvsq - + * psisq - + * qzms24 - + * rtemsq - + * s1, s2, s3, s4, s5, s6, s7 - + * sfour - + * ss1, ss2, ss3, ss4, ss5, ss6, ss7 - + * sz1, sz2, sz3 + * sz11, sz12, sz13, sz21, sz22, sz23, sz31, sz32, sz33 - + * tc - + * temp - + * temp1, temp2, temp3 - + * tsi - + * xpidot - + * xhdot1 - + * z1, z2, z3 - + * z11, z12, z13, z21, z22, z23, z31, z32, z33 - + * + * coupling : + * getgravconst- + * initl - + * dscom - + * dpper - + * dsinit - + * sgp4 - + * + * references : + * hoots, roehrich, norad spacetrack report #3 1980 + * hoots, norad spacetrack report #6 1986 + * hoots, schumacher and glover 2004 + * vallado, crawford, hujsak, kelso 2006 + ----------------------------------------------------------------------------*/ + + function sgp4init(satrec, options) { + /* eslint-disable no-param-reassign */ + var opsmode = options.opsmode, + satn = options.satn, + epoch = options.epoch, + xbstar = options.xbstar, + xecco = options.xecco, + xargpo = options.xargpo, + xinclo = options.xinclo, + xmo = options.xmo, + xno = options.xno, + xnodeo = options.xnodeo; + var cosim; + var sinim; + var cc1sq; + var cc2; + var cc3; + var coef; + var coef1; + var cosio4; + var em; + var emsq; + var eeta; + var etasq; + var argpm; + var nodem; + var inclm; + var mm; + var nm; + var perige; + var pinvsq; + var psisq; + var qzms24; + var s1; + var s2; + var s3; + var s4; + var s5; + var sfour; + var ss1; + var ss2; + var ss3; + var ss4; + var ss5; + var sz1; + var sz3; + var sz11; + var sz13; + var sz21; + var sz23; + var sz31; + var sz33; + var tc; + var temp; + var temp1; + var temp2; + var temp3; + var tsi; + var xpidot; + var xhdot1; + var z1; + var z3; + var z11; + var z13; + var z21; + var z23; + var z31; + var z33; + /* ------------------------ initialization --------------------- */ + // sgp4fix divisor for divide by zero check on inclination + // the old check used 1.0 + Math.cos(pi-1.0e-9), but then compared it to + // 1.5 e-12, so the threshold was changed to 1.5e-12 for consistency + + var temp4 = 1.5e-12; // ----------- set all near earth variables to zero ------------ + + satrec.isimp = 0; + satrec.method = 'n'; + satrec.aycof = 0.0; + satrec.con41 = 0.0; + satrec.cc1 = 0.0; + satrec.cc4 = 0.0; + satrec.cc5 = 0.0; + satrec.d2 = 0.0; + satrec.d3 = 0.0; + satrec.d4 = 0.0; + satrec.delmo = 0.0; + satrec.eta = 0.0; + satrec.argpdot = 0.0; + satrec.omgcof = 0.0; + satrec.sinmao = 0.0; + satrec.t = 0.0; + satrec.t2cof = 0.0; + satrec.t3cof = 0.0; + satrec.t4cof = 0.0; + satrec.t5cof = 0.0; + satrec.x1mth2 = 0.0; + satrec.x7thm1 = 0.0; + satrec.mdot = 0.0; + satrec.nodedot = 0.0; + satrec.xlcof = 0.0; + satrec.xmcof = 0.0; + satrec.nodecf = 0.0; // ----------- set all deep space variables to zero ------------ + + satrec.irez = 0; + satrec.d2201 = 0.0; + satrec.d2211 = 0.0; + satrec.d3210 = 0.0; + satrec.d3222 = 0.0; + satrec.d4410 = 0.0; + satrec.d4422 = 0.0; + satrec.d5220 = 0.0; + satrec.d5232 = 0.0; + satrec.d5421 = 0.0; + satrec.d5433 = 0.0; + satrec.dedt = 0.0; + satrec.del1 = 0.0; + satrec.del2 = 0.0; + satrec.del3 = 0.0; + satrec.didt = 0.0; + satrec.dmdt = 0.0; + satrec.dnodt = 0.0; + satrec.domdt = 0.0; + satrec.e3 = 0.0; + satrec.ee2 = 0.0; + satrec.peo = 0.0; + satrec.pgho = 0.0; + satrec.pho = 0.0; + satrec.pinco = 0.0; + satrec.plo = 0.0; + satrec.se2 = 0.0; + satrec.se3 = 0.0; + satrec.sgh2 = 0.0; + satrec.sgh3 = 0.0; + satrec.sgh4 = 0.0; + satrec.sh2 = 0.0; + satrec.sh3 = 0.0; + satrec.si2 = 0.0; + satrec.si3 = 0.0; + satrec.sl2 = 0.0; + satrec.sl3 = 0.0; + satrec.sl4 = 0.0; + satrec.gsto = 0.0; + satrec.xfact = 0.0; + satrec.xgh2 = 0.0; + satrec.xgh3 = 0.0; + satrec.xgh4 = 0.0; + satrec.xh2 = 0.0; + satrec.xh3 = 0.0; + satrec.xi2 = 0.0; + satrec.xi3 = 0.0; + satrec.xl2 = 0.0; + satrec.xl3 = 0.0; + satrec.xl4 = 0.0; + satrec.xlamo = 0.0; + satrec.zmol = 0.0; + satrec.zmos = 0.0; + satrec.atime = 0.0; + satrec.xli = 0.0; + satrec.xni = 0.0; // sgp4fix - note the following variables are also passed directly via satrec. + // it is possible to streamline the sgp4init call by deleting the "x" + // variables, but the user would need to set the satrec.* values first. we + // include the additional assignments in case twoline2rv is not used. + + satrec.bstar = xbstar; + satrec.ecco = xecco; + satrec.argpo = xargpo; + satrec.inclo = xinclo; + satrec.mo = xmo; + satrec.no = xno; + satrec.nodeo = xnodeo; // sgp4fix add opsmode + + satrec.operationmode = opsmode; // ------------------------ earth constants ----------------------- + // sgp4fix identify constants and allow alternate values + + var ss = 78.0 / earthRadius + 1.0; // sgp4fix use multiply for speed instead of pow + + var qzms2ttemp = (120.0 - 78.0) / earthRadius; + var qzms2t = qzms2ttemp * qzms2ttemp * qzms2ttemp * qzms2ttemp; + satrec.init = 'y'; + satrec.t = 0.0; + var initlOptions = { + satn: satn, + ecco: satrec.ecco, + epoch: epoch, + inclo: satrec.inclo, + no: satrec.no, + method: satrec.method, + opsmode: satrec.operationmode + }; + var initlResult = initl(initlOptions); + var ao = initlResult.ao, + con42 = initlResult.con42, + cosio = initlResult.cosio, + cosio2 = initlResult.cosio2, + eccsq = initlResult.eccsq, + omeosq = initlResult.omeosq, + posq = initlResult.posq, + rp = initlResult.rp, + rteosq = initlResult.rteosq, + sinio = initlResult.sinio; + satrec.no = initlResult.no; + satrec.con41 = initlResult.con41; + satrec.gsto = initlResult.gsto; + satrec.error = 0; // sgp4fix remove this check as it is unnecessary + // the mrt check in sgp4 handles decaying satellite cases even if the starting + // condition is below the surface of te earth + // if (rp < 1.0) + // { + // printf("// *** satn%d epoch elts sub-orbital ***\n", satn); + // satrec.error = 5; + // } + + if (omeosq >= 0.0 || satrec.no >= 0.0) { + satrec.isimp = 0; + + if ((rp < 220.0 / earthRadius) + 1.0) { + satrec.isimp = 1; + } + + sfour = ss; + qzms24 = qzms2t; + perige = (rp - 1.0) * earthRadius; // - for perigees below 156 km, s and qoms2t are altered - + + if (perige < 156.0) { + sfour = perige - 78.0; + + if (perige < 98.0) { + sfour = 20.0; + } // sgp4fix use multiply for speed instead of pow + + + var qzms24temp = (120.0 - sfour) / earthRadius; + qzms24 = qzms24temp * qzms24temp * qzms24temp * qzms24temp; + sfour = sfour / earthRadius + 1.0; + } + + pinvsq = 1.0 / posq; + tsi = 1.0 / (ao - sfour); + satrec.eta = ao * satrec.ecco * tsi; + etasq = satrec.eta * satrec.eta; + eeta = satrec.ecco * satrec.eta; + psisq = Math.abs(1.0 - etasq); + coef = qzms24 * Math.pow(tsi, 4.0); + coef1 = coef / Math.pow(psisq, 3.5); + cc2 = coef1 * satrec.no * (ao * (1.0 + 1.5 * etasq + eeta * (4.0 + etasq)) + 0.375 * j2 * tsi / psisq * satrec.con41 * (8.0 + 3.0 * etasq * (8.0 + etasq))); + satrec.cc1 = satrec.bstar * cc2; + cc3 = 0.0; + + if (satrec.ecco > 1.0e-4) { + cc3 = -2.0 * coef * tsi * j3oj2 * satrec.no * sinio / satrec.ecco; + } + + satrec.x1mth2 = 1.0 - cosio2; + satrec.cc4 = 2.0 * satrec.no * coef1 * ao * omeosq * (satrec.eta * (2.0 + 0.5 * etasq) + satrec.ecco * (0.5 + 2.0 * etasq) - j2 * tsi / (ao * psisq) * (-3.0 * satrec.con41 * (1.0 - 2.0 * eeta + etasq * (1.5 - 0.5 * eeta)) + 0.75 * satrec.x1mth2 * (2.0 * etasq - eeta * (1.0 + etasq)) * Math.cos(2.0 * satrec.argpo))); + satrec.cc5 = 2.0 * coef1 * ao * omeosq * (1.0 + 2.75 * (etasq + eeta) + eeta * etasq); + cosio4 = cosio2 * cosio2; + temp1 = 1.5 * j2 * pinvsq * satrec.no; + temp2 = 0.5 * temp1 * j2 * pinvsq; + temp3 = -0.46875 * j4 * pinvsq * pinvsq * satrec.no; + satrec.mdot = satrec.no + 0.5 * temp1 * rteosq * satrec.con41 + 0.0625 * temp2 * rteosq * (13.0 - 78.0 * cosio2 + 137.0 * cosio4); + satrec.argpdot = -0.5 * temp1 * con42 + 0.0625 * temp2 * (7.0 - 114.0 * cosio2 + 395.0 * cosio4) + temp3 * (3.0 - 36.0 * cosio2 + 49.0 * cosio4); + xhdot1 = -temp1 * cosio; + satrec.nodedot = xhdot1 + (0.5 * temp2 * (4.0 - 19.0 * cosio2) + 2.0 * temp3 * (3.0 - 7.0 * cosio2)) * cosio; + xpidot = satrec.argpdot + satrec.nodedot; + satrec.omgcof = satrec.bstar * cc3 * Math.cos(satrec.argpo); + satrec.xmcof = 0.0; + + if (satrec.ecco > 1.0e-4) { + satrec.xmcof = -x2o3 * coef * satrec.bstar / eeta; + } + + satrec.nodecf = 3.5 * omeosq * xhdot1 * satrec.cc1; + satrec.t2cof = 1.5 * satrec.cc1; // sgp4fix for divide by zero with xinco = 180 deg + + if (Math.abs(cosio + 1.0) > 1.5e-12) { + satrec.xlcof = -0.25 * j3oj2 * sinio * (3.0 + 5.0 * cosio) / (1.0 + cosio); + } else { + satrec.xlcof = -0.25 * j3oj2 * sinio * (3.0 + 5.0 * cosio) / temp4; + } + + satrec.aycof = -0.5 * j3oj2 * sinio; // sgp4fix use multiply for speed instead of pow + + var delmotemp = 1.0 + satrec.eta * Math.cos(satrec.mo); + satrec.delmo = delmotemp * delmotemp * delmotemp; + satrec.sinmao = Math.sin(satrec.mo); + satrec.x7thm1 = 7.0 * cosio2 - 1.0; // --------------- deep space initialization ------------- + + if (2 * pi / satrec.no >= 225.0) { + satrec.method = 'd'; + satrec.isimp = 1; + tc = 0.0; + inclm = satrec.inclo; + var dscomOptions = { + epoch: epoch, + ep: satrec.ecco, + argpp: satrec.argpo, + tc: tc, + inclp: satrec.inclo, + nodep: satrec.nodeo, + np: satrec.no, + e3: satrec.e3, + ee2: satrec.ee2, + peo: satrec.peo, + pgho: satrec.pgho, + pho: satrec.pho, + pinco: satrec.pinco, + plo: satrec.plo, + se2: satrec.se2, + se3: satrec.se3, + sgh2: satrec.sgh2, + sgh3: satrec.sgh3, + sgh4: satrec.sgh4, + sh2: satrec.sh2, + sh3: satrec.sh3, + si2: satrec.si2, + si3: satrec.si3, + sl2: satrec.sl2, + sl3: satrec.sl3, + sl4: satrec.sl4, + xgh2: satrec.xgh2, + xgh3: satrec.xgh3, + xgh4: satrec.xgh4, + xh2: satrec.xh2, + xh3: satrec.xh3, + xi2: satrec.xi2, + xi3: satrec.xi3, + xl2: satrec.xl2, + xl3: satrec.xl3, + xl4: satrec.xl4, + zmol: satrec.zmol, + zmos: satrec.zmos + }; + var dscomResult = dscom(dscomOptions); + satrec.e3 = dscomResult.e3; + satrec.ee2 = dscomResult.ee2; + satrec.peo = dscomResult.peo; + satrec.pgho = dscomResult.pgho; + satrec.pho = dscomResult.pho; + satrec.pinco = dscomResult.pinco; + satrec.plo = dscomResult.plo; + satrec.se2 = dscomResult.se2; + satrec.se3 = dscomResult.se3; + satrec.sgh2 = dscomResult.sgh2; + satrec.sgh3 = dscomResult.sgh3; + satrec.sgh4 = dscomResult.sgh4; + satrec.sh2 = dscomResult.sh2; + satrec.sh3 = dscomResult.sh3; + satrec.si2 = dscomResult.si2; + satrec.si3 = dscomResult.si3; + satrec.sl2 = dscomResult.sl2; + satrec.sl3 = dscomResult.sl3; + satrec.sl4 = dscomResult.sl4; + sinim = dscomResult.sinim; + cosim = dscomResult.cosim; + em = dscomResult.em; + emsq = dscomResult.emsq; + s1 = dscomResult.s1; + s2 = dscomResult.s2; + s3 = dscomResult.s3; + s4 = dscomResult.s4; + s5 = dscomResult.s5; + ss1 = dscomResult.ss1; + ss2 = dscomResult.ss2; + ss3 = dscomResult.ss3; + ss4 = dscomResult.ss4; + ss5 = dscomResult.ss5; + sz1 = dscomResult.sz1; + sz3 = dscomResult.sz3; + sz11 = dscomResult.sz11; + sz13 = dscomResult.sz13; + sz21 = dscomResult.sz21; + sz23 = dscomResult.sz23; + sz31 = dscomResult.sz31; + sz33 = dscomResult.sz33; + satrec.xgh2 = dscomResult.xgh2; + satrec.xgh3 = dscomResult.xgh3; + satrec.xgh4 = dscomResult.xgh4; + satrec.xh2 = dscomResult.xh2; + satrec.xh3 = dscomResult.xh3; + satrec.xi2 = dscomResult.xi2; + satrec.xi3 = dscomResult.xi3; + satrec.xl2 = dscomResult.xl2; + satrec.xl3 = dscomResult.xl3; + satrec.xl4 = dscomResult.xl4; + satrec.zmol = dscomResult.zmol; + satrec.zmos = dscomResult.zmos; + nm = dscomResult.nm; + z1 = dscomResult.z1; + z3 = dscomResult.z3; + z11 = dscomResult.z11; + z13 = dscomResult.z13; + z21 = dscomResult.z21; + z23 = dscomResult.z23; + z31 = dscomResult.z31; + z33 = dscomResult.z33; + var dpperOptions = { + inclo: inclm, + init: satrec.init, + ep: satrec.ecco, + inclp: satrec.inclo, + nodep: satrec.nodeo, + argpp: satrec.argpo, + mp: satrec.mo, + opsmode: satrec.operationmode + }; + var dpperResult = dpper(satrec, dpperOptions); + satrec.ecco = dpperResult.ep; + satrec.inclo = dpperResult.inclp; + satrec.nodeo = dpperResult.nodep; + satrec.argpo = dpperResult.argpp; + satrec.mo = dpperResult.mp; + argpm = 0.0; + nodem = 0.0; + mm = 0.0; + var dsinitOptions = { + cosim: cosim, + emsq: emsq, + argpo: satrec.argpo, + s1: s1, + s2: s2, + s3: s3, + s4: s4, + s5: s5, + sinim: sinim, + ss1: ss1, + ss2: ss2, + ss3: ss3, + ss4: ss4, + ss5: ss5, + sz1: sz1, + sz3: sz3, + sz11: sz11, + sz13: sz13, + sz21: sz21, + sz23: sz23, + sz31: sz31, + sz33: sz33, + t: satrec.t, + tc: tc, + gsto: satrec.gsto, + mo: satrec.mo, + mdot: satrec.mdot, + no: satrec.no, + nodeo: satrec.nodeo, + nodedot: satrec.nodedot, + xpidot: xpidot, + z1: z1, + z3: z3, + z11: z11, + z13: z13, + z21: z21, + z23: z23, + z31: z31, + z33: z33, + ecco: satrec.ecco, + eccsq: eccsq, + em: em, + argpm: argpm, + inclm: inclm, + mm: mm, + nm: nm, + nodem: nodem, + irez: satrec.irez, + atime: satrec.atime, + d2201: satrec.d2201, + d2211: satrec.d2211, + d3210: satrec.d3210, + d3222: satrec.d3222, + d4410: satrec.d4410, + d4422: satrec.d4422, + d5220: satrec.d5220, + d5232: satrec.d5232, + d5421: satrec.d5421, + d5433: satrec.d5433, + dedt: satrec.dedt, + didt: satrec.didt, + dmdt: satrec.dmdt, + dnodt: satrec.dnodt, + domdt: satrec.domdt, + del1: satrec.del1, + del2: satrec.del2, + del3: satrec.del3, + xfact: satrec.xfact, + xlamo: satrec.xlamo, + xli: satrec.xli, + xni: satrec.xni + }; + var dsinitResult = dsinit(dsinitOptions); + satrec.irez = dsinitResult.irez; + satrec.atime = dsinitResult.atime; + satrec.d2201 = dsinitResult.d2201; + satrec.d2211 = dsinitResult.d2211; + satrec.d3210 = dsinitResult.d3210; + satrec.d3222 = dsinitResult.d3222; + satrec.d4410 = dsinitResult.d4410; + satrec.d4422 = dsinitResult.d4422; + satrec.d5220 = dsinitResult.d5220; + satrec.d5232 = dsinitResult.d5232; + satrec.d5421 = dsinitResult.d5421; + satrec.d5433 = dsinitResult.d5433; + satrec.dedt = dsinitResult.dedt; + satrec.didt = dsinitResult.didt; + satrec.dmdt = dsinitResult.dmdt; + satrec.dnodt = dsinitResult.dnodt; + satrec.domdt = dsinitResult.domdt; + satrec.del1 = dsinitResult.del1; + satrec.del2 = dsinitResult.del2; + satrec.del3 = dsinitResult.del3; + satrec.xfact = dsinitResult.xfact; + satrec.xlamo = dsinitResult.xlamo; + satrec.xli = dsinitResult.xli; + satrec.xni = dsinitResult.xni; + } // ----------- set variables if not deep space ----------- + + + if (satrec.isimp !== 1) { + cc1sq = satrec.cc1 * satrec.cc1; + satrec.d2 = 4.0 * ao * tsi * cc1sq; + temp = satrec.d2 * tsi * satrec.cc1 / 3.0; + satrec.d3 = (17.0 * ao + sfour) * temp; + satrec.d4 = 0.5 * temp * ao * tsi * (221.0 * ao + 31.0 * sfour) * satrec.cc1; + satrec.t3cof = satrec.d2 + 2.0 * cc1sq; + satrec.t4cof = 0.25 * (3.0 * satrec.d3 + satrec.cc1 * (12.0 * satrec.d2 + 10.0 * cc1sq)); + satrec.t5cof = 0.2 * (3.0 * satrec.d4 + 12.0 * satrec.cc1 * satrec.d3 + 6.0 * satrec.d2 * satrec.d2 + 15.0 * cc1sq * (2.0 * satrec.d2 + cc1sq)); + } + /* finally propogate to zero epoch to initialize all others. */ + // sgp4fix take out check to let satellites process until they are actually below earth surface + // if(satrec.error == 0) + + } + + sgp4(satrec, 0, 0); + satrec.init = 'n'; + /* eslint-enable no-param-reassign */ + } + + /* ----------------------------------------------------------------------------- + * + * function twoline2rv + * + * this function converts the two line element set character string data to + * variables and initializes the sgp4 variables. several intermediate varaibles + * and quantities are determined. note that the result is a structure so multiple + * satellites can be processed simultaneously without having to reinitialize. the + * verification mode is an important option that permits quick checks of any + * changes to the underlying technical theory. this option works using a + * modified tle file in which the start, stop, and delta time values are + * included at the end of the second line of data. this only works with the + * verification mode. the catalog mode simply propagates from -1440 to 1440 min + * from epoch and is useful when performing entire catalog runs. + * + * author : david vallado 719-573-2600 1 mar 2001 + * + * inputs : + * longstr1 - first line of the tle + * longstr2 - second line of the tle + * typerun - type of run verification 'v', catalog 'c', + * manual 'm' + * typeinput - type of manual input mfe 'm', epoch 'e', dayofyr 'd' + * opsmode - mode of operation afspc or improved 'a', 'i' + * whichconst - which set of constants to use 72, 84 + * + * outputs : + * satrec - structure containing all the sgp4 satellite information + * + * coupling : + * getgravconst- + * days2mdhms - conversion of days to month, day, hour, minute, second + * jday - convert day month year hour minute second into julian date + * sgp4init - initialize the sgp4 variables + * + * references : + * norad spacetrack report #3 + * vallado, crawford, hujsak, kelso 2006 + --------------------------------------------------------------------------- */ + + /** + * Return a Satellite imported from two lines of TLE data. + * + * Provide the two TLE lines as strings `longstr1` and `longstr2`, + * and select which standard set of gravitational constants you want + * by providing `gravity_constants`: + * + * `sgp4.propagation.wgs72` - Standard WGS 72 model + * `sgp4.propagation.wgs84` - More recent WGS 84 model + * `sgp4.propagation.wgs72old` - Legacy support for old SGP4 behavior + * + * Normally, computations are made using letious recent improvements + * to the algorithm. If you want to turn some of these off and go + * back into "afspc" mode, then set `afspc_mode` to `True`. + */ + + function twoline2satrec(longstr1, longstr2) { + var opsmode = 'i'; + var xpdotp = 1440.0 / (2.0 * pi); // 229.1831180523293; + + var year = 0; + var satrec = {}; + satrec.error = 0; + satrec.satnum = longstr1.substring(2, 7); + satrec.epochyr = parseInt(longstr1.substring(18, 20), 10); + satrec.epochdays = parseFloat(longstr1.substring(20, 32)); + satrec.ndot = parseFloat(longstr1.substring(33, 43)); + satrec.nddot = parseFloat(".".concat(parseInt(longstr1.substring(44, 50), 10), "E").concat(longstr1.substring(50, 52))); + satrec.bstar = parseFloat("".concat(longstr1.substring(53, 54), ".").concat(parseInt(longstr1.substring(54, 59), 10), "E").concat(longstr1.substring(59, 61))); // satrec.satnum = longstr2.substring(2, 7); + + satrec.inclo = parseFloat(longstr2.substring(8, 16)); + satrec.nodeo = parseFloat(longstr2.substring(17, 25)); + satrec.ecco = parseFloat(".".concat(longstr2.substring(26, 33))); + satrec.argpo = parseFloat(longstr2.substring(34, 42)); + satrec.mo = parseFloat(longstr2.substring(43, 51)); + satrec.no = parseFloat(longstr2.substring(52, 63)); // ---- find no, ndot, nddot ---- + + satrec.no /= xpdotp; // rad/min + // satrec.nddot= satrec.nddot * Math.pow(10.0, nexp); + // satrec.bstar= satrec.bstar * Math.pow(10.0, ibexp); + // ---- convert to sgp4 units ---- + + satrec.a = Math.pow(satrec.no * tumin, -2.0 / 3.0); + satrec.ndot /= xpdotp * 1440.0; // ? * minperday + + satrec.nddot /= xpdotp * 1440.0 * 1440; // ---- find standard orbital elements ---- + + satrec.inclo *= deg2rad; + satrec.nodeo *= deg2rad; + satrec.argpo *= deg2rad; + satrec.mo *= deg2rad; + satrec.alta = satrec.a * (1.0 + satrec.ecco) - 1.0; + satrec.altp = satrec.a * (1.0 - satrec.ecco) - 1.0; // ---------------------------------------------------------------- + // find sgp4epoch time of element set + // remember that sgp4 uses units of days from 0 jan 1950 (sgp4epoch) + // and minutes from the epoch (time) + // ---------------------------------------------------------------- + // ---------------- temp fix for years from 1957-2056 ------------------- + // --------- correct fix will occur when year is 4-digit in tle --------- + + if (satrec.epochyr < 57) { + year = satrec.epochyr + 2000; + } else { + year = satrec.epochyr + 1900; + } + + var mdhmsResult = days2mdhms(year, satrec.epochdays); + var mon = mdhmsResult.mon, + day = mdhmsResult.day, + hr = mdhmsResult.hr, + minute = mdhmsResult.minute, + sec = mdhmsResult.sec; + satrec.jdsatepoch = jday(year, mon, day, hr, minute, sec); // ---------------- initialize the orbit at sgp4epoch ------------------- + + sgp4init(satrec, { + opsmode: opsmode, + satn: satrec.satnum, + epoch: satrec.jdsatepoch - 2433281.5, + xbstar: satrec.bstar, + xecco: satrec.ecco, + xargpo: satrec.argpo, + xinclo: satrec.inclo, + xmo: satrec.mo, + xno: satrec.no, + xnodeo: satrec.nodeo + }); + return satrec; + } + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } + } + + function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } + + function propagate() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // Return a position and velocity vector for a given date and time. + var satrec = args[0]; + var date = Array.prototype.slice.call(args, 1); + var j = jday.apply(void 0, _toConsumableArray(date)); + var m = (j - satrec.jdsatepoch) * minutesPerDay; + return sgp4(satrec, m); + } + + function dopplerFactor(location, position, velocity) { + var currentRange = Math.sqrt(Math.pow(position.x - location.x, 2) + Math.pow(position.y - location.y, 2) + Math.pow(position.z - location.z, 2)); + var nextPos = { + x: position.x + velocity.x, + y: position.y + velocity.y, + z: position.z + velocity.z + }; + var nextRange = Math.sqrt(Math.pow(nextPos.x - location.x, 2) + Math.pow(nextPos.y - location.y, 2) + Math.pow(nextPos.z - location.z, 2)); + var rangeRate = nextRange - currentRange; + + function sign(value) { + return value >= 0 ? 1 : -1; + } + + rangeRate *= sign(rangeRate); + var c = 299792.458; // Speed of light in km/s + + return 1 + rangeRate / c; + } + + function radiansToDegrees(radians) { + return radians * rad2deg; + } + function degreesToRadians(degrees) { + return degrees * deg2rad; + } + function degreesLat(radians) { + if (radians < -pi / 2 || radians > pi / 2) { + throw new RangeError('Latitude radians must be in range [-pi/2; pi/2].'); + } + + return radiansToDegrees(radians); + } + function degreesLong(radians) { + if (radians < -pi || radians > pi) { + throw new RangeError('Longitude radians must be in range [-pi; pi].'); + } + + return radiansToDegrees(radians); + } + function radiansLat(degrees) { + if (degrees < -90 || degrees > 90) { + throw new RangeError('Latitude degrees must be in range [-90; 90].'); + } + + return degreesToRadians(degrees); + } + function radiansLong(degrees) { + if (degrees < -180 || degrees > 180) { + throw new RangeError('Longitude degrees must be in range [-180; 180].'); + } + + return degreesToRadians(degrees); + } + function geodeticToEcf(geodetic) { + var longitude = geodetic.longitude, + latitude = geodetic.latitude, + height = geodetic.height; + var a = 6378.137; + var b = 6356.7523142; + var f = (a - b) / a; + var e2 = 2 * f - f * f; + var normal = a / Math.sqrt(1 - e2 * (Math.sin(latitude) * Math.sin(latitude))); + var x = (normal + height) * Math.cos(latitude) * Math.cos(longitude); + var y = (normal + height) * Math.cos(latitude) * Math.sin(longitude); + var z = (normal * (1 - e2) + height) * Math.sin(latitude); + return { + x: x, + y: y, + z: z + }; + } + function eciToGeodetic(eci, gmst) { + // http://www.celestrak.com/columns/v02n03/ + var a = 6378.137; + var b = 6356.7523142; + var R = Math.sqrt(eci.x * eci.x + eci.y * eci.y); + var f = (a - b) / a; + var e2 = 2 * f - f * f; + var longitude = Math.atan2(eci.y, eci.x) - gmst; + + while (longitude < -pi) { + longitude += twoPi; + } + + while (longitude > pi) { + longitude -= twoPi; + } + + var kmax = 20; + var k = 0; + var latitude = Math.atan2(eci.z, Math.sqrt(eci.x * eci.x + eci.y * eci.y)); + var C; + + while (k < kmax) { + C = 1 / Math.sqrt(1 - e2 * (Math.sin(latitude) * Math.sin(latitude))); + latitude = Math.atan2(eci.z + a * C * e2 * Math.sin(latitude), R); + k += 1; + } + + var height = R / Math.cos(latitude) - a * C; + return { + longitude: longitude, + latitude: latitude, + height: height + }; + } + function ecfToEci(ecf, gmst) { + // ccar.colorado.edu/ASEN5070/handouts/coordsys.doc + // + // [X] [C -S 0][X] + // [Y] = [S C 0][Y] + // [Z]eci [0 0 1][Z]ecf + // + var X = ecf.x * Math.cos(gmst) - ecf.y * Math.sin(gmst); + var Y = ecf.x * Math.sin(gmst) + ecf.y * Math.cos(gmst); + var Z = ecf.z; + return { + x: X, + y: Y, + z: Z + }; + } + function eciToEcf(eci, gmst) { + // ccar.colorado.edu/ASEN5070/handouts/coordsys.doc + // + // [X] [C -S 0][X] + // [Y] = [S C 0][Y] + // [Z]eci [0 0 1][Z]ecf + // + // + // Inverse: + // [X] [C S 0][X] + // [Y] = [-S C 0][Y] + // [Z]ecf [0 0 1][Z]eci + var x = eci.x * Math.cos(gmst) + eci.y * Math.sin(gmst); + var y = eci.x * -Math.sin(gmst) + eci.y * Math.cos(gmst); + var z = eci.z; + return { + x: x, + y: y, + z: z + }; + } + + function topocentric(observerGeodetic, satelliteEcf) { + // http://www.celestrak.com/columns/v02n02/ + // TS Kelso's method, except I'm using ECF frame + // and he uses ECI. + var longitude = observerGeodetic.longitude, + latitude = observerGeodetic.latitude; + var observerEcf = geodeticToEcf(observerGeodetic); + var rx = satelliteEcf.x - observerEcf.x; + var ry = satelliteEcf.y - observerEcf.y; + var rz = satelliteEcf.z - observerEcf.z; + var topS = Math.sin(latitude) * Math.cos(longitude) * rx + Math.sin(latitude) * Math.sin(longitude) * ry - Math.cos(latitude) * rz; + var topE = -Math.sin(longitude) * rx + Math.cos(longitude) * ry; + var topZ = Math.cos(latitude) * Math.cos(longitude) * rx + Math.cos(latitude) * Math.sin(longitude) * ry + Math.sin(latitude) * rz; + return { + topS: topS, + topE: topE, + topZ: topZ + }; + } + /** + * @param {Object} tc + * @param {Number} tc.topS Positive horizontal vector S due south. + * @param {Number} tc.topE Positive horizontal vector E due east. + * @param {Number} tc.topZ Vector Z normal to the surface of the earth (up). + * @returns {Object} + */ + + + function topocentricToLookAngles(tc) { + var topS = tc.topS, + topE = tc.topE, + topZ = tc.topZ; + var rangeSat = Math.sqrt(topS * topS + topE * topE + topZ * topZ); + var El = Math.asin(topZ / rangeSat); + var Az = Math.atan2(-topE, topS) + pi; + return { + azimuth: Az, + elevation: El, + rangeSat: rangeSat // Range in km + + }; + } + + function ecfToLookAngles(observerGeodetic, satelliteEcf) { + var topocentricCoords = topocentric(observerGeodetic, satelliteEcf); + return topocentricToLookAngles(topocentricCoords); + } + + var indexUmd = { + constants: constants, + // Propagation + propagate: propagate, + sgp4: sgp4, + twoline2satrec: twoline2satrec, + gstime: gstime, + jday: jday, + invjday: invjday, + dopplerFactor: dopplerFactor, + // Coordinate transforms + radiansToDegrees: radiansToDegrees, + degreesToRadians: degreesToRadians, + degreesLat: degreesLat, + degreesLong: degreesLong, + radiansLat: radiansLat, + radiansLong: radiansLong, + geodeticToEcf: geodeticToEcf, + eciToGeodetic: eciToGeodetic, + eciToEcf: eciToEcf, + ecfToEci: ecfToEci, + ecfToLookAngles: ecfToLookAngles + }; + + return indexUmd; + +}))); diff --git a/assets/js/sections/satpasses.js b/assets/js/sections/satpasses.js new file mode 100644 index 000000000..7515befd1 --- /dev/null +++ b/assets/js/sections/satpasses.js @@ -0,0 +1,23 @@ +function searchpasses() { + $.ajax({ + url: base_url + 'index.php/satellite/searchpasses', + type: 'post', + data: {'sat': $("#satlist").val(), + 'yourgrid': $("#yourgrid").val(), + 'minelevation': $("#minelevation").val(), + 'minazimuth': $("#minazimuth").val(), + 'maxazimuth': $("#maxazimuth").val(), + 'altitude': $("#altitude").val(), + 'timezone': $("#timezone").val(), + 'date': $("#date").val(), + 'mintime': $("#mintime").val(), + 'maxtime': $("#maxtime").val(), + }, + success: function (html) { + $("#resultpasses").html(html); + }, + error: function(e) { + modalloading=false; + } + }); +} diff --git a/assets/js/sections/simplefle.js b/assets/js/sections/simplefle.js index e45ddc435..2f12ca500 100644 --- a/assets/js/sections/simplefle.js +++ b/assets/js/sections/simplefle.js @@ -915,8 +915,8 @@ $(".js-save-to-log").click(function () { qsoList.forEach((item) => { var callsign = item[2]; var gridsquare = item[6]; - var rst_rcvd = item[7].replace(/dB$/, ''); // we don't want 'dB' in the database - var rst_sent = item[8].replace(/dB$/, ''); // * + var rst_sent = item[7].replace(/dB$/, ''); // we don't want 'dB' in the database + var rst_rcvd = item[8].replace(/dB$/, ''); // * var start_date = item[0]; var start_time = item[1][0] + diff --git a/assets/js/sections/three-orbit-controls.js b/assets/js/sections/three-orbit-controls.js new file mode 100644 index 000000000..41e6fdddb --- /dev/null +++ b/assets/js/sections/three-orbit-controls.js @@ -0,0 +1,1022 @@ +(function() { +window.OrbitControls = function( THREE ) { + /** + * @author qiao / https://github.com/qiao + * @author mrdoob / http://mrdoob.com + * @author alteredq / http://alteredqualia.com/ + * @author WestLangley / http://github.com/WestLangley + * @author erich666 / http://erichaines.com + */ + +// This set of controls performs orbiting, dollying (zooming), and panning. +// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). +// +// Orbit - left mouse / touch: one finger move +// Zoom - middle mouse, or mousewheel / touch: two finger spread or squish +// Pan - right mouse, or arrow keys / touch: three finter swipe + + function OrbitControls( object, domElement ) { + + this.object = object; + + this.domElement = ( domElement !== undefined ) ? domElement : document; + + // Set to false to disable this control + this.enabled = true; + + // "target" sets the location of focus, where the object orbits around + this.target = new THREE.Vector3(); + + // How far you can dolly in and out ( PerspectiveCamera only ) + this.minDistance = 0; + this.maxDistance = Infinity; + + // How far you can zoom in and out ( OrthographicCamera only ) + this.minZoom = 0; + this.maxZoom = Infinity; + + // How far you can orbit vertically, upper and lower limits. + // Range is 0 to Math.PI radians. + this.minPolarAngle = 0; // radians + this.maxPolarAngle = Math.PI; // radians + + // How far you can orbit horizontally, upper and lower limits. + // If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ]. + this.minAzimuthAngle = - Infinity; // radians + this.maxAzimuthAngle = Infinity; // radians + + // Set to true to enable damping (inertia) + // If damping is enabled, you must call controls.update() in your animation loop + this.enableDamping = false; + this.dampingFactor = 0.25; + + // This option actually enables dollying in and out; left as "zoom" for backwards compatibility. + // Set to false to disable zooming + this.enableZoom = true; + this.zoomSpeed = 1.0; + + // Set to false to disable rotating + this.enableRotate = true; + this.rotateSpeed = 1.0; + + // Set to false to disable panning + this.enablePan = true; + this.keyPanSpeed = 7.0; // pixels moved per arrow key push + + // Set to true to automatically rotate around the target + // If auto-rotate is enabled, you must call controls.update() in your animation loop + this.autoRotate = false; + this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60 + + // Set to false to disable use of the keys + this.enableKeys = true; + + // The four arrow keys + this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }; + + // Mouse buttons + this.mouseButtons = { ORBIT: THREE.MOUSE.LEFT, ZOOM: THREE.MOUSE.MIDDLE, PAN: THREE.MOUSE.RIGHT }; + + // for reset + this.target0 = this.target.clone(); + this.position0 = this.object.position.clone(); + this.zoom0 = this.object.zoom; + + // + // public methods + // + + this.getPolarAngle = function () { + + return spherical.phi; + + }; + + this.getAzimuthalAngle = function () { + + return spherical.theta; + + }; + + this.reset = function () { + + scope.target.copy( scope.target0 ); + scope.object.position.copy( scope.position0 ); + scope.object.zoom = scope.zoom0; + + scope.object.updateProjectionMatrix(); + scope.dispatchEvent( changeEvent ); + + scope.update(); + + state = STATE.NONE; + + }; + + // this method is exposed, but perhaps it would be better if we can make it private... + this.update = function() { + + var offset = new THREE.Vector3(); + + // so camera.up is the orbit axis + var quat = new THREE.Quaternion().setFromUnitVectors( object.up, new THREE.Vector3( 0, 1, 0 ) ); + var quatInverse = quat.clone().inverse(); + + var lastPosition = new THREE.Vector3(); + var lastQuaternion = new THREE.Quaternion(); + + return function update () { + + var position = scope.object.position; + + offset.copy( position ).sub( scope.target ); + + // rotate offset to "y-axis-is-up" space + offset.applyQuaternion( quat ); + + // angle from z-axis around y-axis + spherical.setFromVector3( offset ); + + if ( scope.autoRotate && state === STATE.NONE ) { + + rotateLeft( getAutoRotationAngle() ); + + } + + spherical.theta += sphericalDelta.theta; + spherical.phi += sphericalDelta.phi; + + // restrict theta to be between desired limits + spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) ); + + // restrict phi to be between desired limits + spherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) ); + + spherical.makeSafe(); + + + spherical.radius *= scale; + + // restrict radius to be between desired limits + spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) ); + + // move target to panned location + scope.target.add( panOffset ); + + offset.setFromSpherical( spherical ); + + // rotate offset back to "camera-up-vector-is-up" space + offset.applyQuaternion( quatInverse ); + + position.copy( scope.target ).add( offset ); + + scope.object.lookAt( scope.target ); + + if ( scope.enableDamping === true ) { + + sphericalDelta.theta *= ( 1 - scope.dampingFactor ); + sphericalDelta.phi *= ( 1 - scope.dampingFactor ); + + } else { + + sphericalDelta.set( 0, 0, 0 ); + + } + + scale = 1; + panOffset.set( 0, 0, 0 ); + + // update condition is: + // min(camera displacement, camera rotation in radians)^2 > EPS + // using small-angle approximation cos(x/2) = 1 - x^2 / 8 + + if ( zoomChanged || + lastPosition.distanceToSquared( scope.object.position ) > EPS || + 8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ) { + + scope.dispatchEvent( changeEvent ); + + lastPosition.copy( scope.object.position ); + lastQuaternion.copy( scope.object.quaternion ); + zoomChanged = false; + + return true; + + } + + return false; + + }; + + }(); + + this.dispose = function() { + + scope.domElement.removeEventListener( 'contextmenu', onContextMenu, false ); + scope.domElement.removeEventListener( 'mousedown', onMouseDown, false ); + scope.domElement.removeEventListener( 'wheel', onMouseWheel, false ); + + scope.domElement.removeEventListener( 'touchstart', onTouchStart, false ); + scope.domElement.removeEventListener( 'touchend', onTouchEnd, false ); + scope.domElement.removeEventListener( 'touchmove', onTouchMove, false ); + + document.removeEventListener( 'mousemove', onMouseMove, false ); + document.removeEventListener( 'mouseup', onMouseUp, false ); + + window.removeEventListener( 'keydown', onKeyDown, false ); + + //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here? + + }; + + // + // internals + // + + var scope = this; + + var changeEvent = { type: 'change' }; + var startEvent = { type: 'start' }; + var endEvent = { type: 'end' }; + + var STATE = { NONE : - 1, ROTATE : 0, DOLLY : 1, PAN : 2, TOUCH_ROTATE : 3, TOUCH_DOLLY : 4, TOUCH_PAN : 5 }; + + var state = STATE.NONE; + + var EPS = 0.000001; + + // current position in spherical coordinates + var spherical = new THREE.Spherical(); + var sphericalDelta = new THREE.Spherical(); + + var scale = 1; + var panOffset = new THREE.Vector3(); + var zoomChanged = false; + + var rotateStart = new THREE.Vector2(); + var rotateEnd = new THREE.Vector2(); + var rotateDelta = new THREE.Vector2(); + + var panStart = new THREE.Vector2(); + var panEnd = new THREE.Vector2(); + var panDelta = new THREE.Vector2(); + + var dollyStart = new THREE.Vector2(); + var dollyEnd = new THREE.Vector2(); + var dollyDelta = new THREE.Vector2(); + + function getAutoRotationAngle() { + + return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed; + + } + + function getZoomScale() { + + return Math.pow( 0.95, scope.zoomSpeed ); + + } + + function rotateLeft( angle ) { + + sphericalDelta.theta -= angle; + + } + + function rotateUp( angle ) { + + sphericalDelta.phi -= angle; + + } + + var panLeft = function() { + + var v = new THREE.Vector3(); + + return function panLeft( distance, objectMatrix ) { + + v.setFromMatrixColumn( objectMatrix, 0 ); // get X column of objectMatrix + v.multiplyScalar( - distance ); + + panOffset.add( v ); + + }; + + }(); + + var panUp = function() { + + var v = new THREE.Vector3(); + + return function panUp( distance, objectMatrix ) { + + v.setFromMatrixColumn( objectMatrix, 1 ); // get Y column of objectMatrix + v.multiplyScalar( distance ); + + panOffset.add( v ); + + }; + + }(); + + // deltaX and deltaY are in pixels; right and down are positive + var pan = function() { + + var offset = new THREE.Vector3(); + + return function pan ( deltaX, deltaY ) { + + var element = scope.domElement === document ? scope.domElement.body : scope.domElement; + + if ( scope.object instanceof THREE.PerspectiveCamera ) { + + // perspective + var position = scope.object.position; + offset.copy( position ).sub( scope.target ); + var targetDistance = offset.length(); + + // half of the fov is center to top of screen + targetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 ); + + // we actually don't use screenWidth, since perspective camera is fixed to screen height + panLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix ); + panUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix ); + + } else if ( scope.object instanceof THREE.OrthographicCamera ) { + + // orthographic + panLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix ); + panUp( deltaY * ( scope.object.top - scope.object.bottom ) / scope.object.zoom / element.clientHeight, scope.object.matrix ); + + } else { + + // camera neither orthographic nor perspective + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' ); + scope.enablePan = false; + + } + + }; + + }(); + + function dollyIn( dollyScale ) { + + if ( scope.object instanceof THREE.PerspectiveCamera ) { + + scale /= dollyScale; + + } else if ( scope.object instanceof THREE.OrthographicCamera ) { + + scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) ); + scope.object.updateProjectionMatrix(); + zoomChanged = true; + + } else { + + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); + scope.enableZoom = false; + + } + + } + + function dollyOut( dollyScale ) { + + if ( scope.object instanceof THREE.PerspectiveCamera ) { + + scale *= dollyScale; + + } else if ( scope.object instanceof THREE.OrthographicCamera ) { + + scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / dollyScale ) ); + scope.object.updateProjectionMatrix(); + zoomChanged = true; + + } else { + + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); + scope.enableZoom = false; + + } + + } + + // + // event callbacks - update the object state + // + + function handleMouseDownRotate( event ) { + + //console.log( 'handleMouseDownRotate' ); + + rotateStart.set( event.clientX, event.clientY ); + + } + + function handleMouseDownDolly( event ) { + + //console.log( 'handleMouseDownDolly' ); + + dollyStart.set( event.clientX, event.clientY ); + + } + + function handleMouseDownPan( event ) { + + //console.log( 'handleMouseDownPan' ); + + panStart.set( event.clientX, event.clientY ); + + } + + function handleMouseMoveRotate( event ) { + + //console.log( 'handleMouseMoveRotate' ); + + rotateEnd.set( event.clientX, event.clientY ); + rotateDelta.subVectors( rotateEnd, rotateStart ); + + var element = scope.domElement === document ? scope.domElement.body : scope.domElement; + + // rotating across whole screen goes 360 degrees around + rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth * scope.rotateSpeed ); + + // rotating up and down along whole screen attempts to go 360, but limited to 180 + rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight * scope.rotateSpeed ); + + rotateStart.copy( rotateEnd ); + + scope.update(); + + } + + function handleMouseMoveDolly( event ) { + + //console.log( 'handleMouseMoveDolly' ); + + dollyEnd.set( event.clientX, event.clientY ); + + dollyDelta.subVectors( dollyEnd, dollyStart ); + + if ( dollyDelta.y > 0 ) { + + dollyIn( getZoomScale() ); + + } else if ( dollyDelta.y < 0 ) { + + dollyOut( getZoomScale() ); + + } + + dollyStart.copy( dollyEnd ); + + scope.update(); + + } + + function handleMouseMovePan( event ) { + + //console.log( 'handleMouseMovePan' ); + + panEnd.set( event.clientX, event.clientY ); + + panDelta.subVectors( panEnd, panStart ); + + pan( panDelta.x, panDelta.y ); + + panStart.copy( panEnd ); + + scope.update(); + + } + + function handleMouseUp( event ) { + + //console.log( 'handleMouseUp' ); + + } + + function handleMouseWheel( event ) { + + //console.log( 'handleMouseWheel' ); + + if ( event.deltaY < 0 ) { + + dollyOut( getZoomScale() ); + + } else if ( event.deltaY > 0 ) { + + dollyIn( getZoomScale() ); + + } + + scope.update(); + + } + + function handleKeyDown( event ) { + + //console.log( 'handleKeyDown' ); + + switch ( event.keyCode ) { + + case scope.keys.UP: + pan( 0, scope.keyPanSpeed ); + scope.update(); + break; + + case scope.keys.BOTTOM: + pan( 0, - scope.keyPanSpeed ); + scope.update(); + break; + + case scope.keys.LEFT: + pan( scope.keyPanSpeed, 0 ); + scope.update(); + break; + + case scope.keys.RIGHT: + pan( - scope.keyPanSpeed, 0 ); + scope.update(); + break; + + } + + } + + function handleTouchStartRotate( event ) { + + //console.log( 'handleTouchStartRotate' ); + + rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); + + } + + function handleTouchStartDolly( event ) { + + //console.log( 'handleTouchStartDolly' ); + + var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; + var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; + + var distance = Math.sqrt( dx * dx + dy * dy ); + + dollyStart.set( 0, distance ); + + } + + function handleTouchStartPan( event ) { + + //console.log( 'handleTouchStartPan' ); + + panStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); + + } + + function handleTouchMoveRotate( event ) { + + //console.log( 'handleTouchMoveRotate' ); + + rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); + rotateDelta.subVectors( rotateEnd, rotateStart ); + + var element = scope.domElement === document ? scope.domElement.body : scope.domElement; + + // rotating across whole screen goes 360 degrees around + rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth * scope.rotateSpeed ); + + // rotating up and down along whole screen attempts to go 360, but limited to 180 + rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight * scope.rotateSpeed ); + + rotateStart.copy( rotateEnd ); + + scope.update(); + + } + + function handleTouchMoveDolly( event ) { + + //console.log( 'handleTouchMoveDolly' ); + + var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; + var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; + + var distance = Math.sqrt( dx * dx + dy * dy ); + + dollyEnd.set( 0, distance ); + + dollyDelta.subVectors( dollyEnd, dollyStart ); + + if ( dollyDelta.y > 0 ) { + + dollyOut( getZoomScale() ); + + } else if ( dollyDelta.y < 0 ) { + + dollyIn( getZoomScale() ); + + } + + dollyStart.copy( dollyEnd ); + + scope.update(); + + } + + function handleTouchMovePan( event ) { + + //console.log( 'handleTouchMovePan' ); + + panEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); + + panDelta.subVectors( panEnd, panStart ); + + pan( panDelta.x, panDelta.y ); + + panStart.copy( panEnd ); + + scope.update(); + + } + + function handleTouchEnd( event ) { + + //console.log( 'handleTouchEnd' ); + + } + + // + // event handlers - FSM: listen for events and reset state + // + + function onMouseDown( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + if ( event.button === scope.mouseButtons.ORBIT ) { + + if ( scope.enableRotate === false ) return; + + handleMouseDownRotate( event ); + + state = STATE.ROTATE; + + } else if ( event.button === scope.mouseButtons.ZOOM ) { + + if ( scope.enableZoom === false ) return; + + handleMouseDownDolly( event ); + + state = STATE.DOLLY; + + } else if ( event.button === scope.mouseButtons.PAN ) { + + if ( scope.enablePan === false ) return; + + handleMouseDownPan( event ); + + state = STATE.PAN; + + } + + if ( state !== STATE.NONE ) { + + document.addEventListener( 'mousemove', onMouseMove, false ); + document.addEventListener( 'mouseup', onMouseUp, false ); + + scope.dispatchEvent( startEvent ); + + } + + } + + function onMouseMove( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + if ( state === STATE.ROTATE ) { + + if ( scope.enableRotate === false ) return; + + handleMouseMoveRotate( event ); + + } else if ( state === STATE.DOLLY ) { + + if ( scope.enableZoom === false ) return; + + handleMouseMoveDolly( event ); + + } else if ( state === STATE.PAN ) { + + if ( scope.enablePan === false ) return; + + handleMouseMovePan( event ); + + } + + } + + function onMouseUp( event ) { + + if ( scope.enabled === false ) return; + + handleMouseUp( event ); + + document.removeEventListener( 'mousemove', onMouseMove, false ); + document.removeEventListener( 'mouseup', onMouseUp, false ); + + scope.dispatchEvent( endEvent ); + + state = STATE.NONE; + + } + + function onMouseWheel( event ) { + + if ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return; + + event.preventDefault(); + event.stopPropagation(); + + handleMouseWheel( event ); + + scope.dispatchEvent( startEvent ); // not sure why these are here... + scope.dispatchEvent( endEvent ); + + } + + function onKeyDown( event ) { + + if ( scope.enabled === false || scope.enableKeys === false || scope.enablePan === false ) return; + + handleKeyDown( event ); + + } + + function onTouchStart( event ) { + + if ( scope.enabled === false ) return; + + switch ( event.touches.length ) { + + case 1: // one-fingered touch: rotate + + if ( scope.enableRotate === false ) return; + + handleTouchStartRotate( event ); + + state = STATE.TOUCH_ROTATE; + + break; + + case 2: // two-fingered touch: dolly + + if ( scope.enableZoom === false ) return; + + handleTouchStartDolly( event ); + + state = STATE.TOUCH_DOLLY; + + break; + + case 3: // three-fingered touch: pan + + if ( scope.enablePan === false ) return; + + handleTouchStartPan( event ); + + state = STATE.TOUCH_PAN; + + break; + + default: + + state = STATE.NONE; + + } + + if ( state !== STATE.NONE ) { + + scope.dispatchEvent( startEvent ); + + } + + } + + function onTouchMove( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + event.stopPropagation(); + + switch ( event.touches.length ) { + + case 1: // one-fingered touch: rotate + + if ( scope.enableRotate === false ) return; + if ( state !== STATE.TOUCH_ROTATE ) return; // is this needed?... + + handleTouchMoveRotate( event ); + + break; + + case 2: // two-fingered touch: dolly + + if ( scope.enableZoom === false ) return; + if ( state !== STATE.TOUCH_DOLLY ) return; // is this needed?... + + handleTouchMoveDolly( event ); + + break; + + case 3: // three-fingered touch: pan + + if ( scope.enablePan === false ) return; + if ( state !== STATE.TOUCH_PAN ) return; // is this needed?... + + handleTouchMovePan( event ); + + break; + + default: + + state = STATE.NONE; + + } + + } + + function onTouchEnd( event ) { + + if ( scope.enabled === false ) return; + + handleTouchEnd( event ); + + scope.dispatchEvent( endEvent ); + + state = STATE.NONE; + + } + + function onContextMenu( event ) { + + event.preventDefault(); + + } + + // + + scope.domElement.addEventListener( 'contextmenu', onContextMenu, false ); + + scope.domElement.addEventListener( 'mousedown', onMouseDown, false ); + scope.domElement.addEventListener( 'wheel', onMouseWheel, false ); + + scope.domElement.addEventListener( 'touchstart', onTouchStart, false ); + scope.domElement.addEventListener( 'touchend', onTouchEnd, false ); + scope.domElement.addEventListener( 'touchmove', onTouchMove, false ); + + window.addEventListener( 'keydown', onKeyDown, false ); + + // force an update at start + + this.update(); + + }; + + OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype ); + OrbitControls.prototype.constructor = OrbitControls; + + Object.defineProperties( OrbitControls.prototype, { + + center: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .center has been renamed to .target' ); + return this.target; + + } + + }, + + // backward compatibility + + noZoom: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.' ); + return ! this.enableZoom; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.' ); + this.enableZoom = ! value; + + } + + }, + + noRotate: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.' ); + return ! this.enableRotate; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.' ); + this.enableRotate = ! value; + + } + + }, + + noPan: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.' ); + return ! this.enablePan; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.' ); + this.enablePan = ! value; + + } + + }, + + noKeys: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.' ); + return ! this.enableKeys; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.' ); + this.enableKeys = ! value; + + } + + }, + + staticMoving : { + + get: function () { + + console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' ); + return ! this.enableDamping; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' ); + this.enableDamping = ! value; + + } + + }, + + dynamicDampingFactor : { + + get: function () { + + console.warn( 'THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.' ); + return this.dampingFactor; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.' ); + this.dampingFactor = value; + + } + + } + + } ); + + return OrbitControls; +}; +}()); diff --git a/assets/lang_src/messages.pot b/assets/lang_src/messages.pot index 9b049dd4a..aee538c77 100644 --- a/assets/lang_src/messages.pot +++ b/assets/lang_src/messages.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-08-06 18:03+0000\n" +"POT-Creation-Date: 2024-08-08 14:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -75,7 +75,7 @@ msgid "ADIF Export" msgstr "" #: application/controllers/Adif.php:145 -#: application/views/interface_assets/header.php:378 +#: application/views/interface_assets/header.php:384 msgid "ADIF Import / Export" msgstr "" @@ -395,7 +395,7 @@ msgid "ITU Zones" msgstr "" #: application/controllers/Backup.php:15 application/views/backup/main.php:14 -#: application/views/interface_assets/header.php:274 +#: application/views/interface_assets/header.php:280 msgid "Backup" msgstr "" @@ -409,7 +409,7 @@ msgstr "" #: application/controllers/Band.php:25 application/views/bands/index.php:28 #: application/views/bands/index.php:32 -#: application/views/interface_assets/header.php:373 +#: application/views/interface_assets/header.php:379 #: application/views/statistics/index.php:16 #: application/views/statistics/index.php:56 msgid "Bands" @@ -436,7 +436,7 @@ msgid "Export Cabrillo" msgstr "" #: application/controllers/Cfdexport.php:20 -#: application/views/interface_assets/header.php:390 +#: application/views/interface_assets/header.php:396 msgid "CFD Export" msgstr "" @@ -463,7 +463,7 @@ msgid "Contest Logging" msgstr "" #: application/controllers/Contesting.php:111 -#: application/views/interface_assets/header.php:268 +#: application/views/interface_assets/header.php:274 msgid "Contests" msgstr "" @@ -479,7 +479,7 @@ msgid "Continents" msgstr "" #: application/controllers/Cron.php:38 -#: application/views/interface_assets/header.php:278 +#: application/views/interface_assets/header.php:284 msgid "Cron Manager" msgstr "" @@ -488,7 +488,7 @@ msgid "Edit Cronjob" msgstr "" #: application/controllers/Csv.php:20 application/views/csv/index.php:3 -#: application/views/interface_assets/header.php:386 +#: application/views/interface_assets/header.php:392 msgid "SOTA CSV Export" msgstr "" @@ -557,7 +557,7 @@ msgid "and band" msgstr "" #: application/controllers/Dxatlas.php:19 -#: application/views/interface_assets/header.php:384 +#: application/views/interface_assets/header.php:390 msgid "DX Atlas Gridsquare Export" msgstr "" @@ -627,7 +627,7 @@ msgid "No QSOs found to upload." msgstr "" #: application/controllers/Kmlexport.php:24 -#: application/views/interface_assets/header.php:382 +#: application/views/interface_assets/header.php:388 #: application/views/kml/index.php:3 msgid "KML Export" msgstr "" @@ -1309,7 +1309,7 @@ msgstr "" #: application/controllers/Lotw.php:54 application/controllers/Lotw.php:83 #: application/controllers/Lotw.php:125 application/views/adif/import.php:27 -#: application/views/interface_assets/header.php:417 +#: application/views/interface_assets/header.php:423 #: application/views/lotw/import.php:3 #: application/views/lotw_views/index.php:12 #: application/views/lotw_views/upload_cert.php:3 @@ -1338,7 +1338,7 @@ msgid "LoTW .TQ8 Not Sent" msgstr "" #: application/controllers/Mode.php:25 -#: application/views/interface_assets/header.php:266 +#: application/views/interface_assets/header.php:272 #: application/views/mode/index.php:15 msgid "Modes" msgstr "" @@ -1490,7 +1490,7 @@ msgid "Log Search & OQRS" msgstr "" #: application/controllers/Oqrs.php:104 -#: application/views/interface_assets/header.php:407 +#: application/views/interface_assets/header.php:413 msgid "OQRS Requests" msgstr "" @@ -1499,7 +1499,7 @@ msgid "QRB Calculator" msgstr "" #: application/controllers/Qrz.php:173 -#: application/views/interface_assets/header.php:420 +#: application/views/interface_assets/header.php:426 msgid "QRZ Logbook" msgstr "" @@ -1535,7 +1535,7 @@ msgid "Add QSO" msgstr "" #: application/controllers/Radio.php:18 -#: application/views/interface_assets/header.php:426 +#: application/views/interface_assets/header.php:432 msgid "Hardware Interfaces" msgstr "" @@ -1571,8 +1571,8 @@ msgstr "" #: application/controllers/Search.php:19 #: application/views/continents/index.php:49 -#: application/views/interface_assets/header.php:330 -#: application/views/interface_assets/header.php:337 +#: application/views/interface_assets/header.php:336 +#: application/views/interface_assets/header.php:343 #: application/views/logbookadvanced/index.php:511 #: application/views/oqrs/index.php:28 #: application/views/oqrs/showrequests.php:67 @@ -1636,8 +1636,8 @@ msgid "Duplicate Station Location:" msgstr "" #: application/controllers/Stationsetup.php:35 -#: application/views/interface_assets/header.php:371 -#: application/views/interface_assets/header.php:482 +#: application/views/interface_assets/header.php:377 +#: application/views/interface_assets/header.php:488 msgid "Station Setup" msgstr "" @@ -1701,7 +1701,7 @@ msgid "Set as Active Logbook" msgstr "" #: application/controllers/Stationsetup.php:263 -#: application/views/interface_assets/header.php:480 +#: application/views/interface_assets/header.php:486 #: application/views/stationsetup/stationsetup.php:46 #: application/views/view_log/index.php:4 msgid "Active Logbook" @@ -1851,7 +1851,7 @@ msgid "QSL Statistics" msgstr "" #: application/controllers/Themes.php:27 -#: application/views/interface_assets/header.php:272 +#: application/views/interface_assets/header.php:278 msgid "Themes" msgstr "" @@ -1912,7 +1912,7 @@ msgid "Dxcc Prefixes:" msgstr "" #: application/controllers/User.php:12 -#: application/views/interface_assets/header.php:262 +#: application/views/interface_assets/header.php:268 msgid "User Accounts" msgstr "" @@ -1952,7 +1952,7 @@ msgid "Login failed. Try again." msgstr "" #: application/controllers/User.php:860 -#: application/views/interface_assets/header.php:350 +#: application/views/interface_assets/header.php:356 #: application/views/user/login.php:89 #: application/views/visitor/layout/header.php:88 msgid "Login" @@ -2034,7 +2034,7 @@ msgstr "" #: application/controllers/Webadif.php:90 #: application/controllers/Webadif.php:137 -#: application/views/interface_assets/header.php:421 +#: application/views/interface_assets/header.php:427 msgid "QO-100 Dx Club Upload" msgstr "" @@ -2317,6 +2317,7 @@ msgstr "" #: application/views/gridmap/index.php:25 application/views/hamsat/index.php:32 #: application/views/logbookadvanced/edit.php:16 #: application/views/logbookadvanced/index.php:192 +#: application/views/satellite/flightpath.php:34 #: application/views/sattimers/index.php:38 #: application/views/statistics/index.php:112 msgid "Satellite" @@ -2358,6 +2359,7 @@ msgstr "" #: application/views/activated_gridmap/index.php:86 #: application/views/gridmap/index.php:130 +#: application/views/satellite/flightpath.php:42 msgid "Plot" msgstr "" @@ -2903,7 +2905,7 @@ msgid "Save" msgstr "" #: application/views/api/help.php:14 -#: application/views/interface_assets/header.php:425 +#: application/views/interface_assets/header.php:431 msgid "API Keys" msgstr "" @@ -4491,7 +4493,7 @@ msgstr "" #: application/views/contesting/add.php:44 #: application/views/contesting/edit.php:43 #: application/views/contesting/edit.php:46 -#: application/views/interface_assets/header.php:460 +#: application/views/interface_assets/header.php:466 #: application/views/mode/create.php:46 application/views/mode/create.php:48 #: application/views/mode/edit.php:57 application/views/mode/edit.php:60 #: application/views/mode/index.php:43 @@ -5985,7 +5987,7 @@ msgid "Propagation mode is not supported by LoTW. LoTW QSL fields disabled." msgstr "" #: application/views/interface_assets/footer.php:127 -#: application/views/interface_assets/header.php:428 +#: application/views/interface_assets/header.php:434 #: application/views/options/sidebar.php:11 msgid "Version Info" msgstr "" @@ -6235,17 +6237,25 @@ msgstr "" msgid "SAT Timers" msgstr "" -#: application/views/interface_assets/header.php:259 +#: application/views/interface_assets/header.php:256 +msgid "Satellite Flightpath" +msgstr "" + +#: application/views/interface_assets/header.php:258 +msgid "Satellite Pass" +msgstr "" + +#: application/views/interface_assets/header.php:265 #: application/views/station_profile/index.php:33 #: application/views/stationsetup/stationsetup.php:113 msgid "Admin" msgstr "" -#: application/views/interface_assets/header.php:264 +#: application/views/interface_assets/header.php:270 msgid "Global Options" msgstr "" -#: application/views/interface_assets/header.php:270 +#: application/views/interface_assets/header.php:276 #: application/views/notes/add.php:38 application/views/notes/edit.php:39 #: application/views/satellite/index.php:11 #: application/views/statistics/custom.php:20 @@ -6255,79 +6265,79 @@ msgstr "" msgid "Satellites" msgstr "" -#: application/views/interface_assets/header.php:276 +#: application/views/interface_assets/header.php:282 msgid "Update Country Files" msgstr "" -#: application/views/interface_assets/header.php:280 +#: application/views/interface_assets/header.php:286 msgid "Debug Information" msgstr "" -#: application/views/interface_assets/header.php:327 +#: application/views/interface_assets/header.php:333 msgid "Add/Search Callsign" msgstr "" -#: application/views/interface_assets/header.php:329 +#: application/views/interface_assets/header.php:335 msgid "Log" msgstr "" -#: application/views/interface_assets/header.php:336 +#: application/views/interface_assets/header.php:342 #: application/views/logbookadvanced/index.php:447 #: application/views/oqrs/index.php:27 application/views/user/edit.php:441 #: application/views/visitor/layout/header.php:97 msgid "Search Callsign" msgstr "" -#: application/views/interface_assets/header.php:365 +#: application/views/interface_assets/header.php:371 #: application/views/user/edit.php:49 msgid "Account" msgstr "" -#: application/views/interface_assets/header.php:380 +#: application/views/interface_assets/header.php:386 msgid "Other Export Options" msgstr "" -#: application/views/interface_assets/header.php:388 +#: application/views/interface_assets/header.php:394 msgid "Cabrillo Export" msgstr "" -#: application/views/interface_assets/header.php:412 +#: application/views/interface_assets/header.php:418 msgid "QSL Queue" msgstr "" -#: application/views/interface_assets/header.php:413 +#: application/views/interface_assets/header.php:419 msgid "Labels" msgstr "" -#: application/views/interface_assets/header.php:415 +#: application/views/interface_assets/header.php:421 msgid "Third-Party Services" msgstr "" -#: application/views/interface_assets/header.php:418 +#: application/views/interface_assets/header.php:424 msgid "eQSL Import / Export" msgstr "" -#: application/views/interface_assets/header.php:419 +#: application/views/interface_assets/header.php:425 msgid "HRDLog Logbook" msgstr "" -#: application/views/interface_assets/header.php:429 +#: application/views/interface_assets/header.php:435 msgid "Help" msgstr "" -#: application/views/interface_assets/header.php:430 +#: application/views/interface_assets/header.php:436 msgid "Forum" msgstr "" -#: application/views/interface_assets/header.php:432 +#: application/views/interface_assets/header.php:438 msgid "Logout" msgstr "" -#: application/views/interface_assets/header.php:440 +#: application/views/interface_assets/header.php:446 msgid "Select a Location" msgstr "" -#: application/views/interface_assets/header.php:519 +#: application/views/interface_assets/header.php:525 msgid "Extras" msgstr "" @@ -8501,6 +8511,14 @@ msgstr "" msgid "Add a satellite" msgstr "" +#: application/views/satellite/pass.php:2 +msgid "Satellite passes" +msgstr "" + +#: application/views/satellite/pass.php:548 +msgid "Load predictions" +msgstr "" + #: application/views/sattimers/index.php:15 #, php-format msgid "" diff --git a/install/assets/css/installer.css b/install/assets/css/installer.css index c7a420abe..fbdf737e7 100644 --- a/install/assets/css/installer.css +++ b/install/assets/css/installer.css @@ -243,6 +243,30 @@ div.alert-danger { border-color: #ffc107; } +#dxcc_button.has-warning { + border: 1px solid; + border-color: #ffc107; +} + .uppercase { text-transform: uppercase; +} + +.multiselect-container.dropdown-menu { + --bs-dropdown-padding-y: 0; +} + +#dxcc_id + .btn-group .multiselect-container .multiselect-option input[type="radio"] { + display: none; +} + +.multiselect { + --bs-btn-color: inherit !important; + --bs-btn-bg: inherit !important; + --bs-btn-border-color: inherit !important; + --bs-btn-hover-border-color: inherit !important; + --bs-btn-hover-bg: #1b1b1b; + --bs-btn-hover-color: inherit !important; + --bs-btn-active-bg: #1b1b1b; + --bs-btn-active-color: inherit !important; } \ No newline at end of file diff --git a/install/includes/gettext/lang_src/installer.pot b/install/includes/gettext/lang_src/installer.pot index ab0609ee9..5572384c9 100644 --- a/install/includes/gettext/lang_src/installer.pot +++ b/install/includes/gettext/lang_src/installer.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-08-06 09:56+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -35,67 +35,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -158,7 +158,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -316,11 +316,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -421,209 +421,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/bg_BG/LC_MESSAGES/installer.po b/install/includes/gettext/locale/bg_BG/LC_MESSAGES/installer.po index f728e3b16..ec1dbb6f5 100644 --- a/install/includes/gettext/locale/bg_BG/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/bg_BG/LC_MESSAGES/installer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-06-05 15:15+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,67 +36,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -159,7 +159,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -317,11 +317,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -422,209 +422,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/cs_CZ/LC_MESSAGES/installer.po b/install/includes/gettext/locale/cs_CZ/LC_MESSAGES/installer.po index ac482e9c5..a47c3e8e9 100644 --- a/install/includes/gettext/locale/cs_CZ/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/cs_CZ/LC_MESSAGES/installer.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-08-06 09:50+0000\n" "Last-Translator: Michal Šiman \n" "Language-Team: Czech " msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.mo b/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.mo index a99dad101..9a04ca45c 100644 Binary files a/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.mo and b/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.mo differ diff --git a/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.po b/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.po index c77ff1ad0..580ef7268 100644 --- a/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/de_DE/LC_MESSAGES/installer.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" -"PO-Revision-Date: 2024-07-30 22:05+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" +"PO-Revision-Date: 2024-08-08 14:34+0000\n" "Last-Translator: Fabian Berg <80885850+HB9HIL@users.noreply.github.com>\n" "Language-Team: German \n" @@ -41,67 +41,67 @@ msgstr "Datenbank ist nicht leer." msgid "not detected" msgstr "nicht erkannt" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "Bulgarisch" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "Chinesisch (Vereinfacht)" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "Tschechisch" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "Niederländisch" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "Englisch" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "Finnisch" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "Französisch" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "Deutsch" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "Griechisch" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "Italienisch" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "Portugiesisch" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "Polnisch" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "Russisch" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "Spanisch" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "Schwedisch" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "Türkisch" @@ -159,8 +159,8 @@ msgid "" "If you encounter any issues or have questions, refer to the documentation " "(%s) or community forum (%s) on Github for assistance." msgstr "" -"Falls du auf Probleme stößt oder Fragen hast, schau in die Dokumentation (%s)" -" oder das Community-Forum (%s) auf Github für Hilfe." +"Falls du auf Probleme stößt oder Fragen hast, schau in die Dokumentation " +"(%s) oder das Community-Forum (%s) auf Github für Hilfe." #: install/index.php:64 msgid "Wiki" @@ -170,7 +170,7 @@ msgstr "Wiki" msgid "Thank you for installing Wavelog!" msgstr "Danke, dass du Wavelog installierst!" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "Sprache" @@ -360,11 +360,11 @@ msgstr "" "com zu erhalten, brauchst du ein XML-Abonnement. HamQTH liefert nicht immer " "die Locator-Informationen." -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "Benutzername" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "Passwort" @@ -478,134 +478,134 @@ msgstr "" msgid "All fields are required!" msgstr "Alle Felder werden benötigt!" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "Vorname" -#: install/index.php:492 -msgid "Last Name" -msgstr "Nachname" - -#: install/index.php:502 -msgid "Callsign" -msgstr "Rufzeichen" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "Passwort bestätigen" - -#: install/index.php:512 -msgid "City" -msgstr "Stadt" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "E-Mail-Adresse" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "Planquadrat/Locator" - -#: install/index.php:526 -msgid "Timezone" -msgstr "Zeitzone" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "DXCC" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "- Keines -" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "Gelöschtes DXCC" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "Nachname" + +#: install/index.php:899 +msgid "Callsign" +msgstr "Rufzeichen" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "Planquadrat/Locator" + +#: install/index.php:919 +msgid "City" +msgstr "Stadt" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "Passwort bestätigen" + +#: install/index.php:929 +msgid "Timezone" +msgstr "Zeitzone" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "E-Mail-Adresse" + +#: install/index.php:1054 msgid "Checklist" msgstr "Checkliste" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "Vorabprüfungen" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "Konfiguration" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "Datenbank" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "Erster Benutzer" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "Fast fertig!" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "Du hast alle notwendigen Schritte vorbereitet." -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" "Wir können jetzt Wavelog installieren. Dieser Vorgang kann ein paar Minuten " "dauern." -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "Zurücksetzen" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "Installer zurücksetzen" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "Willst du wirklich alle Eingaben zurücksetzen und von vorne beginnen?" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "Ja" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "Nein" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "Zurück" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "Weiter" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." @@ -613,25 +613,25 @@ msgstr "" "Du kannst nicht weitermachen. Beseitige die rot markierten Probleme, starte " "den Web-Server neu und aktualisiere diese Seite." -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "Passworte dürfen ' / \\ < > nicht enthalten" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -"Fehler_ Mindestens Hostname/IP, Datenbankname und Benutzername werden " +"Fehler: Mindestens Hostname/IP, Datenbankname und Benutzername werden " "benötigt." -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "Verbinden..." -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "Verbindung war erfolgreich und die Datenbank sollte kompatibel sein." -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." @@ -639,16 +639,32 @@ msgstr "" "Verbindung war erfolgreich, aber deine Datenbank scheint zu alt für Wavelog " "zu sein. Du kannst es weiter versuchen, es könnten jedoch Probleme auftreten." -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "Die min. Version für MySQL ist %s, für MariaDB ist es %s." -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "Suche" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "Mindestens ein Feld ist leer." -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" +"Stoppe hier für einen Moment. Das von dir gewählte DXCC ist abgelaufen und " +"nicht mehr gültig. Überprüfe, welches das richtige DXCC für den Standort der " +"Station ist. Als Beispiel: Deutschland ist nicht mehr 'Germany' sondern " +"'Federal Republic of Germany'. Wenn du dir sicher bist, ignoriere diese " +"Warnung." + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." @@ -656,7 +672,7 @@ msgstr "" "Der Locator scheint nicht im richtigen Format zu sein. Sollte wie AA11AA " "aussehen (6-stelliger Grid-Locator)." -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" @@ -664,35 +680,35 @@ msgstr "" "Die E-Mail-Adresse sieht nicht korrekt aus. Stelle sicher, dass es eine " "gültige E-Mail-Adresse ist" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "Das Passwort sollte mindestens 8 Zeichen lang sein" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "Passwörter stimmen nicht überein" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "Jetzt installieren" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "Installation nicht möglich. Checkliste unvollständig." -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "PHP-Modul fehlt" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "Die folgenden PHP-Module fehlen:" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "Ohne dieses Modul funktioniert der Wavelog-Installer nicht!" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "Bitte installiere die benötigten Module und starte den Webserver neu." diff --git a/install/includes/gettext/locale/el_GR/LC_MESSAGES/installer.po b/install/includes/gettext/locale/el_GR/LC_MESSAGES/installer.po index 7ea2f40a7..c1e14ea64 100644 --- a/install/includes/gettext/locale/el_GR/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/el_GR/LC_MESSAGES/installer.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-07-29 12:05+0000\n" "Last-Translator: Fabian Berg \n" "Language-Team: Greek " msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/es_ES/LC_MESSAGES/installer.po b/install/includes/gettext/locale/es_ES/LC_MESSAGES/installer.po index cbcb43046..f0c62729b 100644 --- a/install/includes/gettext/locale/es_ES/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/es_ES/LC_MESSAGES/installer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-06-05 15:15+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,67 +36,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -159,7 +159,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -317,11 +317,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -422,209 +422,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/fi_FI/LC_MESSAGES/installer.po b/install/includes/gettext/locale/fi_FI/LC_MESSAGES/installer.po index b6f58e7c2..0c717d85d 100644 --- a/install/includes/gettext/locale/fi_FI/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/fi_FI/LC_MESSAGES/installer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-06-05 15:15+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,67 +36,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -159,7 +159,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -317,11 +317,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -422,209 +422,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/fr_FR/LC_MESSAGES/installer.po b/install/includes/gettext/locale/fr_FR/LC_MESSAGES/installer.po index f343a9039..e95f97b79 100644 --- a/install/includes/gettext/locale/fr_FR/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/fr_FR/LC_MESSAGES/installer.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-07-22 18:23+0000\n" "Last-Translator: \"Francisco (F4VSE)\" \n" "Language-Team: French " msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "Connection..." -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." @@ -617,56 +617,67 @@ msgstr "" "Wavelog. Vous pouvez essayer de continuer mais vous pourriez rencontrer des " "problèmes." -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "Le mot de passe doit comporter au moins 8 caractères" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "Les mots de passe ne correspondent pas" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "Installer maintenant" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/it_IT/LC_MESSAGES/installer.po b/install/includes/gettext/locale/it_IT/LC_MESSAGES/installer.po index 876c424ea..e43d74666 100644 --- a/install/includes/gettext/locale/it_IT/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/it_IT/LC_MESSAGES/installer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-06-05 15:15+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,67 +36,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -159,7 +159,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -317,11 +317,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -422,209 +422,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/nl_NL/LC_MESSAGES/installer.po b/install/includes/gettext/locale/nl_NL/LC_MESSAGES/installer.po index 7094dff6f..9441a74e6 100644 --- a/install/includes/gettext/locale/nl_NL/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/nl_NL/LC_MESSAGES/installer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-06-05 15:15+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,67 +36,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -159,7 +159,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -317,11 +317,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -422,209 +422,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/pl_PL/LC_MESSAGES/installer.po b/install/includes/gettext/locale/pl_PL/LC_MESSAGES/installer.po index 96926c3dd..a3895f593 100644 --- a/install/includes/gettext/locale/pl_PL/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/pl_PL/LC_MESSAGES/installer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-06-05 15:15+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,67 +36,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -159,7 +159,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -317,11 +317,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -422,209 +422,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/pt_PT/LC_MESSAGES/installer.po b/install/includes/gettext/locale/pt_PT/LC_MESSAGES/installer.po index 744080b4f..086330f21 100644 --- a/install/includes/gettext/locale/pt_PT/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/pt_PT/LC_MESSAGES/installer.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-07-30 21:59+0000\n" "Last-Translator: \"Francisco (F4VSE)\" \n" "Language-Team: Portuguese (Portugal) " msgstr "A palavra-passe não pode conter ' / \\ < >" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" "Erro: Pelo menos o Nome do Host/IP, Nome da Base de Dados e Nome de " "Utilizador são necessários." -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "Ligação..." -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" "A ligação foi bem sucedida e a sua base de dados apararenta ser compatível." -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." @@ -634,16 +634,27 @@ msgstr "" "A ligação foi bem sucedida, mas a sua base de dados parece ser demasiado " "antiga para o Wavelog. Pode tentar continuar, mas poderá ter problemas." -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "A versão mínima para MySQL é %s, para MariaDB é %s." -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "Pelo menos um campo está vazio." -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." @@ -651,7 +662,7 @@ msgstr "" "O locator parece não estar no formato correto. Deve ser algo tipo AA11AA " "(locator de 6 caracteres)." -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" @@ -659,35 +670,35 @@ msgstr "" "O endereço de e-mail não parece correto. Certifique-se de que é um endereço " "de e-mail válido" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "A palavra-passe deve ter pelo menos 8 caracteres" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "As palavras-passe não correspondem" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "Instalar agora" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "Instalação não possível. Lista de verificação incompleta." -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "Módulo PHP em falta" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "Os seguintes módulos PHP estão em falta:" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "Sem este módulo, o Instalador do Wavelog não funciona!" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "Por favor, instale os módulos necessários e reinicie o servidor web." diff --git a/install/includes/gettext/locale/ru_RU/LC_MESSAGES/installer.po b/install/includes/gettext/locale/ru_RU/LC_MESSAGES/installer.po index f29305b8e..ae13a96d5 100644 --- a/install/includes/gettext/locale/ru_RU/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/ru_RU/LC_MESSAGES/installer.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 14:56+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-07-30 12:21+0000\n" "Last-Translator: Michael Skolsky \n" "Language-Team: Russian " msgstr "Пароль не может содержать ' / \\ < >" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" "Ошибка: Требуются как минимум имя хоста/IP, имя базы данных и имя " "пользователя." -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "Подключение..." -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "Соединение было успешным, и ваша база данных должна быть совместимой." -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." @@ -631,16 +631,27 @@ msgstr "" "Соединение было успешным, но ваша база данных кажется слишком старой для " "Wavelog. Вы можете попробовать продолжить, но могут возникнуть проблемы." -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "Минимальная версия для MySQL - %s, для MariaDB - %s." -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "По крайней мере одно поле пустое." -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." @@ -648,7 +659,7 @@ msgstr "" "Похоже, что локатор не в правильном формате. Должен выглядеть как AA11AA (6-" "символьный QTH-локатор)." -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" @@ -656,35 +667,35 @@ msgstr "" "Адрес электронной почты выглядит некорректным. Убедитесь, что это " "действительный адрес электронной почты" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "Длина пароля должна быть не менее 8 символов" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "Пароли не совпадают" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "Установить сейчас" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "Установка невозможна. Контрольный список не завершен." -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "Отсутствует модуль PHP" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "Отсутствуют следующие модули PHP:" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "Без этого модуля установщик Wavelog не работает!" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "Пожалуйста, установите необходимые модули и перезапустите веб-сервер." diff --git a/install/includes/gettext/locale/sv_SE/LC_MESSAGES/installer.po b/install/includes/gettext/locale/sv_SE/LC_MESSAGES/installer.po index 7a1a4dfe7..cb064e7df 100644 --- a/install/includes/gettext/locale/sv_SE/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/sv_SE/LC_MESSAGES/installer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-06-05 15:15+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,67 +36,67 @@ msgstr "" msgid "not detected" msgstr "" -#: install/includes/interface_assets/footer.php:49 +#: install/includes/interface_assets/footer.php:50 msgid "Bulgarian" msgstr "" -#: install/includes/interface_assets/footer.php:50 +#: install/includes/interface_assets/footer.php:51 msgid "Chinese (Simplified)" msgstr "" -#: install/includes/interface_assets/footer.php:51 +#: install/includes/interface_assets/footer.php:52 msgid "Czech" msgstr "" -#: install/includes/interface_assets/footer.php:52 +#: install/includes/interface_assets/footer.php:53 msgid "Dutch" msgstr "" -#: install/includes/interface_assets/footer.php:53 +#: install/includes/interface_assets/footer.php:54 msgid "English" msgstr "" -#: install/includes/interface_assets/footer.php:54 +#: install/includes/interface_assets/footer.php:55 msgid "Finnish" msgstr "" -#: install/includes/interface_assets/footer.php:55 +#: install/includes/interface_assets/footer.php:56 msgid "French" msgstr "" -#: install/includes/interface_assets/footer.php:56 +#: install/includes/interface_assets/footer.php:57 msgid "German" msgstr "" -#: install/includes/interface_assets/footer.php:57 +#: install/includes/interface_assets/footer.php:58 msgid "Greek" msgstr "" -#: install/includes/interface_assets/footer.php:58 +#: install/includes/interface_assets/footer.php:59 msgid "Italian" msgstr "" -#: install/includes/interface_assets/footer.php:59 +#: install/includes/interface_assets/footer.php:60 msgid "Portuguese" msgstr "" -#: install/includes/interface_assets/footer.php:60 +#: install/includes/interface_assets/footer.php:61 msgid "Polish" msgstr "" -#: install/includes/interface_assets/footer.php:61 +#: install/includes/interface_assets/footer.php:62 msgid "Russian" msgstr "" -#: install/includes/interface_assets/footer.php:62 +#: install/includes/interface_assets/footer.php:63 msgid "Spanish" msgstr "" -#: install/includes/interface_assets/footer.php:63 +#: install/includes/interface_assets/footer.php:64 msgid "Swedish" msgstr "" -#: install/includes/interface_assets/footer.php:64 +#: install/includes/interface_assets/footer.php:65 msgid "Turkish" msgstr "" @@ -159,7 +159,7 @@ msgstr "" msgid "Thank you for installing Wavelog!" msgstr "" -#: install/index.php:66 install/index.php:69 install/index.php:1037 +#: install/index.php:66 install/index.php:69 install/index.php:1036 msgid "Language" msgstr "" @@ -317,11 +317,11 @@ msgid "" "an XML subscription. HamQTH does not always provide the locator information." msgstr "" -#: install/index.php:376 install/index.php:453 install/index.php:486 +#: install/index.php:376 install/index.php:453 install/index.php:905 msgid "Username" msgstr "" -#: install/index.php:379 install/index.php:457 install/index.php:496 +#: install/index.php:379 install/index.php:457 install/index.php:915 msgid "Password" msgstr "" @@ -422,209 +422,220 @@ msgstr "" msgid "All fields are required!" msgstr "" -#: install/index.php:482 +#: install/index.php:481 msgid "First Name" msgstr "" -#: install/index.php:492 -msgid "Last Name" -msgstr "" - -#: install/index.php:502 -msgid "Callsign" -msgstr "" - -#: install/index.php:506 -msgid "Confirm Password" -msgstr "" - -#: install/index.php:512 -msgid "City" -msgstr "" - -#: install/index.php:516 -msgid "E-Mail Address" -msgstr "" - -#: install/index.php:522 -msgid "Gridsquare/Locator" -msgstr "" - -#: install/index.php:526 -msgid "Timezone" -msgstr "" - -#: install/index.php:629 +#: install/index.php:485 msgid "DXCC" msgstr "" -#: install/index.php:631 +#: install/index.php:487 msgctxt "No DXCC" msgid "- None -" msgstr "" -#: install/index.php:632 install/index.php:638 install/index.php:662 -#: install/index.php:674 install/index.php:677 install/index.php:682 -#: install/index.php:683 install/index.php:692 install/index.php:696 -#: install/index.php:711 install/index.php:724 install/index.php:725 -#: install/index.php:729 install/index.php:750 install/index.php:757 -#: install/index.php:759 install/index.php:760 install/index.php:762 -#: install/index.php:766 install/index.php:767 install/index.php:768 -#: install/index.php:772 install/index.php:773 install/index.php:792 -#: install/index.php:800 install/index.php:806 install/index.php:813 -#: install/index.php:814 install/index.php:820 install/index.php:822 -#: install/index.php:824 install/index.php:842 install/index.php:847 -#: install/index.php:848 install/index.php:862 install/index.php:877 -#: install/index.php:878 install/index.php:882 install/index.php:893 -#: install/index.php:894 install/index.php:899 install/index.php:903 -#: install/index.php:905 install/index.php:906 install/index.php:913 -#: install/index.php:928 install/index.php:930 install/index.php:947 -#: install/index.php:950 install/index.php:955 install/index.php:958 -#: install/index.php:961 install/index.php:971 install/index.php:977 -#: install/index.php:981 install/index.php:987 install/index.php:990 -#: install/index.php:993 install/index.php:998 install/index.php:1024 -#: install/index.php:1030 install/index.php:1032 +#: install/index.php:488 install/index.php:494 install/index.php:518 +#: install/index.php:530 install/index.php:533 install/index.php:538 +#: install/index.php:539 install/index.php:548 install/index.php:552 +#: install/index.php:567 install/index.php:580 install/index.php:581 +#: install/index.php:585 install/index.php:606 install/index.php:613 +#: install/index.php:615 install/index.php:616 install/index.php:618 +#: install/index.php:622 install/index.php:623 install/index.php:624 +#: install/index.php:628 install/index.php:629 install/index.php:648 +#: install/index.php:656 install/index.php:662 install/index.php:669 +#: install/index.php:670 install/index.php:676 install/index.php:678 +#: install/index.php:680 install/index.php:698 install/index.php:703 +#: install/index.php:704 install/index.php:718 install/index.php:733 +#: install/index.php:734 install/index.php:738 install/index.php:749 +#: install/index.php:750 install/index.php:755 install/index.php:759 +#: install/index.php:761 install/index.php:762 install/index.php:769 +#: install/index.php:784 install/index.php:786 install/index.php:803 +#: install/index.php:806 install/index.php:811 install/index.php:814 +#: install/index.php:817 install/index.php:827 install/index.php:833 +#: install/index.php:837 install/index.php:843 install/index.php:846 +#: install/index.php:849 install/index.php:854 install/index.php:880 +#: install/index.php:886 install/index.php:888 install/index.php:1700 msgid "Deleted DXCC" msgstr "" -#: install/index.php:1055 +#: install/index.php:895 +msgid "Last Name" +msgstr "" + +#: install/index.php:899 +msgid "Callsign" +msgstr "" + +#: install/index.php:909 +msgid "Gridsquare/Locator" +msgstr "" + +#: install/index.php:919 +msgid "City" +msgstr "" + +#: install/index.php:925 +msgid "Confirm Password" +msgstr "" + +#: install/index.php:929 +msgid "Timezone" +msgstr "" + +#: install/index.php:1032 +msgid "E-Mail Address" +msgstr "" + +#: install/index.php:1054 msgid "Checklist" msgstr "" -#: install/index.php:1060 +#: install/index.php:1059 msgid "Pre-Checks" msgstr "" -#: install/index.php:1069 +#: install/index.php:1068 msgid "Configuration" msgstr "" -#: install/index.php:1078 +#: install/index.php:1077 msgid "Database" msgstr "" -#: install/index.php:1087 +#: install/index.php:1086 msgid "First User" msgstr "" -#: install/index.php:1097 +#: install/index.php:1096 msgid "Nearly done!" msgstr "" -#: install/index.php:1099 +#: install/index.php:1098 msgid "You prepared all neccessary steps." msgstr "" -#: install/index.php:1100 +#: install/index.php:1099 msgid "We now can install Wavelog. This process can take a few minutes." msgstr "" -#: install/index.php:1106 +#: install/index.php:1105 msgid "Reset" msgstr "" -#: install/index.php:1111 +#: install/index.php:1110 msgid "Installer Reset" msgstr "" -#: install/index.php:1114 +#: install/index.php:1113 msgid "Do you really want to reset all data and start from scratch?" msgstr "" -#: install/index.php:1117 +#: install/index.php:1116 msgid "Yes" msgstr "" -#: install/index.php:1118 +#: install/index.php:1117 msgid "No" msgstr "" -#: install/index.php:1128 +#: install/index.php:1127 msgid "Back" msgstr "" -#: install/index.php:1129 +#: install/index.php:1128 msgid "Continue" msgstr "" -#: install/index.php:1207 +#: install/index.php:1206 msgid "" "You can't continue. Solve the red marked issues, restart the webserver and " "reload this page." msgstr "" -#: install/index.php:1334 +#: install/index.php:1333 msgid "Password can't contain ' / \\ < >" msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/tr_TR/LC_MESSAGES/installer.po b/install/includes/gettext/locale/tr_TR/LC_MESSAGES/installer.po index 33e08fcdd..154c0ff9d 100644 --- a/install/includes/gettext/locale/tr_TR/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/tr_TR/LC_MESSAGES/installer.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-07-26 09:13+0000\n" "Last-Translator: Halil AYYILDIZ \n" "Language-Team: Turkish " msgstr "" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "Bağlanıyor..." -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." @@ -607,56 +607,67 @@ msgstr "" "Bağlantı başarılı oldu ancak veritabanınız Wavelog için çok eski görünüyor. " "Devam etmeyi deneyebilirsiniz ancak sorunlarla karşılaşabilirsiniz." -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "Şifre en az 8 karakter uzunluğunda olmalıdır" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "Şifreler eşleşmiyor" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "Şimdi Yükle" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "" diff --git a/install/includes/gettext/locale/zh_CN/LC_MESSAGES/installer.po b/install/includes/gettext/locale/zh_CN/LC_MESSAGES/installer.po index 828b7d5b5..d64807ff6 100644 --- a/install/includes/gettext/locale/zh_CN/LC_MESSAGES/installer.po +++ b/install/includes/gettext/locale/zh_CN/LC_MESSAGES/installer.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-30 10:38+0000\n" +"POT-Creation-Date: 2024-08-08 14:17+0000\n" "PO-Revision-Date: 2024-08-01 15:24+0000\n" "Last-Translator: Karuru \n" "Language-Team: Chinese (Simplified) " msgstr "密码不能包含 '/?<>" -#: install/index.php:1501 +#: install/index.php:1500 msgid "Error: At least Hostname/IP, Database Name and Username are required." msgstr "错误:至少提供 主机名/IP、数据库名称和用户名。" -#: install/index.php:1511 +#: install/index.php:1510 msgid "Connecting..." msgstr "连接中…" -#: install/index.php:1535 +#: install/index.php:1534 msgid "Connection was successful and your database should be compatible." msgstr "连接成功,您的数据库兼容 Wavelog。" -#: install/index.php:1539 +#: install/index.php:1538 msgid "" "Connection was successful but your database seems too old for Wavelog. You " "can try to continue but you could run into issues." msgstr "连接成功,但数据库版本有一些老,您可以继续安装但是可能会出现使用问题。" -#: install/index.php:1539 +#: install/index.php:1538 #, php-format msgid "The min. version for MySQL is %s, for MariaDB it's %s." msgstr "MySQL 最低版本 %s,或 MariaDB 最低版本 %s。" -#: install/index.php:1651 +#: install/index.php:1653 +msgid "Search" +msgstr "" + +#: install/index.php:1686 msgid "At least one field is empty." msgstr "有字段未填写。" -#: install/index.php:1681 +#: install/index.php:1702 +msgid "" +"Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. " +"Check which DXCC for this particular location is the correct one. If you are " +"sure, ignore this warning." +msgstr "" + +#: install/index.php:1726 msgid "" "The locator seems to be not in the correct format. Should look like AA11AA " "(6-char grid locator)." msgstr "网格格式有误,例如 AA11AA(6位)。" -#: install/index.php:1695 +#: install/index.php:1740 msgid "" "The e-mail adress does not look correct. Make sure it's a valid e-mail " "address" msgstr "E-mail 地址有误,请重新检查" -#: install/index.php:1722 +#: install/index.php:1767 msgid "Password should be at least 8 characters long" msgstr "密码需要至少 8 位长" -#: install/index.php:1731 +#: install/index.php:1776 msgid "Passwords do not match" msgstr "密码不匹配" -#: install/index.php:1778 +#: install/index.php:1823 msgid "Install Now" msgstr "现在安装" -#: install/index.php:1782 +#: install/index.php:1827 msgid "Install not possible. Checklist incomplete." msgstr "无法安装,检查单无法通过。" -#: install/index.php:1898 +#: install/index.php:1943 msgid "PHP Module missing" msgstr "PHP 模块未安装" -#: install/index.php:1900 +#: install/index.php:1945 msgid "The following PHP modules are missing:" msgstr "缺少 PHP 模块:" -#: install/index.php:1901 +#: install/index.php:1946 msgid "Without this module the Wavelog Installer does not work!" msgstr "Wavelog 需要这个模块来运行!" -#: install/index.php:1902 +#: install/index.php:1947 msgid "Please install the required modules and restart the webserver." msgstr "请安装缺失的模块,并重启服务器。" diff --git a/install/includes/interface_assets/footer.php b/install/includes/interface_assets/footer.php index 07c16e366..205f28f6a 100644 --- a/install/includes/interface_assets/footer.php +++ b/install/includes/interface_assets/footer.php @@ -38,6 +38,7 @@ } from "../assets/js/country-flag-emoji-polyfill.js"; polyfillCountryFlagEmojis("Twemoji Country Flags", "assets/fonts/TwemojiCountryFlags/TwemojiCountryFlags.woff2"); + -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    - @@ -1033,6 +889,149 @@ if (!file_exists('.lock')) {
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + + +
    ', + }, + enableFiltering: true, + filterPlaceholder: "", + enableFullValueFiltering: false, + enableCaseInsensitiveFiltering: true, + widthSynchronizationMode: 'always', + numberDisplayed: 1, + inheritClass: true, + buttonWidth: '100%', + maxHeight: 300, + dropUp: false + }); + $('#dxcc_id').hide(); + $('.multiselect-container .multiselect-filter', $('#dxcc_id').parent()).css({ + 'position': 'sticky', + 'margin-top': '3px', + 'top': '0px', + 'z-index': 1, + 'background-color': 'inherit', + 'width': '100%', + 'height': '39px', + 'padding-left': '1px' + }); + + $('#dxcc_id').on('change', function() { + DXCC_Warning(); + }); + DXCC_Warning(); }); function check_for_empty_fields() { @@ -1661,15 +1696,25 @@ if (!file_exists('.lock')) { } + function DXCC_Warning() { + if ($("#dxcc_id option:selected").text().includes("")) { + $('#dxcc_button').addClass('has-warning'); + show_userformwarnings("warning", ""); + } else { + $('#dxcc_button').removeClass('has-warning'); + hide_userformwarnings(); + } + } + function show_userformwarnings(status, message) { - userFormWarnings.css('display', 'block'); + userFormWarnings.show(); userFormWarnings.removeClass('alert-warning alert-danger'); userFormWarnings.addClass('alert-' + status); userFormWarnings.html(message); } function hide_userformwarnings() { - userFormWarnings.css('display', 'none'); + userFormWarnings.hide(); userFormWarnings.removeClass('alert-warning alert-danger'); } @@ -1867,7 +1912,7 @@ if (!file_exists('.lock')) { } if (checklist_firstuser) { - if (passwordField.hasClass('has-warning')) { + if (passwordField.hasClass('has-warning') || $('#dxcc_button').hasClass('has-warning')) { checklistFirstUser.removeClass('fa-times-circle'); checklistFirstUser.removeClass('fa-check-circle'); checklistFirstUser.addClass('fa-exclamation-triangle').css('color', '#ffc107'); @@ -1897,7 +1942,7 @@ if (!file_exists('.lock')) {

    danger_triangle -

    ".implode(',', installer_required_modules()).""; ?>

    +

    " . implode(',', installer_required_modules()) . ""; ?>

    @@ -1910,7 +1955,6 @@ if (!file_exists('.lock')) { - + \ No newline at end of file diff --git a/predict/Predict.php b/predict/Predict.php new file mode 100644 index 000000000..9e3fa162e --- /dev/null +++ b/predict/Predict.php @@ -0,0 +1,877 @@ + + John A. Magliacane, KD2BD. + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ + +require_once realpath(__DIR__ . "/../predict/Predict/Time.php"); +require_once realpath(__DIR__ . "/../predict/Predict/Math.php"); +require_once realpath(__DIR__ . "/../predict/Predict/Pass.php"); +require_once realpath(__DIR__ . "/../predict/Predict/PassDetail.php"); +require_once realpath(__DIR__ . "/../predict/Predict/Vector.php"); +require_once realpath(__DIR__ . "/../predict/Predict/Geodetic.php"); +require_once realpath(__DIR__ . "/../predict/Predict/ObsSet.php"); +require_once realpath(__DIR__ . "/../predict/Predict/Solar.php"); +require_once realpath(__DIR__ . "/../predict/Predict/SGPSDP.php"); +require_once realpath(__DIR__ . "/../predict/Predict/SGPSDP.php"); + +/** + * The main Predict class. Contains constants for use by other classes, as well as + * the prediction logic. + */ +class Predict +{ + const de2ra = 1.74532925E-2; /* Degrees to Radians */ + const pi = 3.1415926535898; /* Pi */ + const pio2 = 1.5707963267949; /* Pi/2 */ + const x3pio2 = 4.71238898; /* 3*Pi/2 */ + const twopi = 6.2831853071796; /* 2*Pi */ + const e6a = 1.0E-6; + const tothrd = 6.6666667E-1; /* 2/3 */ + const xj2 = 1.0826158E-3; /* J2 Harmonic */ + const xj3 = -2.53881E-6; /* J3 Harmonic */ + const xj4 = -1.65597E-6; /* J4 Harmonic */ + const xke = 7.43669161E-2; + const xkmper = 6.378135E3; /* Earth radius km */ + const xmnpda = 1.44E3; /* Minutes per day */ + const km2mi = 0.621371; /* Kilometers per Mile */ + const ae = 1.0; + const ck2 = 5.413079E-4; + const ck4 = 6.209887E-7; + const __f = 3.352779E-3; + const ge = 3.986008E5; + const __s__ = 1.012229; + const qoms2t = 1.880279E-09; + const secday = 8.6400E4; /* Seconds per day */ + const omega_E = 1.0027379; + const omega_ER = 6.3003879; + const zns = 1.19459E-5; + const c1ss = 2.9864797E-6; + const zes = 1.675E-2; + const znl = 1.5835218E-4; + const c1l = 4.7968065E-7; + const zel = 5.490E-2; + const zcosis = 9.1744867E-1; + const zsinis = 3.9785416E-1; + const zsings = -9.8088458E-1; + const zcosgs = 1.945905E-1; + const zcoshs = 1; + const zsinhs = 0; + const q22 = 1.7891679E-6; + const q31 = 2.1460748E-6; + const q33 = 2.2123015E-7; + const g22 = 5.7686396; + const g32 = 9.5240898E-1; + const g44 = 1.8014998; + const g52 = 1.0508330; + const g54 = 4.4108898; + const root22 = 1.7891679E-6; + const root32 = 3.7393792E-7; + const root44 = 7.3636953E-9; + const root52 = 1.1428639E-7; + const root54 = 2.1765803E-9; + const thdt = 4.3752691E-3; + const rho = 1.5696615E-1; + const mfactor = 7.292115E-5; + const __sr__ = 6.96000E5; /*Solar radius - kilometers (IAU 76)*/ + const AU = 1.49597870E8; /*Astronomical unit - kilometers (IAU 76)*/ + + /* visibility constants */ + const SAT_VIS_NONE = 0; + const SAT_VIS_VISIBLE = 1; + const SAT_VIS_DAYLIGHT = 2; + const SAT_VIS_ECLIPSED = 3; + + /* preferences */ + public $minEle = 10; // Minimum elevation + public $timeRes = 10; // Pass details: time resolution + public $numEntries = 20; // Pass details: number of entries + public $threshold = -6; // Twilight threshold + + /** + * Predict the next pass. + * + * This function simply wraps the get_pass function using the current time + * as parameter. + * + * Note: the data in sat will be corrupt (future) and must be refreshed + * by the caller, if the caller will need it later on (eg. if the caller + * is GtkSatList). + * + * @param Predict_Sat $sat The satellite data. + * @param Predict_QTH $qth The observer data. + * @param int $maxdt The maximum number of days to look ahead. + * + * @return Predict_Pass Pointer instance or NULL if no pass can be + * found. + */ + public function get_next_pass(Predict_Sat $sat, Predict_QTH $qth, $maxdt) + { + /* get the current time and call the get_pass function */ + $now = Predict_Time::get_current_daynum(); + + return $this->get_pass($sat, $qth, $now, $maxdt); + } + + /** Predict first pass after a certain time. + * + * @param Predict_Sat $sat The satellite data. + * @param Predict_QTH $qth The observer's location data. + * @param float $start Starting time. + * @param int $maxdt The maximum number of days to look ahead (0 for no limit). + * + * @return Predict_Pass or NULL if there was an error. + * + * This function will find the first upcoming pass with AOS no earlier than + * t = start and no later than t = (start+maxdt). + * + * note For no time limit use maxdt = 0.0 + * + * note the data in sat will be corrupt (future) and must be refreshed + * by the caller, if the caller will need it later on + */ + public function get_pass(Predict_Sat $sat_in, Predict_QTH $qth, $start, $maxdt) + { + + $aos = 0.0; /* time of AOS */ + $tca = 0.0; /* time of TCA */ + $los = 0.0; /* time of LOS */ + $dt = 0.0; /* time diff */ + $step = 0.0; /* time step */ + $t0 = $start; + $tres = 0.0; /* required time resolution */ + $max_el = 0.0; /* maximum elevation */ + $pass = null; + $detail = null; + $done = false; + $iter = 0; /* number of iterations */ + /* FIXME: watchdog */ + + /*copy sat_in to a working structure*/ + $sat = clone $sat_in; + $sat_working = clone $sat_in; + + /* get time resolution; sat-cfg stores it in seconds */ + $tres = $this->timeRes / 86400.0; + + /* loop until we find a pass with elevation > SAT_CFG_INT_PRED_MIN_EL + or we run out of time + FIXME: we should have a safety break + */ + while (!$done) { + /* Find los of next pass or of current pass */ + $los = $this->find_los($sat, $qth, $t0, $maxdt); // See if a pass is ongoing + $aos = $this->find_aos($sat, $qth, $t0, $maxdt); + /* sat_log_log(SAT_LOG_LEVEL_MSG, "%s:%s:%d: found aos %f and los %f for t0=%f", */ + /* __FILE__, */ + /* __FUNCTION__, */ + /* __LINE__, */ + /* aos, */ + /* los, */ + /* t0); */ + if ($aos > $los) { + // los is from an currently happening pass, find previous aos + $aos = $this->find_prev_aos($sat, $qth, $t0); + } + + /* aos = 0.0 means no aos */ + if ($aos == 0.0) { + $done = true; + } else if (($maxdt > 0.0) && ($aos > ($start + $maxdt)) ) { + /* check whether we are within time limits; + maxdt = 0 mean no time limit. + */ + $done = true; + } else { + //los = find_los (sat, qth, aos + 0.001, maxdt); // +1.5 min later + $dt = $los - $aos; + + /* get time step, which will give us the max number of entries */ + $step = $dt / $this->numEntries; + + /* but if this is smaller than the required resolution + we go with the resolution + */ + if ($step < $tres) { + $step = $tres; + } + + /* create a pass_t entry; FIXME: g_try_new in 2.8 */ + $pass = new Predict_Pass(); + + $pass->aos = $aos; + $pass->los = $los; + $pass->max_el = 0.0; + $pass->aos_az = 0.0; + $pass->los_az = 0.0; + $pass->maxel_az = 0.0; + $pass->vis = '---'; + $pass->satname = $sat->nickname; + $pass->details = array(); + + /* iterate over each time step */ + for ($t = $pass->aos; $t <= $pass->los; $t += $step) { + + /* calculate satellite data */ + $this->predict_calc($sat, $qth, $t); + + /* in the first iter we want to store + pass->aos_az + */ + if ($t == $pass->aos) { + $pass->aos_az = $sat->az; + $pass->orbit = $sat->orbit; + } + + /* append details to sat->details */ + $detail = new Predict_PassDetail(); + $detail->time = $t; + $detail->pos->x = $sat->pos->x; + $detail->pos->y = $sat->pos->y; + $detail->pos->z = $sat->pos->z; + $detail->pos->w = $sat->pos->w; + $detail->vel->x = $sat->vel->x; + $detail->vel->y = $sat->vel->y; + $detail->vel->z = $sat->vel->z; + $detail->vel->w = $sat->vel->w; + $detail->velo = $sat->velo; + $detail->az = $sat->az; + $detail->el = $sat->el; + $detail->range = $sat->range; + $detail->range_rate = $sat->range_rate; + $detail->lat = $sat->ssplat; + $detail->lon = $sat->ssplon; + $detail->alt = $sat->alt; + $detail->ma = $sat->ma; + $detail->phase = $sat->phase; + $detail->footprint = $sat->footprint; + $detail->orbit = $sat->orbit; + $detail->vis = $this->get_sat_vis($sat, $qth, $t); + + /* also store visibility "bit" */ + switch ($detail->vis) { + case self::SAT_VIS_VISIBLE: + $pass->vis[0] = 'V'; + break; + case self::SAT_VIS_DAYLIGHT: + $pass->vis[1] = 'D'; + break; + case self::SAT_VIS_ECLIPSED: + $pass->vis[2] = 'E'; + break; + default: + break; + } + + // Using an array, no need to prepend and reverse the list + // as gpredict does + $pass->details[] = $detail; + + // Look up apparent magnitude if this is a visible pass + if ($detail->vis === self::SAT_VIS_VISIBLE) { + $apmag = $sat->calculateApparentMagnitude($t, $qth); + if ($pass->max_apparent_magnitude === null || $apmag < $pass->max_apparent_magnitude) { + $pass->max_apparent_magnitude = $apmag; + } + } + + /* store elevation if greater than the + previously stored one + */ + if ($sat->el > $max_el) { + $max_el = $sat->el; + $tca = $t; + $pass->maxel_az = $sat->az; + } + + /* g_print ("TIME: %f\tAZ: %f\tEL: %f (MAX: %f)\n", */ + /* t, sat->az, sat->el, max_el); */ + } + + /* calculate satellite data */ + $this->predict_calc($sat, $qth, $pass->los); + /* store los_az, max_el and tca */ + $pass->los_az = $sat->az; + $pass->max_el = $max_el; + $pass->tca = $tca; + + /* check whether this pass is good */ + if ($max_el >= $this->minEle) { + $done = true; + } else { + $done = false; + $t0 = $los + 0.014; // +20 min + $pass = null; + } + + $iter++; + } + } + + return $pass; + } + + /** + * Calculate satellite visibility. + * + * @param Predict_Sat $sat The satellite structure. + * @param Predict_QTH $qth The QTH + * @param float $jul_utc The time at which the visibility should be calculated. + * + * @return int The visiblity constant, 0, 1, 2, or 3 (see above) + */ + public function get_sat_vis(Predict_Sat $sat, Predict_QTH $qth, $jul_utc) + { + /* gboolean sat_sun_status; + gdouble sun_el; + gdouble threshold; + gdouble eclipse_depth; + sat_vis_t vis = SAT_VIS_NONE; */ + + $eclipse_depth = 0.0; + $zero_vector = new Predict_Vector(); + $obs_geodetic = new Predict_Geodetic(); + + /* Solar ECI position vector */ + $solar_vector = new Predict_Vector(); + + /* Solar observed az and el vector */ + $solar_set = new Predict_ObsSet(); + + /* FIXME: could be passed as parameter */ + $obs_geodetic->lon = $qth->lon * self::de2ra; + $obs_geodetic->lat = $qth->lat * self::de2ra; + $obs_geodetic->alt = $qth->alt / 1000.0; + $obs_geodetic->theta = 0; + + Predict_Solar::Calculate_Solar_Position($jul_utc, $solar_vector); + Predict_SGPObs::Calculate_Obs($jul_utc, $solar_vector, $zero_vector, $obs_geodetic, $solar_set); + + if (Predict_Solar::Sat_Eclipsed($sat->pos, $solar_vector, $eclipse_depth)) { + /* satellite is eclipsed */ + $sat_sun_status = false; + } else { + /* satellite in sunlight => may be visible */ + $sat_sun_status = true; + } + + if ($sat_sun_status) { + $sun_el = Predict_Math::Degrees($solar_set->el); + + if ($sat->el >= 0.0) { + $vis = self::SAT_VIS_VISIBLE; + } else { + $vis = self::SAT_VIS_DAYLIGHT; + } + } else { + $vis = self::SAT_VIS_ECLIPSED; + } + + return $vis; + } + + /** Find the AOS time of the next pass. + * @author Alexandru Csete, OZ9AEC + * @author John A. Magliacane, KD2BD + * @param Predict_Sat $sat The satellite data. + * @param Predict_QTH $qth The observer's location (QTH) data. + * @param float $start The julian date where calculation should start. + * @param int $maxdt The upper time limit in days (0.0 = no limit) + * @return The julain date of the next AOS or 0.0 if the satellite has no AOS. + * + * This function finds the time of AOS for the first coming pass taking place + * no earlier that start. + * If the satellite is currently within range, the function first calls + * find_los to get the next LOS time. Then the calculations are done using + * the new start time. + * + */ + public function find_aos(Predict_Sat $sat, Predict_QTH $qth, $start, $maxdt) + { + $t = $start; + $aostime = 0.0; + + + /* make sure current sat values are + in sync with the time + */ + $this->predict_calc($sat, $qth, $start); + + /* check whether satellite has aos */ + if (($sat->otype == Predict_SGPSDP::ORBIT_TYPE_GEO) || + ($sat->otype == Predict_SGPSDP::ORBIT_TYPE_DECAYED) || + !$this->has_aos($sat, $qth)) { + + return 0.0; + } + + if ($sat->el > 0.0) { + $t = $this->find_los($sat, $qth, $start, $maxdt) + 0.014; // +20 min + } + + /* invalid time (potentially returned by find_los) */ + if ($t < 0.1) { + return 0.0; + } + + /* update satellite data */ + $this->predict_calc($sat, $qth, $t); + + /* use upper time limit */ + if ($maxdt > 0.0) { + + /* coarse time steps */ + while (($sat->el < -1.0) && ($t <= ($start + $maxdt))) { + $t -= 0.00035 * ($sat->el * (($sat->alt / 8400.0) + 0.46) - 2.0); + $this->predict_calc($sat, $qth, $t); + } + + /* fine steps */ + while (($aostime == 0.0) && ($t <= ($start + $maxdt))) { + + if (abs($sat->el) < 0.005) { + $aostime = $t; + } else { + $t -= $sat->el * sqrt($sat->alt) / 530000.0; + $this->predict_calc($sat, $qth, $t); + } + } + } else { + /* don't use upper time limit */ + + /* coarse time steps */ + while ($sat->el < -1.0) { + + $t -= 0.00035 * ($sat->el * (($sat->alt / 8400.0) + 0.46) - 2.0); + $this->predict_calc($sat, $qth, $t); + } + + /* fine steps */ + while ($aostime == 0.0) { + + if (abs($sat->el) < 0.005) { + $aostime = $t; + } else { + $t -= $sat->el * sqrt($sat->alt) / 530000.0; + $this->predict_calc($sat, $qth, $t); + } + + } + } + + return $aostime; + } + + /** SGP4SDP4 driver for doing AOS/LOS calculations. + * @param Predict_Sat $sat The satellite data. + * @param Predict_QTH $qth The QTH observer location data. + * @param float $t The time for calculation (Julian Date) + * + */ + public function predict_calc(Predict_Sat $sat, Predict_QTH $qth, $t) + { + $obs_set = new Predict_ObsSet(); + $sat_geodetic = new Predict_Geodetic(); + $obs_geodetic = new Predict_Geodetic(); + + $obs_geodetic->lon = $qth->lon * self::de2ra; + $obs_geodetic->lat = $qth->lat * self::de2ra; + $obs_geodetic->alt = $qth->alt / 1000.0; + $obs_geodetic->theta = 0; + + $sat->jul_utc = $t; + $sat->tsince = ($sat->jul_utc - $sat->jul_epoch) * self::xmnpda; + + /* call the norad routines according to the deep-space flag */ + $sgpsdp = Predict_SGPSDP::getInstance($sat); + if ($sat->flags & Predict_SGPSDP::DEEP_SPACE_EPHEM_FLAG) { + $sgpsdp->SDP4($sat, $sat->tsince); + } else { + $sgpsdp->SGP4($sat, $sat->tsince); + } + + Predict_Math::Convert_Sat_State($sat->pos, $sat->vel); + + /* get the velocity of the satellite */ + $sat->vel->w = sqrt($sat->vel->x * $sat->vel->x + $sat->vel->y * $sat->vel->y + $sat->vel->z * $sat->vel->z); + $sat->velo = $sat->vel->w; + Predict_SGPObs::Calculate_Obs($sat->jul_utc, $sat->pos, $sat->vel, $obs_geodetic, $obs_set); + Predict_SGPObs::Calculate_LatLonAlt($sat->jul_utc, $sat->pos, $sat_geodetic); + + while ($sat_geodetic->lon < -self::pi) { + $sat_geodetic->lon += self::twopi; + } + + while ($sat_geodetic->lon > (self::pi)) { + $sat_geodetic->lon -= self::twopi; + } + + $sat->az = Predict_Math::Degrees($obs_set->az); + $sat->el = Predict_Math::Degrees($obs_set->el); + $sat->range = $obs_set->range; + $sat->range_rate = $obs_set->range_rate; + $sat->ssplat = Predict_Math::Degrees($sat_geodetic->lat); + $sat->ssplon = Predict_Math::Degrees($sat_geodetic->lon); + $sat->alt = $sat_geodetic->alt; + $sat->ma = Predict_Math::Degrees($sat->phase); + $sat->ma *= 256.0 / 360.0; + $sat->phase = Predict_Math::Degrees($sat->phase); + + /* same formulas, but the one from predict is nicer */ + //sat->footprint = 2.0 * xkmper * acos (xkmper/sat->pos.w); + $sat->footprint = 12756.33 * acos(self::xkmper / (self::xkmper + $sat->alt)); + $age = $sat->jul_utc - $sat->jul_epoch; + $sat->orbit = floor(($sat->tle->xno * self::xmnpda / self::twopi + + $age * $sat->tle->bstar * self::ae) * $age + + $sat->tle->xmo / self::twopi) + $sat->tle->revnum - 1; + } + + /** Find the LOS time of the next pass. + * @author Alexandru Csete, OZ9AEC + * @author John A. Magliacane, KD2BD + * @param Predict_Sat $sat The satellite data. + * @param Predict_QTH $qth The QTH observer location data. + * @param float $start The time where calculation should start. (Julian Date) + * @param int $maxdt The upper time limit in days (0.0 = no limit) + * @return The time (julian date) of the next LOS or 0.0 if the satellite has no LOS. + * + * This function finds the time of LOS for the first coming pass taking place + * no earlier that start. + * If the satellite is currently out of range, the function first calls + * find_aos to get the next AOS time. Then the calculations are done using + * the new start time. + * The function has a built-in watchdog to ensure that we don't end up in + * lengthy loops. + * + */ + public function find_los(Predict_Sat $sat, Predict_QTH $qth, $start, $maxdt) + { + $t = $start; + $lostime = 0.0; + + + $this->predict_calc($sat, $qth, $start); + + /* check whether satellite has aos */ + if (($sat->otype == Predict_SGPSDP::ORBIT_TYPE_GEO) || + ($sat->otype == Predict_SGPSDP::ORBIT_TYPE_DECAYED) || + !$this->has_aos ($sat, $qth)) { + + return 0.0; + } + + if ($sat->el < 0.0) { + $t = $this->find_aos($sat, $qth, $start, $maxdt) + 0.001; // +1.5 min + } + + /* invalid time (potentially returned by find_aos) */ + if ($t < 0.01) { + return 0.0; + } + + /* update satellite data */ + $this->predict_calc($sat, $qth, $t); + + /* use upper time limit */ + if ($maxdt > 0.0) { + + /* coarse steps */ + while (($sat->el >= 1.0) && ($t <= ($start + $maxdt))) { + $t += cos(($sat->el - 1.0) * self::de2ra) * sqrt($sat->alt) / 25000.0; + $this->predict_calc($sat, $qth, $t); + } + + /* fine steps */ + while (($lostime == 0.0) && ($t <= ($start + $maxdt))) { + + $t += $sat->el * sqrt($sat->alt) / 502500.0; + $this->predict_calc($sat, $qth, $t); + + if (abs($sat->el) < 0.005) { + $lostime = $t; + } + } + } else { + /* don't use upper limit */ + + /* coarse steps */ + while ($sat->el >= 1.0) { + $t += cos(($sat->el - 1.0) * self::de2ra) * sqrt($sat->alt) / 25000.0; + $this->predict_calc($sat, $qth, $t); + } + + /* fine steps */ + while ($lostime == 0.0) { + + $t += $sat->el * sqrt($sat->alt) / 502500.0; + $this->predict_calc($sat, $qth, $t); + + if (abs($sat->el) < 0.005) + $lostime = $t; + } + } + + return $lostime; + } + + /** Find AOS time of current pass. + * @param Predict_Sat $sat The satellite to find AOS for. + * @param Predict_QTH $qth The ground station. + * @param float $start Start time, prefereably now. + * @return The time of the previous AOS or 0.0 if the satellite has no AOS. + * + * This function can be used to find the AOS time in the past of the + * current pass. + */ + public function find_prev_aos(Predict_Sat $sat, Predict_QTH $qth, $start) + { + $aostime = $start; + + /* make sure current sat values are + in sync with the time + */ + $this->predict_calc($sat, $qth, $start); + + /* check whether satellite has aos */ + if (($sat->otype == Predict_SGPSDP::ORBIT_TYPE_GEO) || + ($sat->otype == Predict_SGPSDP::ORBIT_TYPE_DECAYED) || + !$this->has_aos($sat, $qth)) { + + return 0.0; + } + + while ($sat->el >= 0.0) { + $aostime -= 0.0005; // 0.75 min + $this->predict_calc($sat, $qth, $aostime); + } + + return $aostime; + } + + /** Determine whether satellite ever reaches AOS. + * @author John A. Magliacane, KD2BD + * @author Alexandru Csete, OZ9AEC + * @param Predict_Sat $sat The satellite data. + * @param Predict_QTH $qth The observer's location data + * @return bool true if the satellite will reach AOS, false otherwise. + * + */ + public function has_aos(Predict_Sat $sat, Predict_QTH $qth) + { + $retcode = false; + + /* FIXME */ + if ($sat->meanmo == 0.0) { + $retcode = false; + } else { + + /* xincl is already in RAD by select_ephemeris */ + $lin = $sat->tle->xincl; + if ($lin >= self::pio2) { + $lin = self::pi - $lin; + } + + $sma = 331.25 * exp(log(1440.0 / $sat->meanmo) * (2.0 / 3.0)); + $apogee = $sma * (1.0 + $sat->tle->eo) - self::xkmper; + + if ((acos(self::xkmper / ($apogee + self::xkmper)) + ($lin)) > abs($qth->lat * self::de2ra)) { + $retcode = true; + } else { + $retcode = false; + } + } + + return $retcode; + } + + /** Predict passes after a certain time. + * + * + * This function calculates num upcoming passes with AOS no earlier + * than t = start and not later that t = (start+maxdt). The function will + * repeatedly call get_pass until + * the number of predicted passes is equal to num, the time has reached + * limit or the get_pass function returns NULL. + * + * note For no time limit use maxdt = 0.0 + * + * note the data in sat will be corrupt (future) and must be refreshed + * by the caller, if the caller will need it later on (eg. if the caller + * is GtkSatList). + * + * note Prepending to a singly linked list is much faster than appending. + * Therefore, the elements are prepended whereafter the GSList is + * reversed + * + * + * @param Predict_Sat $sat The satellite data + * @param Predict_QTH $qth The observer's location data + * @param float $start The start julian date + * @param int $maxdt The max # of days to look + * @param int $num The max # of passes to get + * @return array of Predict_Pass instances if found, empty array otherwise + */ + public function get_passes(Predict_Sat $sat, Predict_QTH $qth, $start, $maxdt, $num = 0) + { + $passes = array(); + + /* if no number has been specified + set it to something big */ + if ($num == 0) { + $num = 100; + } + + $t = $start; + + for ($i = 0; $i < $num; $i++) { + $pass = $this->get_pass($sat, $qth, $t, $maxdt); + + if ($pass != null) { + $passes[] = $pass; + $t = $pass->los + 0.014; // +20 min + + /* if maxdt > 0.0 check whether we have reached t = start+maxdt + if yes finish predictions + */ + if (($maxdt > 0.0) && ($t >= ($start + $maxdt))) { + $i = $num; + } + } else { + /* we can't get any more passes */ + $i = $num; + } + } + + return $passes; + } + + /** + * Filters out visible passes and adds the visible aos, tca, los, and + * corresponding az and ele for each. + * + * @param array $passes The passes returned from get_passes() + * + * @author Bill Shupp + * @return array + */ + public function filterVisiblePasses(array $passes) + { + $filtered = array(); + + foreach ($passes as $result) { + // Dummy check + if ($result->vis[0] != 'V') { + continue; + } + + $aos = false; + $aos_az = false; + $aos = false; + $tca = false; + $los_az = false; + $aos_el = 0; + $max_el = 0; + + foreach ($result->details as $detail) { + if ($detail->vis != Predict::SAT_VIS_VISIBLE) { + continue; + } + if ($detail->el < $this->minEle) { + continue; + } + + if ($aos == false) { + $aos = $detail->time; + $aos_az = $detail->az; + $aos_el = $detail->el; + $tca = $detail->time; + $los = $detail->time; + $los_az = $detail->az; + $los_el = $detail->el; + $max_el = $detail->el; + $max_el_az = $detail->el; + continue; + } + $los = $detail->time; + $los_az = $detail->az; + $los_el = $detail->el; + + if ($detail->el > $max_el) { + $tca = $detail->time; + $max_el = $detail->el; + $max_el_az = $detail->az; + } + } + + if ($aos === false) { + // Does not reach minimum elevation, skip + continue; + } + + $result->visible_aos = $aos; + $result->visible_aos_az = $aos_az; + $result->visible_aos_el = $aos_el; + $result->visible_tca = $tca; + $result->visible_max_el = $max_el; + $result->visible_max_el_az = $max_el_az; + $result->visible_los = $los; + $result->visible_los_az = $los_az; + $result->visible_los_el = $los_el; + + $filtered[] = $result; + } + + return $filtered; + } + + /** + * Translates aziumuth degrees to compass direction: + * + * N (0°), NNE (22.5°), NE (45°), ENE (67.5°), E (90°), ESE (112.5°), + * SE (135°), SSE (157.5°), S (180°), SSW (202.5°), SW (225°), + * WSW (247.5°), W (270°), WNW (292.5°), NW (315°), NNW (337.5°) + * + * @param int $az The azimuth in degrees, defaults to 0 + * + * @return string + */ + public function azDegreesToDirection($az = 0) + { + $i = floor($az / 22.5); + $m = (22.5 * (2 * $i + 1)) / 2; + $i = ($az >= $m) ? $i + 1 : $i; + + return trim(substr('N NNENE ENEE ESESE SSES SSWSW WSWW WNWNW NNWN ', $i * 3, 3)); + } +} diff --git a/predict/Predict/DeepArg.php b/predict/Predict/DeepArg.php new file mode 100644 index 000000000..f29178fca --- /dev/null +++ b/predict/Predict/DeepArg.php @@ -0,0 +1,35 @@ + 0 ) { + return 1; + } else if ($arg < 0 ) { + return -1; + } else { + return 0; + } + } + + /* Returns the arcsine of the argument */ + public static function ArcSin($arg) + { + if (abs($arg) >= 1 ) { + return (self::Sign($arg) * Predict::pio2); + } else { + return(atan($arg / sqrt(1 - $arg * $arg))); + } + } + + /* Returns arccosine of rgument */ + public static function ArcCos($arg) + { + return Predict::pio2 - self::ArcSin($arg); + } + + /* Adds vectors v1 and v2 together to produce v3 */ + public static function Vec_Add(Predict_Vector $v1, Predict_Vector $v2, Predict_Vector $v3) + { + $v3->x = $v1->x + $v2->x; + $v3->y = $v1->y + $v2->y; + $v3->z = $v1->z + $v2->z; + + $v3->w = sqrt($v3->x * $v3->x + $v3->y * $v3->y + $v3->z * $v3->z); + } + + /* Subtracts vector v2 from v1 to produce v3 */ + public static function Vec_Sub(Predict_Vector $v1, Predict_Vector $v2, Predict_Vector $v3) + { + $v3->x = $v1->x - $v2->x; + $v3->y = $v1->y - $v2->y; + $v3->z = $v1->z - $v2->z; + + $v3->w = sqrt($v3->x * $v3->x + $v3->y * $v3->y + $v3->z * $v3->z); + } + + /* Multiplies the vector v1 by the scalar k to produce the vector v2 */ + public static function Scalar_Multiply($k, Predict_Vector $v1, Predict_Vector $v2) + { + $v2->x = $k * $v1->x; + $v2->y = $k * $v1->y; + $v2->z = $k * $v1->z; + $v2->w = abs($k) * $v1->w; + } + + /* Multiplies the vector v1 by the scalar k */ + public static function Scale_Vector($k, Predict_Vector $v) + { + $v->x *= $k; + $v->y *= $k; + $v->z *= $k; + + $v->w = sqrt($v->x * $v->x + $v->y * $v->y + $v->z * $v->z); + } + + /* Returns the dot product of two vectors */ + public static function Dot(Predict_Vector $v1, Predict_Vector $v2) + { + return ($v1->x * $v2->x + $v1->y * $v2->y + $v1->z * $v2->z); + } + + /* Calculates the angle between vectors v1 and v2 */ + public static function Angle(Predict_Vector $v1, Predict_Vector $v2) + { + $v1->w = sqrt($v1->x * $v1->x + $v1->y * $v1->y + $v1->z * $v1->z); + $v2->w = sqrt($v2->x * $v2->x + $v2->y * $v2->y + $v2->z * $v2->z); + return (self::ArcCos(self::Dot($v1, $v2) / ($v1->w * $v2->w))); + } + + /* Produces cross product of v1 and v2, and returns in v3 */ + public static function Cross(Predict_Vector $v1, Predict_Vector $v2 ,Predict_Vector $v3) + { + $v3->x = $v1->y * $v2->z - $v1->z * $v2->y; + $v3->y = $v1->z * $v2->x - $v1->x * $v2->z; + $v3->z = $v1->x * $v2->y - $v1->y * $v2->x; + + $v3->w = sqrt($v3->x * $v3->x + $v3->y * $v3->y + $v3->z * $v3->z); + } + + /* Normalizes a vector */ + public static function Normalize(Predict_Vector $v ) + { + $v->x /= $v->w; + $v->y /= $v->w; + $v->z /= $v->w; + } + + /* Four-quadrant arctan function */ + public static function AcTan($sinx, $cosx) + { + if ($cosx == 0) { + if ($sinx > 0) { + return Predict::pio2; + } else { + return Predict::x3pio2; + } + } else { + if ($cosx > 0) { + if ($sinx > 0) { + return atan($sinx / $cosx); + } else { + return Predict::twopi + atan($sinx / $cosx); + } + } else { + return Predict::pi + atan($sinx / $cosx); + } + } + } + + /* Returns mod 2pi of argument */ + public static function FMod2p($x) + { + $ret_val = $x; + $i = (int) ($ret_val / Predict::twopi); + $ret_val -= $i * Predict::twopi; + + if ($ret_val < 0) { + $ret_val += Predict::twopi; + } + + return $ret_val; + } + + /* Returns arg1 mod arg2 */ + public static function Modulus($arg1, $arg2) + { + $ret_val = $arg1; + $i = (int) ($ret_val / $arg2); + $ret_val -= $i * $arg2; + + if ($ret_val < 0) { + $ret_val += $arg2; + } + + return $ret_val; + } + + /* Returns fractional part of double argument */ + public static function Frac($arg) + { + return $arg - floor($arg); + } + + /* Converts the satellite's position and velocity */ + /* vectors from normalised values to km and km/sec */ + public static function Convert_Sat_State(Predict_Vector $pos, Predict_Vector $vel) + { + self::Scale_Vector(Predict::xkmper, $pos); + self::Scale_Vector(Predict::xkmper * Predict::xmnpda / Predict::secday, $vel); + } + + /* Returns angle in radians from arg in degrees */ + public static function Radians($arg) + { + return $arg * Predict::de2ra; + } + + /* Returns angle in degrees from arg in rads */ + public static function Degrees($arg) + { + return $arg / Predict::de2ra; + } +} diff --git a/predict/Predict/ObsSet.php b/predict/Predict/ObsSet.php new file mode 100644 index 000000000..9470b93d4 --- /dev/null +++ b/predict/Predict/ObsSet.php @@ -0,0 +1,12 @@ +pos = new Predict_Vector(); + $this->vel = new Predict_Vector(); + } +} diff --git a/predict/Predict/QTH.php b/predict/Predict/QTH.php new file mode 100644 index 000000000..5ccd5d365 --- /dev/null +++ b/predict/Predict/QTH.php @@ -0,0 +1,20 @@ +lat); /* Only run sin($geodetic->lat) once */ + + $geodetic->theta = Predict_Math::FMod2p(Predict_Time::ThetaG_JD($_time) + $geodetic->lon);/*LMST*/ + $c = 1 / sqrt(1 + Predict::__f * (Predict::__f - 2) * $sinGeodeticLat * $sinGeodeticLat); + $sq = (1 - Predict::__f) * (1 - Predict::__f) * $c; + $achcp = (Predict::xkmper * $c + $geodetic->alt) * cos($geodetic->lat); + $obs_pos->x = $achcp * cos($geodetic->theta); /*kilometers*/ + $obs_pos->y = $achcp * sin($geodetic->theta); + $obs_pos->z = (Predict::xkmper * $sq + $geodetic->alt) * $sinGeodeticLat; + $obs_vel->x = -Predict::mfactor * $obs_pos->y; /*kilometers/second*/ + $obs_vel->y = Predict::mfactor * $obs_pos->x; + $obs_vel->z = 0; + $obs_pos->w = sqrt($obs_pos->x * $obs_pos->x + $obs_pos->y * $obs_pos->y + $obs_pos->z * $obs_pos->z); + $obs_vel->w = sqrt($obs_vel->x * $obs_vel->x + $obs_vel->y * $obs_vel->y + $obs_vel->z * $obs_vel->z); + } + + /* Procedure Calculate_LatLonAlt will calculate the geodetic */ + /* position of an object given its ECI position pos and time. */ + /* It is intended to be used to determine the ground track of */ + /* a satellite. The calculations assume the earth to be an */ + /* oblate spheroid as defined in WGS '72. */ + public static function Calculate_LatLonAlt($_time, Predict_Vector $pos, Predict_Geodetic $geodetic) + { + /* Reference: The 1992 Astronomical Almanac, page K12. */ + + /* double r,e2,phi,c; */ + + $geodetic->theta = Predict_Math::AcTan($pos->y, $pos->x); /*radians*/ + $geodetic->lon = Predict_Math::FMod2p($geodetic->theta - Predict_Time::ThetaG_JD($_time)); /*radians*/ + $r = sqrt(($pos->x * $pos->x) + ($pos->y * $pos->y)); + $e2 = Predict::__f * (2 - Predict::__f); + $geodetic->lat = Predict_Math::AcTan($pos->z, $r); /*radians*/ + + do { + $phi = $geodetic->lat; + $sinPhi = sin($phi); + $c = 1 / sqrt(1 - $e2 * ($sinPhi * $sinPhi)); + $geodetic->lat = Predict_Math::AcTan($pos->z + Predict::xkmper * $c * $e2 * $sinPhi, $r); + } while (abs($geodetic->lat - $phi) >= 1E-10); + + $geodetic->alt = $r / cos($geodetic->lat) - Predict::xkmper * $c;/*kilometers*/ + + if ($geodetic->lat > Predict::pio2) { + $geodetic->lat -= Predict::twopi; + } + } + + /* The procedures Calculate_Obs and Calculate_RADec calculate */ + /* the *topocentric* coordinates of the object with ECI position, */ + /* {pos}, and velocity, {vel}, from location {geodetic} at {time}. */ + /* The {obs_set} returned for Calculate_Obs consists of azimuth, */ + /* elevation, range, and range rate (in that order) with units of */ + /* radians, radians, kilometers, and kilometers/second, respectively. */ + /* The WGS '72 geoid is used and the effect of atmospheric refraction */ + /* (under standard temperature and pressure) is incorporated into the */ + /* elevation calculation; the effect of atmospheric refraction on */ + /* range and range rate has not yet been quantified. */ + + /* The {obs_set} for Calculate_RADec consists of right ascension and */ + /* declination (in that order) in radians. Again, calculations are */ + /* based on *topocentric* position using the WGS '72 geoid and */ + /* incorporating atmospheric refraction. */ + public static function Calculate_Obs($_time, Predict_Vector $pos, Predict_Vector $vel, Predict_Geodetic $geodetic, Predict_ObsSet $obs_set) + { + $obs_pos = new Predict_Vector(); + $obs_vel = new Predict_Vector(); + $range = new Predict_Vector(); + $rgvel = new Predict_Vector(); + + self::Calculate_User_PosVel($_time, $geodetic, $obs_pos, $obs_vel); + + $range->x = $pos->x - $obs_pos->x; + $range->y = $pos->y - $obs_pos->y; + $range->z = $pos->z - $obs_pos->z; + + $rgvel->x = $vel->x - $obs_vel->x; + $rgvel->y = $vel->y - $obs_vel->y; + $rgvel->z = $vel->z - $obs_vel->z; + + $range->w = sqrt($range->x * $range->x + $range->y * $range->y + $range->z * $range->z); + + $sin_lat = sin($geodetic->lat); + $cos_lat = cos($geodetic->lat); + $sin_theta = sin($geodetic->theta); + $cos_theta = cos($geodetic->theta); + $top_s = $sin_lat * $cos_theta * $range->x + + $sin_lat * $sin_theta * $range->y + - $cos_lat * $range->z; + $top_e = -$sin_theta * $range->x + + $cos_theta * $range->y; + $top_z = $cos_lat * $cos_theta * $range->x + + $cos_lat * $sin_theta * $range->y + + $sin_lat * $range->z; + $azim = atan(-$top_e / $top_s); /*Azimuth*/ + if ($top_s > 0) { + $azim = $azim + Predict::pi; + } + if ($azim < 0 ) { + $azim = $azim + Predict::twopi; + } + $el = Predict_Math::ArcSin($top_z / $range->w); + $obs_set->az = $azim; /* Azimuth (radians) */ + $obs_set->el = $el; /* Elevation (radians)*/ + $obs_set->range = $range->w; /* Range (kilometers) */ + + /* Range Rate (kilometers/second)*/ + $obs_set->range_rate = Predict_Math::Dot($range, $rgvel) / $range->w; + + /* Corrections for atmospheric refraction */ + /* Reference: Astronomical Algorithms by Jean Meeus, pp. 101-104 */ + /* Correction is meaningless when apparent elevation is below horizon */ + // obs_set->el = obs_set->el + Radians((1.02/tan(Radians(Degrees(el)+ + // 10.3/(Degrees(el)+5.11))))/60); + if ($obs_set->el < 0) { + $obs_set->el = $el; /*Reset to true elevation*/ + } + } +} diff --git a/predict/Predict/SGPSDP.php b/predict/Predict/SGPSDP.php new file mode 100644 index 000000000..41a7de548 --- /dev/null +++ b/predict/Predict/SGPSDP.php @@ -0,0 +1,1061 @@ +flags & self::SGP4_INITIALIZED_FLAG) { + $sat->flags |= self::SGP4_INITIALIZED_FLAG; + + /* Recover original mean motion (xnodp) and */ + /* semimajor axis (aodp) from input elements. */ + $a1 = pow(Predict::xke / $sat->tle->xno, Predict::tothrd); + $sat->sgps->cosio = cos($sat->tle->xincl); + $theta2 = $sat->sgps->cosio * $sat->sgps->cosio; + $sat->sgps->x3thm1 = 3 * $theta2 - 1.0; + $eosq = $sat->tle->eo * $sat->tle->eo; + $betao2 = 1 - $eosq; + $betao = sqrt($betao2); + $del1 = 1.5 * Predict::ck2 * $sat->sgps->x3thm1 / ($a1 * $a1 * $betao * $betao2); + $ao = $a1 * (1 - $del1 * (0.5 * Predict::tothrd + $del1 * (1 + 134.0 / 81.0 * $del1))); + $delo = 1.5 * Predict::ck2 * $sat->sgps->x3thm1 / ($ao * $ao * $betao * $betao2); + $sat->sgps->xnodp = $sat->tle->xno / (1.0 + $delo); + $sat->sgps->aodp = $ao / (1.0 - $delo); + + /* For perigee less than 220 kilometers, the "simple" flag is set */ + /* and the equations are truncated to linear variation in sqrt a */ + /* and quadratic variation in mean anomaly. Also, the c3 term, */ + /* the delta omega term, and the delta m term are dropped. */ + if (($sat->sgps->aodp * (1.0 - $sat->tle->eo) / Predict::ae) < (220.0 / Predict::xkmper + Predict::ae)) { + $sat->flags |= self::SIMPLE_FLAG; + } else { + $sat->flags &= ~self::SIMPLE_FLAG; + } + + /* For perigee below 156 km, the */ + /* values of s and qoms2t are altered. */ + $s4 = Predict::__s__; + $qoms24 = Predict::qoms2t; + $perige = ($sat->sgps->aodp * (1 - $sat->tle->eo) - Predict::ae) * Predict::xkmper; + if ($perige < 156.0) { + if ($perige <= 98.0) { + $s4 = 20.0; + } else { + $s4 = $perige - 78.0; + } + $qoms24 = pow((120.0 - $s4) * Predict::ae / Predict::xkmper, 4); + $s4 = $s4 / Predict::xkmper + Predict::ae; + }; /* FIXME FIXME: End of if(perige <= 98) NO WAY!!!! */ + + $pinvsq = 1.0 / ($sat->sgps->aodp * $sat->sgps->aodp * $betao2 * $betao2); + $tsi = 1.0 / ($sat->sgps->aodp - $s4); + $sat->sgps->eta = $sat->sgps->aodp * $sat->tle->eo * $tsi; + $etasq = $sat->sgps->eta * $sat->sgps->eta; + $eeta = $sat->tle->eo * $sat->sgps->eta; + $psisq = abs(1.0 - $etasq); + $coef = $qoms24 * pow($tsi, 4); + $coef1 = $coef / pow($psisq, 3.5); + $c2 = $coef1 * $sat->sgps->xnodp * ($sat->sgps->aodp * + (1.0 + 1.5 * $etasq + $eeta * (4.0 + $etasq)) + + 0.75 * Predict::ck2 * $tsi / $psisq * $sat->sgps->x3thm1 * + (8.0 + 3.0 * $etasq * (8 + $etasq))); + $sat->sgps->c1 = $c2 * $sat->tle->bstar; + $sat->sgps->sinio = sin($sat->tle->xincl); + $a3ovk2 = -Predict::xj3 / Predict::ck2 * pow(Predict::ae, 3); + $c3 = $coef * $tsi * $a3ovk2 * $sat->sgps->xnodp * Predict::ae * $sat->sgps->sinio / $sat->tle->eo; + $sat->sgps->x1mth2 = 1.0 - $theta2; + $sat->sgps->c4 = 2.0 * $sat->sgps->xnodp * $coef1 * $sat->sgps->aodp * $betao2 * + ($sat->sgps->eta * (2.0 + 0.5 * $etasq) + + $sat->tle->eo * (0.5 + 2.0 * $etasq) - + 2.0 * Predict::ck2 * $tsi / ($sat->sgps->aodp * $psisq) * + (-3.0 * $sat->sgps->x3thm1 * (1.0 - 2.0 * $eeta + $etasq * (1.5 - 0.5 * $eeta)) + + 0.75 * $sat->sgps->x1mth2 * (2.0 * $etasq - $eeta * (1.0 + $etasq)) * + cos(2.0 * $sat->tle->omegao))); + $sat->sgps->c5 = 2.0 * $coef1 * $sat->sgps->aodp * $betao2 * + (1.0 + 2.75 * ($etasq + $eeta) + $eeta * $etasq); + $theta4 = $theta2 * $theta2; + $temp1 = 3.0 * Predict::ck2 * $pinvsq * $sat->sgps->xnodp; + $temp2 = $temp1 * Predict::ck2 * $pinvsq; + $temp3 = 1.25 * Predict::ck4 * $pinvsq * $pinvsq * $sat->sgps->xnodp; + $sat->sgps->xmdot = $sat->sgps->xnodp + 0.5 * $temp1 * $betao * $sat->sgps->x3thm1 + + 0.0625 * $temp2 * $betao * (13.0 - 78.0 * $theta2 + 137.0 * $theta4); + $x1m5th = 1.0 - 5.0 * $theta2; + $sat->sgps->omgdot = -0.5 * $temp1 * $x1m5th + + 0.0625 * $temp2 * (7.0 - 114.0 * $theta2 + 395.0 * $theta4) + + $temp3 * (3.0 - 36.0 * $theta2 + 49.0 * $theta4); + $xhdot1 = -$temp1 * $sat->sgps->cosio; + $sat->sgps->xnodot = $xhdot1 + (0.5 * $temp2 * (4.0 - 19.0 * $theta2) + + 2.0 * $temp3 * (3.0 - 7.0 * $theta2)) * $sat->sgps->cosio; + $sat->sgps->omgcof = $sat->tle->bstar * $c3 * cos($sat->tle->omegao); + $sat->sgps->xmcof = -Predict::tothrd * $coef * $sat->tle->bstar * Predict::ae / $eeta; + $sat->sgps->xnodcf = 3.5 * $betao2 * $xhdot1 * $sat->sgps->c1; + $sat->sgps->t2cof = 1.5 * $sat->sgps->c1; + $sat->sgps->xlcof = 0.125 * $a3ovk2 * $sat->sgps->sinio * + (3.0 + 5.0 * $sat->sgps->cosio) / (1.0 + $sat->sgps->cosio); + $sat->sgps->aycof = 0.25 * $a3ovk2 * $sat->sgps->sinio; + $sat->sgps->delmo = pow(1.0 + $sat->sgps->eta * cos($sat->tle->xmo), 3); + $sat->sgps->sinmo = sin($sat->tle->xmo); + $sat->sgps->x7thm1 = 7.0 * $theta2 - 1.0; + if (~$sat->flags & self::SIMPLE_FLAG) { + $c1sq = $sat->sgps->c1 * $sat->sgps->c1; + $sat->sgps->d2 = 4.0 * $sat->sgps->aodp * $tsi * $c1sq; + $temp = $sat->sgps->d2 * $tsi * $sat->sgps->c1 / 3.0; + $sat->sgps->d3 = (17.0 * $sat->sgps->aodp + $s4) * $temp; + $sat->sgps->d4 = 0.5 * $temp * $sat->sgps->aodp * $tsi * + (221.0 * $sat->sgps->aodp + 31.0 * $s4) * $sat->sgps->c1; + $sat->sgps->t3cof = $sat->sgps->d2 + 2.0 * $c1sq; + $sat->sgps->t4cof = 0.25 * (3.0 * $sat->sgps->d3 + $sat->sgps->c1 * + (12.0 * $sat->sgps->d2 + 10.0 * $c1sq)); + $sat->sgps->t5cof = 0.2 * (3.0 * $sat->sgps->d4 + + 12.0 * $sat->sgps->c1 * $sat->sgps->d3 + + 6.0 * $sat->sgps->d2 * $sat->sgps->d2 + + 15.0 * $c1sq * (2.0 * $sat->sgps->d2 + $c1sq)); + }; /* End of if (isFlagClear(SIMPLE_FLAG)) */ + }; /* End of SGP4() initialization */ + + /* Update for secular gravity and atmospheric drag. */ + $xmdf = $sat->tle->xmo + $sat->sgps->xmdot * $tsince; + $omgadf = $sat->tle->omegao + $sat->sgps->omgdot * $tsince; + $xnoddf = $sat->tle->xnodeo + $sat->sgps->xnodot * $tsince; + $omega = $omgadf; + $xmp = $xmdf; + $tsq = $tsince * $tsince; + $xnode = $xnoddf + $sat->sgps->xnodcf * $tsq; + $tempa = 1.0 - $sat->sgps->c1 * $tsince; + $tempe = $sat->tle->bstar * $sat->sgps->c4 * $tsince; + $templ = $sat->sgps->t2cof * $tsq; + if (~$sat->flags & self::SIMPLE_FLAG) { + $delomg = $sat->sgps->omgcof * $tsince; + $delm = $sat->sgps->xmcof * (pow(1 + $sat->sgps->eta * cos($xmdf), 3) - $sat->sgps->delmo); + $temp = $delomg + $delm; + $xmp = $xmdf + $temp; + $omega = $omgadf - $temp; + $tcube = $tsq * $tsince; + $tfour = $tsince * $tcube; + $tempa = $tempa - $sat->sgps->d2 * $tsq - $sat->sgps->d3 * $tcube - $sat->sgps->d4 * $tfour; + $tempe = $tempe + $sat->tle->bstar * $sat->sgps->c5 * (sin($xmp) - $sat->sgps->sinmo); + $templ = $templ + $sat->sgps->t3cof * $tcube + $tfour * + ($sat->sgps->t4cof + $tsince * $sat->sgps->t5cof); + }; /* End of if (isFlagClear(SIMPLE_FLAG)) */ + + $a = $sat->sgps->aodp * pow($tempa, 2); + $e = $sat->tle->eo - $tempe; + $xl = $xmp + $omega + $xnode + $sat->sgps->xnodp * $templ; + $beta = sqrt(1.0 - ($e * $e)); + $xn = Predict::xke / pow($a, 1.5); + + /* Long period periodics */ + $axn = $e * cos($omega); + $temp = 1.0 / ($a * $beta * $beta); + $xll = $temp * $sat->sgps->xlcof * $axn; + $aynl = $temp * $sat->sgps->aycof; + $xlt = $xl + $xll; + $ayn = $e * sin($omega) + $aynl; + + /* Solve Kepler's' Equation */ + $capu = Predict_Math::FMod2p($xlt - $xnode); + $temp2 = $capu; + + $i = 0; + do { + $sinepw = sin($temp2); + $cosepw = cos($temp2); + $temp3 = $axn * $sinepw; + $temp4 = $ayn * $cosepw; + $temp5 = $axn * $cosepw; + $temp6 = $ayn * $sinepw; + $epw = ($capu - $temp4 + $temp3 - $temp2) / (1.0 - $temp5 - $temp6) + $temp2; + if (abs($epw - $temp2) <= Predict::e6a) { + break; + } + $temp2 = $epw; + } while ($i++ < 10); + + /* Short period preliminary quantities */ + $ecose = $temp5 + $temp6; + $esine = $temp3 - $temp4; + $elsq = $axn * $axn + $ayn * $ayn; + $temp = 1.0 - $elsq; + $pl = $a * $temp; + $r = $a * (1.0 - $ecose); + $temp1 = 1.0 / $r; + $rdot = Predict::xke * sqrt($a) * $esine * $temp1; + $rfdot = Predict::xke * sqrt($pl) * $temp1; + $temp2 = $a * $temp1; + $betal = sqrt($temp); + $temp3 = 1.0 / (1.0 + $betal); + $cosu = $temp2 * ($cosepw - $axn + $ayn * $esine * $temp3); + $sinu = $temp2 * ($sinepw - $ayn - $axn * $esine * $temp3); + $u = Predict_Math::AcTan($sinu, $cosu); + $sin2u = 2.0 * $sinu * $cosu; + $cos2u = 2.0 * $cosu * $cosu - 1.0; + $temp = 1.0 / $pl; + $temp1 = Predict::ck2 * $temp; + $temp2 = $temp1 * $temp; + + /* Update for short periodics */ + $rk = $r * (1.0 - 1.5 * $temp2 * $betal * $sat->sgps->x3thm1) + + 0.5 * $temp1 * $sat->sgps->x1mth2 * $cos2u; + $uk = $u - 0.25 * $temp2 * $sat->sgps->x7thm1 * $sin2u; + $xnodek = $xnode + 1.5 * $temp2 * $sat->sgps->cosio * $sin2u; + $xinck = $sat->tle->xincl + 1.5 * $temp2 * $sat->sgps->cosio * $sat->sgps->sinio * $cos2u; + $rdotk = $rdot - $xn * $temp1 * $sat->sgps->x1mth2 * $sin2u; + $rfdotk = $rfdot + $xn * $temp1 * ($sat->sgps->x1mth2 * $cos2u + 1.5 * $sat->sgps->x3thm1); + + + /* Orientation vectors */ + $sinuk = sin($uk); + $cosuk = cos($uk); + $sinik = sin($xinck); + $cosik = cos($xinck); + $sinnok = sin($xnodek); + $cosnok = cos($xnodek); + $xmx = -$sinnok * $cosik; + $xmy = $cosnok * $cosik; + $ux = $xmx * $sinuk + $cosnok * $cosuk; + $uy = $xmy * $sinuk + $sinnok * $cosuk; + $uz = $sinik * $sinuk; + $vx = $xmx * $cosuk - $cosnok * $sinuk; + $vy = $xmy * $cosuk - $sinnok * $sinuk; + $vz = $sinik * $cosuk; + + /* Position and velocity */ + $sat->pos->x = $rk * $ux; + $sat->pos->y = $rk * $uy; + $sat->pos->z = $rk * $uz; + $sat->vel->x = $rdotk * $ux + $rfdotk * $vx; + $sat->vel->y = $rdotk * $uy + $rfdotk * $vy; + $sat->vel->z = $rdotk * $uz + $rfdotk * $vz; + + $sat->phase = $xlt - $xnode - $omgadf + Predict::twopi; + if ($sat->phase < 0) { + $sat->phase += Predict::twopi; + } + $sat->phase = Predict_Math::FMod2p($sat->phase); + + $sat->tle->omegao1 = $omega; + $sat->tle->xincl1 = $xinck; + $sat->tle->xnodeo1 = $xnodek; + + } /*SGP4*/ + + /* SDP4 */ + /* This function is used to calculate the position and velocity */ + /* of deep-space (period > 225 minutes) satellites. tsince is */ + /* time since epoch in minutes, tle is a pointer to a tle_t */ + /* structure with Keplerian orbital elements and pos and vel */ + /* are vector_t structures returning ECI satellite position and */ + /* velocity. Use Convert_Sat_State() to convert to km and km/s. */ + public function SDP4(Predict_Sat $sat, $tsince) + { + /* Initialization */ + if (~$sat->flags & self::SDP4_INITIALIZED_FLAG) { + + $sat->flags |= self::SDP4_INITIALIZED_FLAG; + + /* Recover original mean motion (xnodp) and */ + /* semimajor axis (aodp) from input elements. */ + $a1 = pow(Predict::xke / $sat->tle->xno, Predict::tothrd); + $sat->deep_arg->cosio = cos($sat->tle->xincl); + $sat->deep_arg->theta2 = $sat->deep_arg->cosio * $sat->deep_arg->cosio; + $sat->sgps->x3thm1 = 3.0 * $sat->deep_arg->theta2 - 1.0; + $sat->deep_arg->eosq = $sat->tle->eo * $sat->tle->eo; + $sat->deep_arg->betao2 = 1.0 - $sat->deep_arg->eosq; + $sat->deep_arg->betao = sqrt($sat->deep_arg->betao2); + $del1 = 1.5 * Predict::ck2 * $sat->sgps->x3thm1 / + ($a1 * $a1 * $sat->deep_arg->betao * $sat->deep_arg->betao2); + $ao = $a1 * (1.0 - $del1 * (0.5 * Predict::tothrd + $del1 * (1.0 + 134.0 / 81.0 * $del1))); + $delo = 1.5 * Predict::ck2 * $sat->sgps->x3thm1 / + ($ao * $ao * $sat->deep_arg->betao * $sat->deep_arg->betao2); + $sat->deep_arg->xnodp = $sat->tle->xno / (1.0 + $delo); + $sat->deep_arg->aodp = $ao / (1.0 - $delo); + + /* For perigee below 156 km, the values */ + /* of s and qoms2t are altered. */ + $s4 = Predict::__s__; + $qoms24 = Predict::qoms2t; + $perige = ($sat->deep_arg->aodp * (1.0 - $sat->tle->eo) - Predict::ae) * Predict::xkmper; + if ($perige < 156.0) { + if ($perige <= 98.0) { + $s4 = 20.0; + } else { + $s4 = $perige - 78.0; + } + $qoms24 = pow((120.0 - $s4) * Predict::ae / Predict::xkmper, 4); + $s4 = $s4 / Predict::xkmper + Predict::ae; + } + $pinvsq = 1.0 / ($sat->deep_arg->aodp * $sat->deep_arg->aodp * + $sat->deep_arg->betao2 * $sat->deep_arg->betao2); + $sat->deep_arg->sing = sin($sat->tle->omegao); + $sat->deep_arg->cosg = cos($sat->tle->omegao); + $tsi = 1.0 / ($sat->deep_arg->aodp - $s4); + $eta = $sat->deep_arg->aodp * $sat->tle->eo * $tsi; + $etasq = $eta * $eta; + $eeta = $sat->tle->eo * $eta; + $psisq = abs(1.0 - $etasq); + $coef = $qoms24 * pow($tsi, 4); + $coef1 = $coef / pow($psisq, 3.5); + $c2 = $coef1 * $sat->deep_arg->xnodp * ($sat->deep_arg->aodp * + (1.0 + 1.5 * $etasq + $eeta * + (4.0 + $etasq)) + 0.75 * Predict::ck2 * $tsi / $psisq * + $sat->sgps->x3thm1 * (8.0 + 3.0 * $etasq * + (8.0 + $etasq))); + $sat->sgps->c1 = $sat->tle->bstar * $c2; + $sat->deep_arg->sinio = sin($sat->tle->xincl); + $a3ovk2 = -Predict::xj3 / Predict::ck2 * pow(Predict::ae, 3); + $sat->sgps->x1mth2 = 1.0 - $sat->deep_arg->theta2; + $sat->sgps->c4 = 2.0 * $sat->deep_arg->xnodp * $coef1 * + $sat->deep_arg->aodp * $sat->deep_arg->betao2 * + ($eta * (2.0 + 0.5 * $etasq) + $sat->tle->eo * + (0.5 + 2.0 * $etasq) - 2.0 * Predict::ck2 * $tsi / + ($sat->deep_arg->aodp * $psisq) * (-3.0 * $sat->sgps->x3thm1 * + (1.0 - 2.0 * $eeta + $etasq * + (1.5 - 0.5 * $eeta)) + + 0.75 * $sat->sgps->x1mth2 * + (2.0 * $etasq - $eeta * (1.0 + $etasq)) * + cos(2.0 * $sat->tle->omegao))); + $theta4 = $sat->deep_arg->theta2 * $sat->deep_arg->theta2; + $temp1 = 3.0 * Predict::ck2 * $pinvsq * $sat->deep_arg->xnodp; + $temp2 = $temp1 * Predict::ck2 * $pinvsq; + $temp3 = 1.25 * Predict::ck4 * $pinvsq * $pinvsq * $sat->deep_arg->xnodp; + $sat->deep_arg->xmdot = $sat->deep_arg->xnodp + 0.5 * $temp1 * $sat->deep_arg->betao * + $sat->sgps->x3thm1 + 0.0625 * $temp2 * $sat->deep_arg->betao * + (13.0 - 78.0 * $sat->deep_arg->theta2 + 137.0 * $theta4); + $x1m5th = 1.0 - 5.0 * $sat->deep_arg->theta2; + $sat->deep_arg->omgdot = -0.5 * $temp1 * $x1m5th + 0.0625 * $temp2 * + (7.0 - 114.0 * $sat->deep_arg->theta2 + 395.0 * $theta4) + + $temp3 * (3.0 - 36.0 * $sat->deep_arg->theta2 + 49.0 * $theta4); + $xhdot1 = -$temp1 * $sat->deep_arg->cosio; + $sat->deep_arg->xnodot = $xhdot1 + (0.5 * $temp2 * (4.0 - 19.0 * $sat->deep_arg->theta2) + + 2.0 * $temp3 * (3.0 - 7.0 * $sat->deep_arg->theta2)) * + $sat->deep_arg->cosio; + $sat->sgps->xnodcf = 3.5 * $sat->deep_arg->betao2 * $xhdot1 * $sat->sgps->c1; + $sat->sgps->t2cof = 1.5 * $sat->sgps->c1; + $sat->sgps->xlcof = 0.125 * $a3ovk2 * $sat->deep_arg->sinio * + (3.0 + 5.0 * $sat->deep_arg->cosio) / (1.0 + $sat->deep_arg->cosio); + $sat->sgps->aycof = 0.25 * $a3ovk2 * $sat->deep_arg->sinio; + $sat->sgps->x7thm1 = 7.0 * $sat->deep_arg->theta2 - 1.0; + + /* initialize Deep() */ + $this->Deep(self::dpinit, $sat); + }; /*End of SDP4() initialization */ + + /* Update for secular gravity and atmospheric drag */ + $xmdf = $sat->tle->xmo + $sat->deep_arg->xmdot * $tsince; + $sat->deep_arg->omgadf = $sat->tle->omegao + $sat->deep_arg->omgdot * $tsince; + $xnoddf = $sat->tle->xnodeo + $sat->deep_arg->xnodot * $tsince; + $tsq = $tsince * $tsince; + $sat->deep_arg->xnode = $xnoddf + $sat->sgps->xnodcf * $tsq; + $tempa = 1.0 - $sat->sgps->c1 * $tsince; + $tempe = $sat->tle->bstar * $sat->sgps->c4 * $tsince; + $templ = $sat->sgps->t2cof * $tsq; + $sat->deep_arg->xn = $sat->deep_arg->xnodp; + + /* Update for deep-space secular effects */ + $sat->deep_arg->xll = $xmdf; + $sat->deep_arg->t = $tsince; + + $this->Deep(self::dpsec, $sat); + + $xmdf = $sat->deep_arg->xll; + $a = pow(Predict::xke / $sat->deep_arg->xn, Predict::tothrd) * $tempa * $tempa; + $sat->deep_arg->em = $sat->deep_arg->em - $tempe; + $xmam = $xmdf + $sat->deep_arg->xnodp * $templ; + + /* Update for deep-space periodic effects */ + $sat->deep_arg->xll = $xmam; + + $this->Deep(self::dpper, $sat); + + $xmam = $sat->deep_arg->xll; + $xl = $xmam + $sat->deep_arg->omgadf + $sat->deep_arg->xnode; + $beta = sqrt(1.0 - $sat->deep_arg->em * $sat->deep_arg->em); + $sat->deep_arg->xn = Predict::xke / pow($a, 1.5); + + /* Long period periodics */ + $axn = $sat->deep_arg->em * cos($sat->deep_arg->omgadf); + $temp = 1.0 / ($a * $beta * $beta); + $xll = $temp * $sat->sgps->xlcof * $axn; + $aynl = $temp * $sat->sgps->aycof; + $xlt = $xl + $xll; + $ayn = $sat->deep_arg->em * sin($sat->deep_arg->omgadf) + $aynl; + + /* Solve Kepler's Equation */ + $capu = Predict_Math::FMod2p ($xlt - $sat->deep_arg->xnode); + $temp2 = $capu; + + $i = 0; + do { + $sinepw = sin($temp2); + $cosepw = cos($temp2); + $temp3 = $axn * $sinepw; + $temp4 = $ayn * $cosepw; + $temp5 = $axn * $cosepw; + $temp6 = $ayn * $sinepw; + $epw = ($capu - $temp4 + $temp3 - $temp2) / (1.0 - $temp5 - $temp6) + $temp2; + if (abs($epw - $temp2) <= Predict::e6a) { + break; + } + $temp2 = $epw; + } while ($i++ < 10); + + /* Short period preliminary quantities */ + $ecose = $temp5 + $temp6; + $esine = $temp3 - $temp4; + $elsq = $axn * $axn + $ayn * $ayn; + $temp = 1.0 - $elsq; + $pl = $a * $temp; + $r = $a * (1.0 - $ecose); + $temp1 = 1.0 / $r; + $rdot = Predict::xke * sqrt($a) * $esine * $temp1; + $rfdot = Predict::xke * sqrt($pl) * $temp1; + $temp2 = $a * $temp1; + $betal = sqrt($temp); + $temp3 = 1.0 / (1.0 + $betal); + $cosu = $temp2 * ($cosepw - $axn + $ayn * $esine * $temp3); + $sinu = $temp2 * ($sinepw - $ayn - $axn * $esine * $temp3); + $u = Predict_Math::AcTan($sinu, $cosu); + $sin2u = 2.0 * $sinu * $cosu; + $cos2u = 2.0 * $cosu * $cosu - 1.0; + $temp = 1.0 / $pl; + $temp1 = Predict::ck2 * $temp; + $temp2 = $temp1 * $temp; + + /* Update for short periodics */ + $rk = $r * (1.0 - 1.5 * $temp2 * $betal * $sat->sgps->x3thm1) + + 0.5 * $temp1 * $sat->sgps->x1mth2 * $cos2u; + $uk = $u - 0.25 * $temp2 * $sat->sgps->x7thm1 * $sin2u; + $xnodek = $sat->deep_arg->xnode + 1.5 * $temp2 * $sat->deep_arg->cosio * $sin2u; + $xinck = $sat->deep_arg->xinc + 1.5 * $temp2 * + $sat->deep_arg->cosio * $sat->deep_arg->sinio * $cos2u; + $rdotk = $rdot - $sat->deep_arg->xn * $temp1 * $sat->sgps->x1mth2 * $sin2u; + $rfdotk = $rfdot + $sat->deep_arg->xn * $temp1 * + ($sat->sgps->x1mth2 * $cos2u + 1.5 * $sat->sgps->x3thm1); + + /* Orientation vectors */ + $sinuk = sin($uk); + $cosuk = cos($uk); + $sinik = sin($xinck); + $cosik = cos($xinck); + $sinnok = sin($xnodek); + $cosnok = cos($xnodek); + $xmx = -$sinnok * $cosik; + $xmy = $cosnok * $cosik; + $ux = $xmx * $sinuk + $cosnok * $cosuk; + $uy = $xmy * $sinuk + $sinnok * $cosuk; + $uz = $sinik * $sinuk; + $vx = $xmx * $cosuk - $cosnok * $sinuk; + $vy = $xmy * $cosuk - $sinnok * $sinuk; + $vz = $sinik * $cosuk; + + /* Position and velocity */ + $sat->pos->x = $rk * $ux; + $sat->pos->y = $rk * $uy; + $sat->pos->z = $rk * $uz; + $sat->vel->x = $rdotk * $ux + $rfdotk * $vx; + $sat->vel->y = $rdotk * $uy + $rfdotk * $vy; + $sat->vel->z = $rdotk * $uz + $rfdotk * $vz; + + /* Phase in rads */ + $sat->phase = $xlt - $sat->deep_arg->xnode - $sat->deep_arg->omgadf + Predict::twopi; + if ($sat->phase < 0.0) { + $sat->phase += Predict::twopi; + } + $sat->phase = Predict_Math::FMod2p ($sat->phase); + + $sat->tle->omegao1 = $sat->deep_arg->omgadf; + $sat->tle->xincl1 = $sat->deep_arg->xinc; + $sat->tle->xnodeo1 = $sat->deep_arg->xnode; + } /* SDP4 */ + + + /* DEEP */ + /* This function is used by SDP4 to add lunar and solar */ + /* perturbation effects to deep-space orbit objects. */ + public function Deep($ientry, Predict_Sat $sat) + { + switch ($ientry) { + case self::dpinit : /* Entrance for deep space initialization */ + $sat->dps->thgr = Predict_Time::ThetaG($sat->tle->epoch, $sat->deep_arg); + $eq = $sat->tle->eo; + $sat->dps->xnq = $sat->deep_arg->xnodp; + $aqnv = 1.0 / $sat->deep_arg->aodp; + $sat->dps->xqncl = $sat->tle->xincl; + $xmao = $sat->tle->xmo; + $xpidot = $sat->deep_arg->omgdot + $sat->deep_arg->xnodot; + $sinq = sin($sat->tle->xnodeo); + $cosq = cos($sat->tle->xnodeo); + $sat->dps->omegaq = $sat->tle->omegao; + $sat->dps->preep = 0; + + /* Initialize lunar solar terms */ + $day = $sat->deep_arg->ds50 + 18261.5; /* Days since 1900 Jan 0.5 */ + if ($day != $sat->dps->preep) { + $sat->dps->preep = $day; + $xnodce = 4.5236020 - 9.2422029E-4 * $day; + $stem = sin($xnodce); + $ctem = cos($xnodce); + $sat->dps->zcosil = 0.91375164 - 0.03568096 * $ctem; + $sat->dps->zsinil = sqrt(1.0 - $sat->dps->zcosil * $sat->dps->zcosil); + $sat->dps->zsinhl = 0.089683511 * $stem / $sat->dps->zsinil; + $sat->dps->zcoshl = sqrt(1.0 - $sat->dps->zsinhl * $sat->dps->zsinhl); + $c = 4.7199672 + 0.22997150 * $day; + $gam = 5.8351514 + 0.0019443680 * $day; + $sat->dps->zmol = Predict_Math::FMod2p($c - $gam); + $zx = 0.39785416 * $stem / $sat->dps->zsinil; + $zy = $sat->dps->zcoshl * $ctem + 0.91744867 * $sat->dps->zsinhl * $stem; + $zx = Predict_Math::AcTan($zx, $zy); + $zx = $gam + $zx - $xnodce; + $sat->dps->zcosgl = cos($zx); + $sat->dps->zsingl = sin($zx); + $sat->dps->zmos = 6.2565837 + 0.017201977 * $day; + $sat->dps->zmos = Predict_Math::FMod2p($sat->dps->zmos); + } /* End if(day != preep) */ + + /* Do solar terms */ + $sat->dps->savtsn = 1E20; + $zcosg = Predict::zcosgs; + $zsing = Predict::zsings; + $zcosi = Predict::zcosis; + $zsini = Predict::zsinis; + $zcosh = $cosq; + $zsinh = $sinq; + $cc = Predict::c1ss; + $zn = Predict::zns; + $ze = Predict::zes; + $zmo = $sat->dps->zmos; + $xnoi = 1.0 / $sat->dps->xnq; + + /* Loop breaks when Solar terms are done a second */ + /* time, after Lunar terms are initialized */ + for(;;) { + /* Solar terms done again after Lunar terms are done */ + $a1 = $zcosg * $zcosh + $zsing * $zcosi * $zsinh; + $a3 = -$zsing * $zcosh + $zcosg * $zcosi * $zsinh; + $a7 = -$zcosg * $zsinh + $zsing * $zcosi * $zcosh; + $a8 = $zsing * $zsini; + $a9 = $zsing * $zsinh + $zcosg * $zcosi * $zcosh; + $a10 = $zcosg * $zsini; + $a2 = $sat->deep_arg->cosio * $a7 + $sat->deep_arg->sinio * $a8; + $a4 = $sat->deep_arg->cosio * $a9 + $sat->deep_arg->sinio * $a10; + $a5 = -$sat->deep_arg->sinio * $a7 + $sat->deep_arg->cosio * $a8; + $a6 = -$sat->deep_arg->sinio * $a9 + $sat->deep_arg->cosio * $a10; + $x1 = $a1 * $sat->deep_arg->cosg + $a2 * $sat->deep_arg->sing; + $x2 = $a3 * $sat->deep_arg->cosg + $a4 * $sat->deep_arg->sing; + $x3 = -$a1 * $sat->deep_arg->sing + $a2 * $sat->deep_arg->cosg; + $x4 = -$a3 * $sat->deep_arg->sing + $a4 * $sat->deep_arg->cosg; + $x5 = $a5 * $sat->deep_arg->sing; + $x6 = $a6 * $sat->deep_arg->sing; + $x7 = $a5 * $sat->deep_arg->cosg; + $x8 = $a6 * $sat->deep_arg->cosg; + $z31 = 12 * $x1 * $x1 - 3 * $x3 * $x3; + $z32 = 24 * $x1 * $x2 - 6 * $x3 * $x4; + $z33 = 12 * $x2 * $x2 - 3 * $x4 * $x4; + $z1 = 3 * ($a1 * $a1 + $a2 * $a2) + $z31 * $sat->deep_arg->eosq; + $z2 = 6 * ($a1 * $a3 + $a2 * $a4) + $z32 * $sat->deep_arg->eosq; + $z3 = 3 * ($a3 * $a3 + $a4 * $a4) + $z33 * $sat->deep_arg->eosq; + $z11 = -6 * $a1 * $a5 + $sat->deep_arg->eosq * (-24 * $x1 * $x7 - 6 * $x3 * $x5); + $z12 = -6 * ($a1 * $a6 + $a3 * $a5) + $sat->deep_arg->eosq * + (-24 * ($x2 * $x7 + $x1 * $x8) - 6 * ($x3 * $x6 + $x4 * $x5)); + $z13 = -6 * $a3 * $a6 + $sat->deep_arg->eosq * (-24 * $x2 * $x8 - 6 * $x4 * $x6); + $z21 = 6 * $a2 * $a5 + $sat->deep_arg->eosq * (24 * $x1 * $x5 - 6 * $x3 * $x7); + $z22 = 6 * ($a4 * $a5 + $a2 * $a6) + $sat->deep_arg->eosq * + (24 * ($x2 * $x5 + $x1 * $x6) - 6 * ($x4 * $x7 + $x3 * $x8)); + $z23 = 6 * $a4 * $a6 + $sat->deep_arg->eosq * (24 * $x2 * $x6 - 6 * $x4 * $x8); + $z1 = $z1 + $z1 + $sat->deep_arg->betao2 * $z31; + $z2 = $z2 + $z2 + $sat->deep_arg->betao2 * $z32; + $z3 = $z3 + $z3 + $sat->deep_arg->betao2 * $z33; + $s3 = $cc * $xnoi; + $s2 = -0.5 * $s3 / $sat->deep_arg->betao; + $s4 = $s3 * $sat->deep_arg->betao; + $s1 = -15 * $eq * $s4; + $s5 = $x1 * $x3 + $x2 * $x4; + $s6 = $x2 * $x3 + $x1 * $x4; + $s7 = $x2 * $x4 - $x1 * $x3; + $se = $s1 * $zn * $s5; + $si = $s2 * $zn * ($z11 + $z13); + $sl = -$zn * $s3 * ($z1 + $z3 - 14 - 6 * $sat->deep_arg->eosq); + $sgh = $s4 * $zn * ($z31 + $z33 - 6); + $sh = -$zn * $s2 * ($z21 + $z23); + if ($sat->dps->xqncl < 5.2359877E-2) { + $sh = 0; + } + $sat->dps->ee2 = 2 * $s1 * $s6; + $sat->dps->e3 = 2 * $s1 * $s7; + $sat->dps->xi2 = 2 * $s2 * $z12; + $sat->dps->xi3 = 2 * $s2 * ($z13 - $z11); + $sat->dps->xl2 = -2 * $s3 * $z2; + $sat->dps->xl3 = -2 * $s3 * ($z3 - $z1); + $sat->dps->xl4 = -2 * $s3 * (-21 - 9 * $sat->deep_arg->eosq) * $ze; + $sat->dps->xgh2 = 2 * $s4 * $z32; + $sat->dps->xgh3 = 2 * $s4 * ($z33 - $z31); + $sat->dps->xgh4 = -18 * $s4 * $ze; + $sat->dps->xh2 = -2 * $s2 * $z22; + $sat->dps->xh3 = -2 * $s2 * ($z23 - $z21); + + if ($sat->flags & self::LUNAR_TERMS_DONE_FLAG) { + break; + } + + /* Do lunar terms */ + $sat->dps->sse = $se; + $sat->dps->ssi = $si; + $sat->dps->ssl = $sl; + $sat->dps->ssh = $sh / $sat->deep_arg->sinio; + $sat->dps->ssg = $sgh - $sat->deep_arg->cosio * $sat->dps->ssh; + $sat->dps->se2 = $sat->dps->ee2; + $sat->dps->si2 = $sat->dps->xi2; + $sat->dps->sl2 = $sat->dps->xl2; + $sat->dps->sgh2 = $sat->dps->xgh2; + $sat->dps->sh2 = $sat->dps->xh2; + $sat->dps->se3 = $sat->dps->e3; + $sat->dps->si3 = $sat->dps->xi3; + $sat->dps->sl3 = $sat->dps->xl3; + $sat->dps->sgh3 = $sat->dps->xgh3; + $sat->dps->sh3 = $sat->dps->xh3; + $sat->dps->sl4 = $sat->dps->xl4; + $sat->dps->sgh4 = $sat->dps->xgh4; + $zcosg = $sat->dps->zcosgl; + $zsing = $sat->dps->zsingl; + $zcosi = $sat->dps->zcosil; + $zsini = $sat->dps->zsinil; + $zcosh = $sat->dps->zcoshl * $cosq + $sat->dps->zsinhl * $sinq; + $zsinh = $sinq * $sat->dps->zcoshl - $cosq * $sat->dps->zsinhl; + $zn = Predict::znl; + $cc = Predict::c1l; + $ze = Predict::zel; + $zmo = $sat->dps->zmol; + $sat->flags |= self::LUNAR_TERMS_DONE_FLAG; + } /* End of for(;;) */ + + $sat->dps->sse = $sat->dps->sse + $se; + $sat->dps->ssi = $sat->dps->ssi + $si; + $sat->dps->ssl = $sat->dps->ssl + $sl; + $sat->dps->ssg = $sat->dps->ssg + $sgh - $sat->deep_arg->cosio / $sat->deep_arg->sinio * $sh; + $sat->dps->ssh = $sat->dps->ssh + $sh / $sat->deep_arg->sinio; + + /* Geopotential resonance initialization for 12 hour orbits */ + $sat->flags &= ~self::RESONANCE_FLAG; + $sat->flags &= ~self::SYNCHRONOUS_FLAG; + + if (!(($sat->dps->xnq < 0.0052359877) && ($sat->dps->xnq > 0.0034906585))) { + if( ($sat->dps->xnq < 0.00826) || ($sat->dps->xnq > 0.00924) ) { + return; + } + if ($eq < 0.5) { + return; + } + $sat->flags |= self::RESONANCE_FLAG; + $eoc = $eq * $sat->deep_arg->eosq; + $g201 = -0.306 - ($eq - 0.64) * 0.440; + if ($eq <= 0.65) { + $g211 = 3.616 - 13.247 * $eq + 16.290 * $sat->deep_arg->eosq; + $g310 = -19.302 + 117.390 * $eq - 228.419 * + $sat->deep_arg->eosq + 156.591 * $eoc; + $g322 = -18.9068 + 109.7927 * $eq - 214.6334 * + $sat->deep_arg->eosq + 146.5816 * $eoc; + $g410 = -41.122 + 242.694 * $eq - 471.094 * + $sat->deep_arg->eosq + 313.953 * $eoc; + $g422 = -146.407 + 841.880 * $eq - 1629.014 * + $sat->deep_arg->eosq + 1083.435 * $eoc; + $g520 = -532.114 + 3017.977 * $eq - 5740 * + $sat->deep_arg->eosq + 3708.276 * $eoc; + } else { + $g211 = -72.099 + 331.819 * $eq - 508.738 * + $sat->deep_arg->eosq + 266.724 * $eoc; + $g310 = -346.844 + 1582.851 * $eq - 2415.925 * + $sat->deep_arg->eosq + 1246.113 * $eoc; + $g322 = -342.585 + 1554.908 * $eq - 2366.899 * + $sat->deep_arg->eosq + 1215.972 * $eoc; + $g410 = -1052.797 + 4758.686 * $eq - 7193.992 * + $sat->deep_arg->eosq + 3651.957 * $eoc; + $g422 = -3581.69 + 16178.11 * $eq - 24462.77 * + $sat->deep_arg->eosq+ 12422.52 * $eoc; + if ($eq <= 0.715) { + $g520 = 1464.74 - 4664.75 * $eq + 3763.64 * $sat->deep_arg->eosq; + } else { + $g520 = -5149.66 + 29936.92 * $eq - 54087.36 * + $sat->deep_arg->eosq + 31324.56 * $eoc; + } + } /* End if (eq <= 0.65) */ + + if ($eq < 0.7) { + $g533 = -919.2277 + 4988.61 * $eq - 9064.77 * + $sat->deep_arg->eosq + 5542.21 * $eoc; + $g521 = -822.71072 + 4568.6173 * $eq - 8491.4146 * + $sat->deep_arg->eosq + 5337.524 * $eoc; + $g532 = -853.666 + 4690.25 * $eq - 8624.77 * + $sat->deep_arg->eosq + 5341.4 * $eoc; + } + else { + $g533 = -37995.78 + 161616.52 * $eq - 229838.2* + $sat->deep_arg->eosq + 109377.94 * $eoc; + $g521 = -51752.104 + 218913.95 * $eq - 309468.16* + $sat->deep_arg->eosq + 146349.42 * $eoc; + $g532 = -40023.88 + 170470.89 * $eq - 242699.48* + $sat->deep_arg->eosq + 115605.82 * $eoc; + } /* End if (eq <= 0.7) */ + + $sini2 = $sat->deep_arg->sinio * $sat->deep_arg->sinio; + $f220 = 0.75 * (1 + 2 * $sat->deep_arg->cosio + $sat->deep_arg->theta2); + $f221 = 1.5 * $sini2; + $f321 = 1.875 * $sat->deep_arg->sinio * (1 - 2 * + $sat->deep_arg->cosio - 3 * $sat->deep_arg->theta2); + $f322 = -1.875 * $sat->deep_arg->sinio * (1 + 2* + $sat->deep_arg->cosio - 3 * $sat->deep_arg->theta2); + $f441 = 35 * $sini2 * $f220; + $f442 = 39.3750 * $sini2 * $sini2; + $f522 = 9.84375 * $sat->deep_arg->sinio * ($sini2 * (1 - 2 * $sat->deep_arg->cosio - 5 * + $sat->deep_arg->theta2) + 0.33333333 * (-2 + 4 * $sat->deep_arg->cosio + + 6 * $sat->deep_arg->theta2)); + $f523 = $sat->deep_arg->sinio * (4.92187512 * $sini2 * (-2 - 4 * + $sat->deep_arg->cosio + 10 * $sat->deep_arg->theta2) + 6.56250012 + * (1 + 2 * $sat->deep_arg->cosio - 3 * $sat->deep_arg->theta2)); + $f542 = 29.53125 * $sat->deep_arg->sinio * (2 - 8 * + $sat->deep_arg->cosio + $sat->deep_arg->theta2 * + (-12 + 8 * $sat->deep_arg->cosio + 10 * $sat->deep_arg->theta2)); + $f543 = 29.53125 * $sat->deep_arg->sinio * (-2 - 8 * $sat->deep_arg->cosio + + $sat->deep_arg->theta2 * (12 + 8 * $sat->deep_arg->cosio - 10 * + $sat->deep_arg->theta2)); + $xno2 = $sat->dps->xnq * $sat->dps->xnq; + $ainv2 = $aqnv * $aqnv; + $temp1 = 3 * $xno2 * $ainv2; + $temp = $temp1 * Predict::root22; + $sat->dps->d2201 = $temp * $f220 * $g201; + $sat->dps->d2211 = $temp * $f221 * $g211; + $temp1 = $temp1 * $aqnv; + $temp = $temp1 * Predict::root32; + $sat->dps->d3210 = $temp * $f321 * $g310; + $sat->dps->d3222 = $temp * $f322 * $g322; + $temp1 = $temp1 * $aqnv; + $temp = 2 * $temp1 * Predict::root44; + $sat->dps->d4410 = $temp * $f441 * $g410; + $sat->dps->d4422 = $temp * $f442 * $g422; + $temp1 = $temp1 * $aqnv; + $temp = $temp1 * Predict::root52; + $sat->dps->d5220 = $temp * $f522 * $g520; + $sat->dps->d5232 = $temp * $f523 * $g532; + $temp = 2 * $temp1 * Predict::root54; + $sat->dps->d5421 = $temp * $f542 * $g521; + $sat->dps->d5433 = $temp * $f543 * $g533; + $sat->dps->xlamo = $xmao + $sat->tle->xnodeo + $sat->tle->xnodeo - $sat->dps->thgr - $sat->dps->thgr; + $bfact = $sat->deep_arg->xmdot + $sat->deep_arg->xnodot + + $sat->deep_arg->xnodot - Predict::thdt - Predict::thdt; + $bfact = $bfact + $sat->dps->ssl + $sat->dps->ssh + $sat->dps->ssh; + } else { + $sat->flags |= self::RESONANCE_FLAG; + $sat->flags |= self::SYNCHRONOUS_FLAG; + /* Synchronous resonance terms initialization */ + $g200 = 1 + $sat->deep_arg->eosq * (-2.5 + 0.8125 * $sat->deep_arg->eosq); + $g310 = 1 + 2 * $sat->deep_arg->eosq; + $g300 = 1 + $sat->deep_arg->eosq * (-6 + 6.60937 * $sat->deep_arg->eosq); + $f220 = 0.75 * (1 + $sat->deep_arg->cosio) * (1 + $sat->deep_arg->cosio); + $f311 = 0.9375 * $sat->deep_arg->sinio * $sat->deep_arg->sinio * + (1 + 3 * $sat->deep_arg->cosio) - 0.75 * (1 + $sat->deep_arg->cosio); + $f330 = 1 + $sat->deep_arg->cosio; + $f330 = 1.875 * $f330 * $f330 * $f330; + $sat->dps->del1 = 3 * $sat->dps->xnq * $sat->dps->xnq * $aqnv * $aqnv; + $sat->dps->del2 = 2 * $sat->dps->del1 * $f220 * $g200 * Predict::q22; + $sat->dps->del3 = 3 * $sat->dps->del1 * $f330 * $g300 * Predict::q33 * $aqnv; + $sat->dps->del1 = $sat->dps->del1 * $f311 * $g310 * Predict::q31 * $aqnv; + $sat->dps->fasx2 = 0.13130908; + $sat->dps->fasx4 = 2.8843198; + $sat->dps->fasx6 = 0.37448087; + $sat->dps->xlamo = $xmao + $sat->tle->xnodeo + $sat->tle->omegao - $sat->dps->thgr; + $bfact = $sat->deep_arg->xmdot + $xpidot - Predict::thdt; + $bfact = $bfact + $sat->dps->ssl + $sat->dps->ssg + $sat->dps->ssh; + } /* End if( !(xnq < 0.0052359877) && (xnq > 0.0034906585) ) */ + + $sat->dps->xfact = $bfact - $sat->dps->xnq; + + /* Initialize integrator */ + $sat->dps->xli = $sat->dps->xlamo; + $sat->dps->xni = $sat->dps->xnq; + $sat->dps->atime = 0; + $sat->dps->stepp = 720; + $sat->dps->stepn = -720; + $sat->dps->step2 = 259200; + /* End case self::dpinit: */ + return; + + case self::dpsec: /* Entrance for deep space secular effects */ + $sat->deep_arg->xll = $sat->deep_arg->xll + $sat->dps->ssl * $sat->deep_arg->t; + $sat->deep_arg->omgadf = $sat->deep_arg->omgadf + $sat->dps->ssg * $sat->deep_arg->t; + $sat->deep_arg->xnode = $sat->deep_arg->xnode + $sat->dps->ssh * $sat->deep_arg->t; + $sat->deep_arg->em = $sat->tle->eo + $sat->dps->sse * $sat->deep_arg->t; + $sat->deep_arg->xinc = $sat->tle->xincl + $sat->dps->ssi * $sat->deep_arg->t; + if ($sat->deep_arg->xinc < 0) { + $sat->deep_arg->xinc = -$sat->deep_arg->xinc; + $sat->deep_arg->xnode = $sat->deep_arg->xnode + Predict::pi; + $sat->deep_arg->omgadf = $sat->deep_arg->omgadf - Predict::pi; + } + if(~$sat->flags & self::RESONANCE_FLAG ) { + return; + } + + do { + if ( ($sat->dps->atime == 0) || + (($sat->deep_arg->t >= 0) && ($sat->dps->atime < 0)) || + (($sat->deep_arg->t < 0) && ($sat->dps->atime >= 0)) ) { + /* Epoch restart */ + if ($sat->deep_arg->t >= 0) { + $delt = $sat->dps->stepp; + } else { + $delt = $sat->dps->stepn; + } + + $sat->dps->atime = 0; + $sat->dps->xni = $sat->dps->xnq; + $sat->dps->xli = $sat->dps->xlamo; + } else { + if (abs($sat->deep_arg->t) >= abs($sat->dps->atime)) { + if ($sat->deep_arg->t > 0) { + $delt = $sat->dps->stepp; + } else { + $delt = $sat->dps->stepn; + } + } + } + + do { + if (abs($sat->deep_arg->t - $sat->dps->atime) >= $sat->dps->stepp) { + $sat->flags |= self::DO_LOOP_FLAG; + $sat->flags &= ~self::EPOCH_RESTART_FLAG; + } + else { + $ft = $sat->deep_arg->t - $sat->dps->atime; + $sat->flags &= ~self::DO_LOOP_FLAG; + } + + if (abs($sat->deep_arg->t) < abs($sat->dps->atime)) { + if ($sat->deep_arg->t >= 0) { + $delt = $sat->dps->stepn; + } else { + $delt = $sat->dps->stepp; + } + $sat->flags |= (self::DO_LOOP_FLAG | self::EPOCH_RESTART_FLAG); + } + + /* Dot terms calculated */ + if ($sat->flags & self::SYNCHRONOUS_FLAG) { + $xndot = $sat->dps->del1 * sin($sat->dps->xli - $sat->dps->fasx2) + $sat->dps->del2 * sin(2 * ($sat->dps->xli - $sat->dps->fasx4)) + + $sat->dps->del3 * sin(3 * ($sat->dps->xli - $sat->dps->fasx6)); + $xnddt = $sat->dps->del1 * cos($sat->dps->xli - $sat->dps->fasx2) + 2 * $sat->dps->del2 * cos(2 * ($sat->dps->xli - $sat->dps->fasx4)) + + 3 * $sat->dps->del3 * cos(3 * ($sat->dps->xli - $sat->dps->fasx6)); + } else { + $xomi = $sat->dps->omegaq + $sat->deep_arg->omgdot * $sat->dps->atime; + $x2omi = $xomi + $xomi; + $x2li = $sat->dps->xli + $sat->dps->xli; + $xndot = $sat->dps->d2201 * sin($x2omi + $sat->dps->xli - Predict::g22) + + $sat->dps->d2211 * sin($sat->dps->xli - Predict::g22) + + $sat->dps->d3210 * sin($xomi + $sat->dps->xli - Predict::g32) + + $sat->dps->d3222 * sin(-$xomi + $sat->dps->xli - Predict::g32) + + $sat->dps->d4410 * sin($x2omi + $x2li- Predict::g44) + + $sat->dps->d4422 * sin($x2li- Predict::g44) + + $sat->dps->d5220 * sin($xomi + $sat->dps->xli- Predict::g52) + + $sat->dps->d5232 * sin(-$xomi + $sat->dps->xli- Predict::g52) + + $sat->dps->d5421 * sin($xomi + $x2li - Predict::g54) + + $sat->dps->d5433 * sin(-$xomi + $x2li - Predict::g54); + $xnddt = $sat->dps->d2201 * cos($x2omi + $sat->dps->xli- Predict::g22) + + $sat->dps->d2211 * cos($sat->dps->xli - Predict::g22) + + $sat->dps->d3210 * cos($xomi + $sat->dps->xli - Predict::g32) + + $sat->dps->d3222 * cos(-$xomi + $sat->dps->xli - Predict::g32) + + $sat->dps->d5220 * cos($xomi + $sat->dps->xli - Predict::g52) + + $sat->dps->d5232 * cos(-$xomi + $sat->dps->xli - Predict::g52) + + 2 * ($sat->dps->d4410 * cos($x2omi + $x2li - Predict::g44) + + $sat->dps->d4422 * cos($x2li - Predict::g44) + + $sat->dps->d5421 * cos($xomi + $x2li - Predict::g54) + + $sat->dps->d5433 * cos(-$xomi + $x2li - Predict::g54)); + } /* End of if (isFlagSet(SYNCHRONOUS_FLAG)) */ + + $xldot = $sat->dps->xni + $sat->dps->xfact; + $xnddt = $xnddt * $xldot; + + if ($sat->flags & self::DO_LOOP_FLAG) { + $sat->dps->xli = $sat->dps->xli + $xldot * $delt + $xndot * $sat->dps->step2; + $sat->dps->xni = $sat->dps->xni + $xndot * $delt + $xnddt * $sat->dps->step2; + $sat->dps->atime = $sat->dps->atime + $delt; + } + } while (($sat->flags & self::DO_LOOP_FLAG) && + (~$sat->flags & self::EPOCH_RESTART_FLAG)); + } + while (($sat->flags & self::DO_LOOP_FLAG) && ($sat->flags & self::EPOCH_RESTART_FLAG)); + + $sat->deep_arg->xn = $sat->dps->xni + $xndot * $ft + $xnddt * $ft * $ft * 0.5; + $xl = $sat->dps->xli + $xldot * $ft + $xndot * $ft * $ft * 0.5; + $temp = -$sat->deep_arg->xnode + $sat->dps->thgr + $sat->deep_arg->t * Predict::thdt; + + if (~$sat->flags & self::SYNCHRONOUS_FLAG) { + $sat->deep_arg->xll = $xl + $temp + $temp; + } else { + $sat->deep_arg->xll = $xl - $sat->deep_arg->omgadf + $temp; + } + + return; + /* End case dpsec: */ + + case self::dpper: /* Entrance for lunar-solar periodics */ + $sinis = sin($sat->deep_arg->xinc); + $cosis = cos($sat->deep_arg->xinc); + if (abs($sat->dps->savtsn - $sat->deep_arg->t) >= 30) { + $sat->dps->savtsn = $sat->deep_arg->t; + $zm = $sat->dps->zmos + Predict::zns * $sat->deep_arg->t; + $zf = $zm + 2 * Predict::zes * sin($zm); + $sinzf = sin($zf); + $f2 = 0.5 * $sinzf * $sinzf - 0.25; + $f3 = -0.5 * $sinzf * cos($zf); + $ses = $sat->dps->se2 * $f2 + $sat->dps->se3 * $f3; + $sis = $sat->dps->si2 * $f2 + $sat->dps->si3 * $f3; + $sls = $sat->dps->sl2 * $f2 + $sat->dps->sl3 * $f3 + $sat->dps->sl4 * $sinzf; + $sat->dps->sghs = $sat->dps->sgh2 * $f2 + $sat->dps->sgh3 * $f3 + $sat->dps->sgh4 * $sinzf; + $sat->dps->shs = $sat->dps->sh2 * $f2 + $sat->dps->sh3 * $f3; + $zm = $sat->dps->zmol + Predict::znl * $sat->deep_arg->t; + $zf = $zm + 2 * Predict::zel * sin($zm); + $sinzf = sin($zf); + $f2 = 0.5 * $sinzf * $sinzf - 0.25; + $f3 = -0.5 * $sinzf * cos($zf); + $sel = $sat->dps->ee2 * $f2 + $sat->dps->e3 * $f3; + $sil = $sat->dps->xi2 * $f2 + $sat->dps->xi3 * $f3; + $sll = $sat->dps->xl2 * $f2 + $sat->dps->xl3 * $f3 + $sat->dps->xl4 * $sinzf; + $sat->dps->sghl = $sat->dps->xgh2 * $f2 + $sat->dps->xgh3 * $f3 + $sat->dps->xgh4 * $sinzf; + $sat->dps->sh1 = $sat->dps->xh2 * $f2 + $sat->dps->xh3 * $f3; + $sat->dps->pe = $ses + $sel; + $sat->dps->pinc = $sis + $sil; + $sat->dps->pl = $sls + $sll; + } + + $pgh = $sat->dps->sghs + $sat->dps->sghl; + $ph = $sat->dps->shs + $sat->dps->sh1; + $sat->deep_arg->xinc = $sat->deep_arg->xinc + $sat->dps->pinc; + $sat->deep_arg->em = $sat->deep_arg->em + $sat->dps->pe; + + if ($sat->dps->xqncl >= 0.2) { + /* Apply periodics directly */ + $ph = $ph / $sat->deep_arg->sinio; + $pgh = $pgh - $sat->deep_arg->cosio * $ph; + $sat->deep_arg->omgadf = $sat->deep_arg->omgadf + $pgh; + $sat->deep_arg->xnode = $sat->deep_arg->xnode + $ph; + $sat->deep_arg->xll = $sat->deep_arg->xll + $sat->dps->pl; + } else { + /* Apply periodics with Lyddane modification */ + $sinok = sin($sat->deep_arg->xnode); + $cosok = cos($sat->deep_arg->xnode); + $alfdp = $sinis * $sinok; + $betdp = $sinis * $cosok; + $dalf = $ph * $cosok + $sat->dps->pinc * $cosis * $sinok; + $dbet = -$ph * $sinok + $sat->dps->pinc * $cosis * $cosok; + $alfdp = $alfdp + $dalf; + $betdp = $betdp + $dbet; + $sat->deep_arg->xnode = Predict_Math::FMod2p($sat->deep_arg->xnode); + $xls = $sat->deep_arg->xll + $sat->deep_arg->omgadf + $cosis * $sat->deep_arg->xnode; + $dls = $sat->dps->pl + $pgh - $sat->dps->pinc * $sat->deep_arg->xnode * $sinis; + $xls = $xls + $dls; + $xnoh = $sat->deep_arg->xnode; + $sat->deep_arg->xnode = Predict_Math::AcTan($alfdp, $betdp); + + /* This is a patch to Lyddane modification */ + /* suggested by Rob Matson. */ + if(abs($xnoh - $sat->deep_arg->xnode) > Predict::pi) { + if ($sat->deep_arg->xnode < $xnoh) { + $sat->deep_arg->xnode += Predict::twopi; + } else { + $sat->deep_arg->xnode -= Predict::twopi; + } + } + + $sat->deep_arg->xll = $sat->deep_arg->xll + $sat->dps->pl; + $sat->deep_arg->omgadf = $xls - $sat->deep_arg->xll - cos($sat->deep_arg->xinc) * + $sat->deep_arg->xnode; + } /* End case dpper: */ + return; + + } /* End switch(ientry) */ + + } /* End of Deep() */ + + /** + * Singleton + * + * @param Predict_Sat $sat The current satellite data instance + * + * @return Predict_SGPSDP + */ + public static function getInstance(Predict_Sat $sat) + { + static $instances = array(); + $catnr = $sat->tle->catnr; + if (!isset($instances[$catnr])) { + $instances[$catnr] = new self(); + } + return $instances[$catnr]; + } +} +?> diff --git a/predict/Predict/SGSDPStatic.php b/predict/Predict/SGSDPStatic.php new file mode 100644 index 000000000..12a43a4cd --- /dev/null +++ b/predict/Predict/SGSDPStatic.php @@ -0,0 +1,39 @@ +header); + $this->name = $headerParts[0]; + $this->nickname = $this->name; + $this->tle = $tle; + $this->pos = new Predict_Vector(); + $this->vel = new Predict_Vector(); + $this->sgps = new Predict_SGSDPStatic(); + $this->deep_arg = new Predict_DeepArg(); + $this->dps = new Predict_DeepStatic(); + + $this->select_ephemeris(); + $this->sat_data_init_sat($this); + } + + /* Selects the apropriate ephemeris type to be used */ + /* for predictions according to the data in the TLE */ + /* It also processes values in the tle set so that */ + /* they are apropriate for the sgp4/sdp4 routines */ + public function select_ephemeris() + { + /* Preprocess tle set */ + $this->tle->xnodeo *= Predict::de2ra; + $this->tle->omegao *= Predict::de2ra; + $this->tle->xmo *= Predict::de2ra; + $this->tle->xincl *= Predict::de2ra; + $temp = Predict::twopi / Predict::xmnpda / Predict::xmnpda; + + /* store mean motion before conversion */ + $this->meanmo = $this->tle->xno; + $this->tle->xno = $this->tle->xno * $temp * Predict::xmnpda; + $this->tle->xndt2o *= $temp; + $this->tle->xndd6o = $this->tle->xndd6o * $temp / Predict::xmnpda; + $this->tle->bstar /= Predict::ae; + + /* Period > 225 minutes is deep space */ + $dd1 = Predict::xke / $this->tle->xno; + $dd2 = Predict::tothrd; + $a1 = pow($dd1, $dd2); + $r1 = cos($this->tle->xincl); + $dd1 = 1.0 - $this->tle->eo * $this->tle->eo; + $temp = Predict::ck2 * 1.5 * ($r1 * $r1 * 3.0 - 1.0) / pow($dd1, 1.5); + $del1 = $temp / ($a1 * $a1); + $ao = $a1 * (1.0 - $del1 * (Predict::tothrd * 0.5 + $del1 * + ($del1 * 1.654320987654321 + 1.0))); + $delo = $temp / ($ao * $ao); + $xnodp = $this->tle->xno / ($delo + 1.0); + + /* Select a deep-space/near-earth ephemeris */ + if (Predict::twopi / $xnodp / Predict::xmnpda >= .15625) { + $this->flags |= Predict_SGPSDP::DEEP_SPACE_EPHEM_FLAG; + } else { + $this->flags &= ~Predict_SGPSDP::DEEP_SPACE_EPHEM_FLAG; + } + } + + /** Initialise satellite data. + * @param sat The satellite to initialise. + * @param qth Optional QTH info, use (0,0) if NULL. + * + * This function calculates the satellite data at t = 0, ie. epoch time + * The function is called automatically by gtk_sat_data_read_sat. + */ + public function sat_data_init_sat(Predict_Sat $sat, Predict_QTH $qth = null) + { + $obs_geodetic = new Predict_Geodetic(); + $obs_set = new Predict_ObsSet(); + $sat_geodetic = new Predict_Geodetic(); + /* double jul_utc, age; */ + + $jul_utc = Predict_Time::Julian_Date_of_Epoch($sat->tle->epoch); // => tsince = 0.0 + $sat->jul_epoch = $jul_utc; + + /* initialise observer location */ + if ($qth != null) { + $obs_geodetic->lon = $qth->lon * Predict::de2ra; + $obs_geodetic->lat = $qth->lat * Predict::de2ra; + $obs_geodetic->alt = $qth->alt / 1000.0; + $obs_geodetic->theta = 0; + } + else { + $obs_geodetic->lon = 0.0; + $obs_geodetic->lat = 0.0; + $obs_geodetic->alt = 0.0; + $obs_geodetic->theta = 0; + } + + /* execute computations */ + $sdpsgp = Predict_SGPSDP::getInstance($sat); + if ($sat->flags & Predict_SGPSDP::DEEP_SPACE_EPHEM_FLAG) { + $sdpsgp->SDP4($sat, 0.0); + } else { + $sdpsgp->SGP4($sat, 0.0); + } + + /* scale position and velocity to km and km/sec */ + Predict_Math::Convert_Sat_State($sat->pos, $sat->vel); + + /* get the velocity of the satellite */ + $sat->vel->w = sqrt($sat->vel->x * $sat->vel->x + $sat->vel->y * $sat->vel->y + $sat->vel->z * $sat->vel->z); + $sat->velo = $sat->vel->w; + Predict_SGPObs::Calculate_Obs($jul_utc, $sat->pos, $sat->vel, $obs_geodetic, $obs_set); + Predict_SGPObs::Calculate_LatLonAlt($jul_utc, $sat->pos, $sat_geodetic); + + while ($sat_geodetic->lon < -Predict::pi) { + $sat_geodetic->lon += Predict::twopi; + } + + while ($sat_geodetic->lon > Predict::pi) { + $sat_geodetic->lon -= Predict::twopi; + } + + $sat->az = Predict_Math::Degrees($obs_set->az); + $sat->el = Predict_Math::Degrees($obs_set->el); + $sat->range = $obs_set->range; + $sat->range_rate = $obs_set->range_rate; + $sat->ssplat = Predict_Math::Degrees($sat_geodetic->lat); + $sat->ssplon = Predict_Math::Degrees($sat_geodetic->lon); + $sat->alt = $sat_geodetic->alt; + $sat->ma = Predict_Math::Degrees($sat->phase); + $sat->ma *= 256.0 / 360.0; + $sat->footprint = 2.0 * Predict::xkmper * acos (Predict::xkmper/$sat->pos->w); + $age = 0.0; + $sat->orbit = floor(($sat->tle->xno * Predict::xmnpda / Predict::twopi + + $age * $sat->tle->bstar * Predict::ae) * $age + + $sat->tle->xmo / Predict::twopi) + $sat->tle->revnum - 1; + + /* orbit type */ + $sat->otype = $sat->get_orbit_type($sat); + } + + public function get_orbit_type(Predict_Sat $sat) + { + $orbit = Predict_SGPSDP::ORBIT_TYPE_UNKNOWN; + + if ($this->geostationary($sat)) { + $orbit = Predict_SGPSDP::ORBIT_TYPE_GEO; + } else if ($this->decayed($sat)) { + $orbit = Predict_SGPSDP::ORBIT_TYPE_DECAYED; + } else { + $orbit = Predict_SGPSDP::ORBIT_TYPE_UNKNOWN; + } + + return $orbit; + } + + + /** Determinte whether satellite is in geostationary orbit. + * @author John A. Magliacane, KD2BD + * @param sat Pointer to satellite data. + * @return TRUE if the satellite appears to be in geostationary orbit, + * FALSE otherwise. + * + * A satellite is in geostationary orbit if + * + * fabs (sat.meanmotion - 1.0027) < 0.0002 + * + * Note: Appearantly, the mean motion can deviate much more from 1.0027 than 0.0002 + */ + public function geostationary(Predict_Sat $sat) + { + if (abs($sat->meanmo - 1.0027) < 0.0002) { + return true; + } else { + return false; + } + } + + + /** Determine whether satellite has decayed. + * @author John A. Magliacane, KD2BD + * @author Alexandru Csete, OZ9AEC + * @param sat Pointer to satellite data. + * @return TRUE if the satellite appears to have decayed, FALSE otherwise. + * @bug Modified version of the predict code but it is not tested. + * + * A satellite is decayed if + * + * satepoch + ((16.666666 - sat.meanmo) / (10.0*fabs(sat.drag))) < "now" + * + */ + public function decayed(Predict_Sat $sat) + { + /* tle.xndt2o/(twopi/xmnpda/xmnpda) is the value before converted the + value matches up with the value in predict 2.2.3 */ + /*** FIXME decayed is treated as a static quantity. + It is time dependent. Also sat->jul_utc is often zero + when this function is called + ***/ + if ($sat->jul_epoch + ((16.666666 - $sat->meanmo) / + (10.0 * abs($sat->tle->xndt2o / (Predict::twopi / Predict::xmnpda / Predict::xmnpda)))) < $sat->jul_utc) { + return true; + } else { + return false; + } + } + + /** + * Experimental attempt at calculating apparent magnitude. Known intrinsic + * magnitudes are listed inside the function for now. + * + * @param float $time The daynum the satellite is calculated for + * @param Predict_QTH $qth The observer location + * + * @return null on failure, float otherwise + */ + public function calculateApparentMagnitude($time, Predict_QTH $qth) + { + // Recorded intrinsic magnitudes and their respective + // illumination and distance from heavens-above.com + static $intrinsicMagnitudes = array( + '25544' => array( + 'mag' => -1.3, + 'illum' => .5, + 'distance' => 1000, + ) + ); + + // Return null if we don't have a record of the intrinsic mag + if (!isset($intrinsicMagnitudes[$this->tle->catnr])) { + return null; + } + $imag = $intrinsicMagnitudes[$this->tle->catnr]; + + // Convert the observer's geodetic info to radians and km so + // we can compare vectors + $observerGeo = new Predict_Geodetic(); + $observerGeo->lat = Predict_Math::Radians($qth->lat); + $observerGeo->lon = Predict_Math::Radians($qth->lon); + $observerGeo->alt = $qth->alt * 1000; + + // Now determine the sun and observer positions + $observerPos = new Predict_Vector(); + $observerVel = new Predict_Vector(); + $solarVector = new Predict_Vector(); + Predict_Solar::Calculate_Solar_Position($time, $solarVector); + Predict_SGPObs::Calculate_User_PosVel($time, $observerGeo, $observerPos, $observerVel); + + // Determine the solar phase and and thus the percent illumination + $observerSatPos = new Predict_Vector(); + Predict_Math::Vec_Sub($this->pos, $observerPos, $observerSatPos); + $phaseAngle = Predict_Math::Degrees(Predict_Math::Angle($solarVector, $observerSatPos)); + $illum = $phaseAngle / 180; + + $illuminationChange = $illum / $imag['illum']; + $inverseSquareOfDistanceChange = pow(($imag['distance'] / $this->range), 2); + $changeInMagnitude = log( + $illuminationChange * $inverseSquareOfDistanceChange, + self::POGSONS_RATIO + ); + + return $imag['mag'] - $changeInMagnitude; + } +} diff --git a/predict/Predict/Solar.php b/predict/Predict/Solar.php new file mode 100644 index 000000000..8ec351b0f --- /dev/null +++ b/predict/Predict/Solar.php @@ -0,0 +1,115 @@ +x = $R * cos($Lsa); + $solar_vector->y = $R * sin($Lsa) * cos($eps); + $solar_vector->z = $R * sin($Lsa) * sin($eps); + $solar_vector->w = $R; + } + + /* Calculates stellite's eclipse status and depth */ + public static function Sat_Eclipsed(Predict_Vector $pos, Predict_Vector $sol, &$depth) + { + $Rho = new Predict_Vector(); + $earth = new Predict_Vector(); + + /* Determine partial eclipse */ + $sd_earth = Predict_Math::ArcSin(Predict::xkmper / $pos->w); + Predict_Math::Vec_Sub($sol, $pos, $Rho); + $sd_sun = Predict_Math::ArcSin(Predict::__sr__ / $Rho->w); + Predict_Math::Scalar_Multiply(-1, $pos, $earth); + $delta = Predict_Math::Angle($sol, $earth); + $depth = $sd_earth - $sd_sun - $delta; + + if ($sd_earth < $sd_sun) { + return 0; + } else if ($depth >= 0) { + return 1; + } else { + return 0; + } + } + + /** + * Finds the current location of the sun based on the observer location + * + * @param Predict_QTH $qth The observer location + * @param int $daynum The daynum or null to use the current daynum + * + * @return Predict_ObsSet + */ + public static function FindSun(Predict_QTH $qth, $daynum = null) + { + if ($daynum === null) { + $daynum = Predict_Time::get_current_daynum(); + } + + $obs_geodetic = new Predict_Geodetic(); + $obs_geodetic->lon = $qth->lon * Predict::de2ra; + $obs_geodetic->lat = $qth->lat * Predict::de2ra; + $obs_geodetic->alt = $qth->alt / 1000.0; + $obs_geodetic->theta = 0; + + $solar_vector = new Predict_Vector(); + $zero_vector = new Predict_Vector(); + $solar_set = new Predict_ObsSet(); + + self::Calculate_Solar_Position($daynum, $solar_vector); + Predict_SGPObs::Calculate_Obs( + $daynum, + $solar_vector, + $zero_vector, + $obs_geodetic, + $solar_set + ); + + $solar_set->az = Predict_Math::Degrees($solar_set->az); + $solar_set->el = Predict_Math::Degrees($solar_set->el); + + return $solar_set; + } +} diff --git a/predict/Predict/TLE.php b/predict/Predict/TLE.php new file mode 100644 index 000000000..e78e4345c --- /dev/null +++ b/predict/Predict/TLE.php @@ -0,0 +1,232 @@ +Good_Elements($line1, $line2)) { + throw new Predict_Exception('Invalid TLE contents'); + } + + $this->header = $header; + $this->line1 = $line1; + $this->line2 = $line2; + + /** Decode Card 1 **/ + /* Satellite's catalogue number */ + $this->catnr = (int) substr($line1, 2, 5); + + /* International Designator for satellite */ + $this->idesg = substr($line1, 9, 8); + + /* Epoch time; this is the complete, unconverted epoch. */ + /* Replace spaces with 0 before casting, as leading spaces are allowed */ + $this->epoch = (float) str_replace(' ', '0', substr($line1, 18, 14)); + + /* Now, convert the epoch time into year, day + and fraction of day, according to: + + YYDDD.FFFFFFFF + */ + + // Adjust for 2 digit year through 2056 + $this->epoch_year = (int) substr($line1, 18, 2); + if ($this->epoch_year > 56) { + $this->epoch_year = $this->epoch_year + 1900; + } else { + $this->epoch_year = $this->epoch_year + 2000; + } + + /* Epoch day */ + $this->epoch_day = (int) substr($line1, 20, 3); + + /* Epoch fraction of day */ + $this->epoch_fod = (float) substr($line1, 23, 9); + + + /* Satellite's First Time Derivative */ + $this->xndt2o = (float) substr($line1, 33, 10); + + /* Satellite's Second Time Derivative */ + $this->xndd6o = (float) (substr($line1, 44, 1) . '.' . substr($line1, 45, 5) . 'E' . substr($line1, 50, 2)); + + /* Satellite's bstar drag term + FIXME: How about buff[0] ???? + */ + $this->bstar = (float) (substr($line1, 53, 1) . '.' . substr($line1, 54, 5) . 'E' . substr($line1, 59, 2)); + + /* Element Number */ + $this->elset = (int) substr($line1, 64, 4); + + /** Decode Card 2 **/ + /* Satellite's Orbital Inclination (degrees) */ + $this->xincl = (float) substr($line2, 8, 8); + + /* Satellite's RAAN (degrees) */ + $this->xnodeo = (float) substr($line2, 17, 8); + + /* Satellite's Orbital Eccentricity */ + $this->eo = (float) ('.' . substr($line2, 26, 7)); + + /* Satellite's Argument of Perigee (degrees) */ + $this->omegao = (float) substr($line2, 34, 8); + + /* Satellite's Mean Anomaly of Orbit (degrees) */ + $this->xmo = (float) substr($line2, 43, 8); + + /* Satellite's Mean Motion (rev/day) */ + $this->xno = (float) substr($line2, 52, 11); + + /* Satellite's Revolution number at epoch */ + $this->revnum = (float) substr($line2, 63, 5); + } + + /* Calculates the checksum mod 10 of a line from a TLE set and */ + /* returns true if it compares with checksum in column 68, else false.*/ + /* tle_set is a character string holding the two lines read */ + /* from a text file containing NASA format Keplerian elements. */ + /* NOTE!!! The stuff about two lines is not quite true. + The function assumes that tle_set[0] is the begining + of the line and that there are 68 elements - see the consumer + */ + public function Checksum_Good($tle_set) + { + if (strlen($tle_set) < 69) { + return false; + } + + $checksum = 0; + + for ($i = 0; $i < 68; $i++) { + if (($tle_set[$i] >= '0') && ($tle_set[$i] <= '9')) { + $value = $tle_set[$i] - '0'; + } else if ($tle_set[$i] == '-' ) { + $value = 1; + } else { + $value = 0; + } + + $checksum += $value; + } + + $checksum %= 10; + $check_digit = $tle_set[68] - '0'; + + return $checksum == $check_digit; + } + + /* Carries out various checks on a TLE set to verify its validity */ + /* $line1 is the first line of the TLE, $line2 is the second line */ + /* from a text file containing NASA format Keplerian elements. */ + public function Good_Elements($line1, $line2) + { + /* Verify checksum of both lines of a TLE set */ + if (!$this->Checksum_Good($line1) || !$this->Checksum_Good($line2)) { + return false; + } + + /* Check the line number of each line */ + if (($line1[0] != '1') || ($line2[0] != '2')) { + return false; + } + + /* Verify that Satellite Number is same in both lines */ + if (strncmp($line1[2], $line2[2], 5) != 0) { + return false; + } + + /* Check that various elements are in the right place */ + if (($line1[23] != '.') || + ($line1[34] != '.') || + ($line2[11] != '.') || + ($line2[20] != '.') || + ($line2[37] != '.') || + ($line2[46] != '.') || + ($line2[54] != '.') || + (strncmp(substr($line1, 61), ' 0 ', 3) != 0)) { + + return false; + } + + return true; + } + + /** + * A function to allow checksum creation of a line. This is driven by + * the fact that some TLEs from SpaceTrack are missing checksum numbers. + * You can use this to create a checksum for a line, but you should + * probably have confidence that the TLE data itself is good. YMMV. + * + * @throws Predict_Exception if the line is not exactly 68 chars + * @return string + */ + static public function createChecksum($line) + { + if (strlen($line) != 68) { + throw Predict_Exception('Invalid line, needs to e 68 chars'); + } + + $checksum = 0; + + for ($i = 0; $i < 68; $i++) { + if (($line[$i] >= '0') && ($line[$i] <= '9')) { + $value = (int) $line[$i]; + } else if ($line[$i] == '-' ) { + $value = 1; + } else { + $value = 0; + } + + $checksum += $value; + } + + $checksum %= 10; + + return $checksum; + } +} diff --git a/predict/Predict/Time.php b/predict/Predict/Time.php new file mode 100644 index 000000000..bfb515850 --- /dev/null +++ b/predict/Predict/Time.php @@ -0,0 +1,222 @@ +ds50 = $jd - 2433281.5 + $UT; + + return Predict_Math::FMod2p(6.3003880987 * $deep_arg->ds50 + 1.72944494); + } + + /* See the ThetaG doc block above */ + public static function ThetaG_JD($jd) + { + /* Reference: The 1992 Astronomical Almanac, page B6. */ + $UT = Predict_Math::Frac($jd + 0.5); + $jd = $jd - $UT; + $TU = ($jd - 2451545.0) / 36525; + $GMST = 24110.54841 + $TU * (8640184.812866 + $TU * (0.093104 - $TU * 6.2E-6)); + $GMST = Predict_Math::Modulus($GMST + Predict::secday * Predict::omega_E * $UT, Predict::secday); + + return Predict::twopi * $GMST / Predict::secday; + } + + /** + * Read the system clock and return the current Julian day. From phpPredict + * + * @return float + */ + public static function get_current_daynum() { + // Gets the current decimal day number from microtime + + list($usec, $sec) = explode(' ', microtime()); + return self::unix2daynum($sec, $usec); + } + + /** + * Converts a standard unix timestamp and optional + * milliseconds to a daynum + * + * @param int $sec Seconds from the unix epoch + * @param int $usec Optional milliseconds + * + * @return float + */ + public static function unix2daynum($sec, $usec = 0) + { + $time = ((($sec + $usec) / 86400.0) - 3651.0); + return $time + 2444238.5; + } + + /* The function Delta_ET has been added to allow calculations on */ + /* the position of the sun. It provides the difference between UT */ + /* (approximately the same as UTC) and ET (now referred to as TDT).*/ + /* This function is based on a least squares fit of data from 1950 */ + /* to 1991 and will need to be updated periodically. */ + public static function Delta_ET($year) + { + /* Values determined using data from 1950-1991 in the 1990 + Astronomical Almanac. See DELTA_ET.WQ1 for details. */ + + $delta_et = 26.465 + 0.747622 * ($year - 1950) + + 1.886913 * sin(Predict::twopi * ($year - 1975) / 33); + + return $delta_et; + } + + /** + * Converts a daynum to a unix timestamp. From phpPredict. + * + * @param float $dn Julian Daynum + * + * @return float + */ + public static function daynum2unix($dn) { + // Converts a daynum to a UNIX timestamp + + return (86400.0 * ($dn - 2444238.5 + 3651.0)); + } + + /** + * Converts a daynum to a readable time format. + * + * @param float $dn The julian date + * @param string $zone The zone string, defaults to America/Los_Angeles + * @param string $format The date() function's format string. Defaults to m-d-Y H:i:s + * + * @return string + */ + public static function daynum2readable($dn, $zone = 'America/Los_Angeles', $format = 'm-d-Y H:i:s') + { + $unix = self::daynum2unix($dn); + $date = new DateTime("@" . round($unix)); + $dateTimezone = new DateTimezone($zone); + $date->setTimezone($dateTimezone); + return $date->format($format); + } + + /** + * Returns the unix timestamp of a TLE's epoch + * + * @param Predict_TLE $tle The TLE object + * + * @return int + */ + public static function getEpochTimeStamp(Predict_TLE $tle) + { + $year = $tle->epoch_year; + $day = $tle->epoch_day; + $sec = round(86400 * $tle->epoch_fod); + + $zone = new DateTimeZone('GMT'); + $date = new DateTime(); + $date->setTimezone($zone); + $date->setDate($year, 1, 1); + $date->setTime(0, 0, 0); + + return $date->format('U') + (86400 * $day) + $sec - 86400; + } +} diff --git a/predict/Predict/Vector.php b/predict/Predict/Vector.php new file mode 100644 index 000000000..84749058b --- /dev/null +++ b/predict/Predict/Vector.php @@ -0,0 +1,13 @@ +setOptions(array( + 'baseinstalldir' => '/', + 'simpleoutput' => true, + 'packagedirectory' => './', + 'filelistgenerator' => 'file', + 'ignore' => array('generatePackage.php', 'xhprof_lib/*'), + 'dir_roles' => array( + 'tests' => 'test', + 'examples' => 'doc' + ), + 'exceptions' => array('README.md' => 'doc'), +)); + +$packagexml->setPackage('Predict'); +$packagexml->setSummary('A partial port of the Gpredict program for satellite tracking'); +$packagexml->setDescription( + 'Predict is a partial PHP port of the Gpredict (http://gpredict.oz9aec.net/) program that ' + . 'allows real-time tracking and orbit prediction of satellites from two line element sets. ' + . 'It supports the SGP4 and SDP4 models for prediction.' +); + +$packagexml->setChannel('shupp.github.com/pirum'); +$packagexml->setAPIVersion('0.2.2'); +$packagexml->setReleaseVersion('0.2.2'); + +$packagexml->setReleaseStability('alpha'); + +$packagexml->setAPIStability('alpha'); + +$packagexml->setNotes(' +* Addec Predict_TLE::createChecksum() +* Updates to examples +'); +$packagexml->setPackageType('php'); +$packagexml->addRelease(); + +$packagexml->detectDependencies(); + +$packagexml->addMaintainer('lead', + 'shupp', + 'Bill Shupp', + 'shupp@php.net'); +$packagexml->setLicense('GPL v2.1', + 'http://www.opensource.org/licenses/gpl-license.php'); + +$packagexml->setPhpDep('5.2.0'); +$packagexml->setPearinstallerDep('1.4.0b1'); +$packagexml->addExtensionDep('required', 'date'); + +$packagexml->generateContents(); +$packagexml->writePackageFile(); + +?> diff --git a/predict/index.html b/predict/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/predict/package.xml b/predict/package.xml new file mode 100644 index 000000000..783eb5477 --- /dev/null +++ b/predict/package.xml @@ -0,0 +1,182 @@ + + + Predict + shupp.github.com/pirum + A partial port of the Gpredict program for satellite tracking + Predict is a partial PHP port of the Gpredict (http://gpredict.oz9aec.net/) program that allows real-time tracking and orbit prediction of satellites from two line element sets. It supports the SGP4 and SDP4 models for prediction. + + Bill Shupp + shupp + shupp@php.net + yes + + 2014-03-06 + + + 0.2.2 + 0.2.2 + + + alpha + alpha + + GPL v2.1 + +* Addec Predict_TLE::createChecksum() +* Updates to examples + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.2.0 + + + 1.4.0b1 + + + date + + + + + + + + 0.1.0 + 0.1.0 + + + alpha + alpha + + 2011-08-22 + GPL v2.1 + +* Initial release + + + + + 0.1.1 + 0.1.1 + + + alpha + alpha + + 2011-09-05 + GPL v2.1 + +* Fixed minimum elevation bug in visible pass detection +* Updated precision of Pogson's Ratio, refactored calculate magnitude to be more readble, as well as added comments + + + + + 0.1.2 + 0.1.2 + + + alpha + alpha + + 2011-09-25 + GPL v2.1 + +* Added Predict_Time::getEpochTimeStamp() + + + + + 0.2.0 + 0.2.0 + + + alpha + alpha + + 2012-05-21 + GPL v2.1 + +* Fixed bug in Predict_Time::unix2daynum() +* Updated example iss.tle file + + + + + 0.2.1 + 0.2.1 + + + alpha + alpha + + 2012-07-04 + GPL v2.1 + +* Corrected role of README.md + + + + + 0.2.2 + 0.2.2 + + + alpha + alpha + + 2014-03-06 + GPL v2.1 + +* Addec Predict_TLE::createChecksum() +* Updates to examples + + + +