@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['airport'])) { |
| 6 | - header('Location: '.$globalURL.'/airport'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/airport'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | function drawChart() { |
| 65 | 65 | var data = google.visualization.arrayToDataTable([ |
| 66 | 66 | ["'._("Country").'", "'._("# of times").'"], '; |
| 67 | - $country_data = ''; |
|
| 67 | + $country_data = ''; |
|
| 68 | 68 | foreach($airport_country_array as $airport_item) |
| 69 | 69 | { |
| 70 | 70 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -75,46 +75,46 @@ discard block |
||
| 75 | 75 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 76 | 76 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 77 | 77 | <?php |
| 78 | - if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
|
| 78 | + if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
|
| 79 | 79 | ?> |
| 80 | 80 | <script src="http://maps.google.com/maps/api/js?v=3&key=<?php print $globalGoogleAPIKey; ?>"></script> |
| 81 | 81 | <script src="<?php print $globalURL; ?>/js/leaflet-Google.js"></script> |
| 82 | 82 | <?php |
| 83 | - } |
|
| 83 | + } |
|
| 84 | 84 | ?> |
| 85 | 85 | <?php |
| 86 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
| 86 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
| 87 | 87 | ?> |
| 88 | 88 | <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script> |
| 89 | 89 | <script src="<?php print $globalURL; ?>/js/leaflet-Bing.js"></script> |
| 90 | 90 | <?php |
| 91 | - } |
|
| 91 | + } |
|
| 92 | 92 | ?> |
| 93 | 93 | <?php |
| 94 | - if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Roadmap' || $MapType == 'MapQuest-Aerial')) { |
|
| 94 | + if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Roadmap' || $MapType == 'MapQuest-Aerial')) { |
|
| 95 | 95 | ?> |
| 96 | 96 | <!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>--> |
| 97 | 97 | <script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script> |
| 98 | 98 | <?php |
| 99 | - } |
|
| 99 | + } |
|
| 100 | 100 | ?> |
| 101 | 101 | <?php |
| 102 | - if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
|
| 102 | + if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
|
| 103 | 103 | ?> |
| 104 | 104 | <script src="<?php print $globalURL; ?>/js/leaflet-Here.js"></script> |
| 105 | 105 | <?php |
| 106 | - } |
|
| 106 | + } |
|
| 107 | 107 | ?> |
| 108 | 108 | <?php |
| 109 | - if ($MapType == 'Yandex') { |
|
| 109 | + if ($MapType == 'Yandex') { |
|
| 110 | 110 | ?> |
| 111 | 111 | <script src="http://api-maps.yandex.ru/2.0/?load=package.map&lang=en_US" type="text/javascript"></script> |
| 112 | 112 | <script src="<?php print $globalURL; ?>/js/leaflet-Yandex.js"></script> |
| 113 | 113 | <?php |
| 114 | - } |
|
| 114 | + } |
|
| 115 | 115 | ?> |
| 116 | 116 | <?php |
| 117 | - if (isset($_POST['archive'])) { |
|
| 117 | + if (isset($_POST['archive'])) { |
|
| 118 | 118 | ?> |
| 119 | 119 | <?php |
| 120 | 120 | if (isset($globalBeta) && $globalBeta) { |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | ?> |
| 132 | 132 | <?php |
| 133 | - } else { |
|
| 133 | + } else { |
|
| 134 | 134 | ?> |
| 135 | 135 | <?php |
| 136 | 136 | if (isset($globalBeta) && $globalBeta) { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | ?> |
| 147 | 147 | <?php |
| 148 | - } |
|
| 148 | + } |
|
| 149 | 149 | } |
| 150 | 150 | ?> |
| 151 | 151 | <?php |
@@ -229,23 +229,23 @@ discard block |
||
| 229 | 229 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
| 230 | 230 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
| 231 | 231 | <?php |
| 232 | - if ($globalACARS) { |
|
| 233 | - if (isset($globalDemo) && $globalDemo) { |
|
| 234 | - ?> |
|
| 232 | + if ($globalACARS) { |
|
| 233 | + if (isset($globalDemo) && $globalDemo) { |
|
| 234 | + ?> |
|
| 235 | 235 | <li><hr /></li> |
| 236 | 236 | <li><i>_('ACARS data not available publicly'); ?></i></li> |
| 237 | 237 | <li><a href="">_('Latest ACARS messages'); ?></a></li> |
| 238 | 238 | <li><a href="">_('Archive ACARS messages'); ?></a></li> |
| 239 | 239 | <?php |
| 240 | - } else { |
|
| 241 | - ?> |
|
| 240 | + } else { |
|
| 241 | + ?> |
|
| 242 | 242 | <li><hr /></li> |
| 243 | 243 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
| 244 | 244 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
| 245 | 245 | <?php |
| 246 | - } |
|
| 247 | - } |
|
| 248 | - ?> |
|
| 246 | + } |
|
| 247 | + } |
|
| 248 | + ?> |
|
| 249 | 249 | <li><hr /></li> |
| 250 | 250 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
| 251 | 251 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
@@ -287,14 +287,14 @@ discard block |
||
| 287 | 287 | <form> |
| 288 | 288 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
| 289 | 289 | <?php |
| 290 | - $Language = new Language(); |
|
| 291 | - $alllang = $Language->getLanguages(); |
|
| 292 | - foreach ($alllang as $key => $lang) { |
|
| 293 | - print '<option value="'.$key.'"'; |
|
| 294 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 295 | - print '>'.$lang[0].'</option>'; |
|
| 296 | - } |
|
| 297 | - ?> |
|
| 290 | + $Language = new Language(); |
|
| 291 | + $alllang = $Language->getLanguages(); |
|
| 292 | + foreach ($alllang as $key => $lang) { |
|
| 293 | + print '<option value="'.$key.'"'; |
|
| 294 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 295 | + print '>'.$lang[0].'</option>'; |
|
| 296 | + } |
|
| 297 | + ?> |
|
| 298 | 298 | </select> |
| 299 | 299 | </form> |
| 300 | 300 | </div> |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | } |
| 331 | 331 | if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
| 332 | 332 | { |
| 333 | - ?> |
|
| 333 | + ?> |
|
| 334 | 334 | <div class="top-header clear" role="main"> |
| 335 | 335 | <div id="map"></div> |
| 336 | 336 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
@@ -341,15 +341,15 @@ discard block |
||
| 341 | 341 | var zoom = 13; |
| 342 | 342 | //create the map |
| 343 | 343 | <?php |
| 344 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 344 | + if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 345 | 345 | ?> |
| 346 | 346 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 347 | 347 | <?php |
| 348 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 348 | + } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 349 | 349 | ?> |
| 350 | 350 | map = L.map('map', { zoomControl:true }); |
| 351 | 351 | <?php |
| 352 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 352 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 353 | 353 | ?> |
| 354 | 354 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 355 | 355 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -357,22 +357,22 @@ discard block |
||
| 357 | 357 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 358 | 358 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 359 | 359 | <?php |
| 360 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 360 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 361 | 361 | ?> |
| 362 | 362 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 363 | 363 | <?php |
| 364 | - } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 364 | + } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 365 | 365 | ?> |
| 366 | 366 | map = L.map('map', { zoomControl:true }); |
| 367 | 367 | <?php |
| 368 | - } |
|
| 368 | + } |
|
| 369 | 369 | ?> |
| 370 | 370 | //initialize the layer group for the aircrft markers |
| 371 | 371 | var layer_data = L.layerGroup(); |
| 372 | 372 | |
| 373 | 373 | //a few title layers |
| 374 | 374 | <?php |
| 375 | - if ($globalMapProvider == 'Mapbox') { |
|
| 375 | + if ($globalMapProvider == 'Mapbox') { |
|
| 376 | 376 | ?> |
| 377 | 377 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 378 | 378 | maxZoom: 18, |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | token : '<?php print $globalMapboxToken; ?>' |
| 384 | 384 | }).addTo(map); |
| 385 | 385 | <?php |
| 386 | - } elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 386 | + } elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 387 | 387 | ?> |
| 388 | 388 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 389 | 389 | maxZoom: 18, |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>' |
| 392 | 392 | }).addTo(map); |
| 393 | 393 | <?php |
| 394 | - } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 394 | + } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 395 | 395 | ?> |
| 396 | 396 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
| 397 | 397 | maxZoom: 18, |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
| 401 | 401 | }).addTo(map); |
| 402 | 402 | <?php |
| 403 | - } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 403 | + } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 404 | 404 | ?> |
| 405 | 405 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
| 406 | 406 | maxZoom: 18, |
@@ -409,27 +409,27 @@ discard block |
||
| 409 | 409 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"' |
| 410 | 410 | }).addTo(map); |
| 411 | 411 | <?php |
| 412 | - } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 412 | + } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 413 | 413 | ?> |
| 414 | 414 | var googleLayer = new L.Google('ROADMAP'); |
| 415 | 415 | map.addLayer(googleLayer); |
| 416 | 416 | <?php |
| 417 | - } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 417 | + } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 418 | 418 | ?> |
| 419 | 419 | var googleLayer = new L.Google('SATELLITE'); |
| 420 | 420 | map.addLayer(googleLayer); |
| 421 | 421 | <?php |
| 422 | - } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 422 | + } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 423 | 423 | ?> |
| 424 | 424 | var googleLayer = new L.Google('HYBRID'); |
| 425 | 425 | map.addLayer(googleLayer); |
| 426 | 426 | <?php |
| 427 | - } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 427 | + } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 428 | 428 | ?> |
| 429 | 429 | var googleLayer = new L.Google('Terrain'); |
| 430 | 430 | map.addLayer(googleLayer); |
| 431 | 431 | <?php |
| 432 | - } |
|
| 432 | + } |
|
| 433 | 433 | ?> |
| 434 | 434 | </script> |
| 435 | 435 | </div> |
@@ -4,55 +4,55 @@ |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | 6 | if (isset($_GET['start_date'])) { |
| 7 | - //for the date manipulation into the query |
|
| 8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 9 | - $start_date = $_GET['start_date'].":00"; |
|
| 10 | - $end_date = $_GET['end_date'].":00"; |
|
| 11 | - $sql_date = $start_date.",".$end_date; |
|
| 12 | - } else if($_GET['start_date'] != ""){ |
|
| 13 | - $start_date = $_GET['start_date'].":00"; |
|
| 14 | - $sql_date = $start_date; |
|
| 15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 16 | - $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
| 17 | - $sql_date = $end_date; |
|
| 18 | - } else $sql_date = ''; |
|
| 7 | + //for the date manipulation into the query |
|
| 8 | + if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 9 | + $start_date = $_GET['start_date'].":00"; |
|
| 10 | + $end_date = $_GET['end_date'].":00"; |
|
| 11 | + $sql_date = $start_date.",".$end_date; |
|
| 12 | + } else if($_GET['start_date'] != ""){ |
|
| 13 | + $start_date = $_GET['start_date'].":00"; |
|
| 14 | + $sql_date = $start_date; |
|
| 15 | + } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 16 | + $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
| 17 | + $sql_date = $end_date; |
|
| 18 | + } else $sql_date = ''; |
|
| 19 | 19 | } else $sql_date = ''; |
| 20 | 20 | |
| 21 | 21 | if (isset($_GET['highest_altitude'])) { |
| 22 | - //for altitude manipulation |
|
| 23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 24 | - $end_altitude = $_GET['highest_altitude']; |
|
| 25 | - $start_altitude = $_GET['lowest_altitude']; |
|
| 26 | - $sql_altitude = $start_altitude.",".$end_altitude; |
|
| 27 | - } else if($_GET['highest_altitude'] != ""){ |
|
| 28 | - $end_altitude = $_GET['highest_altitude']; |
|
| 29 | - $sql_altitude = $end_altitude; |
|
| 30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 31 | - $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
| 32 | - $sql_altitude = $start_altitude; |
|
| 33 | - } else $sql_altitude = ''; |
|
| 22 | + //for altitude manipulation |
|
| 23 | + if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 24 | + $end_altitude = $_GET['highest_altitude']; |
|
| 25 | + $start_altitude = $_GET['lowest_altitude']; |
|
| 26 | + $sql_altitude = $start_altitude.",".$end_altitude; |
|
| 27 | + } else if($_GET['highest_altitude'] != ""){ |
|
| 28 | + $end_altitude = $_GET['highest_altitude']; |
|
| 29 | + $sql_altitude = $end_altitude; |
|
| 30 | + } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 31 | + $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
| 32 | + $sql_altitude = $start_altitude; |
|
| 33 | + } else $sql_altitude = ''; |
|
| 34 | 34 | } else $sql_altitude = ''; |
| 35 | 35 | |
| 36 | 36 | //calculuation for the pagination |
| 37 | 37 | if(!isset($_GET['limit'])) |
| 38 | 38 | { |
| 39 | - if (!isset($_GET['number_results'])) |
|
| 40 | - { |
|
| 41 | - $limit_start = 0; |
|
| 42 | - $limit_end = 25; |
|
| 43 | - $absolute_difference = 25; |
|
| 44 | - } else { |
|
| 45 | - if ($_GET['number_results'] > 1000){ |
|
| 46 | - $_GET['number_results'] = 1000; |
|
| 47 | - } |
|
| 48 | - $limit_start = 0; |
|
| 49 | - $limit_end = $_GET['number_results']; |
|
| 50 | - $absolute_difference = $_GET['number_results']; |
|
| 51 | - } |
|
| 39 | + if (!isset($_GET['number_results'])) |
|
| 40 | + { |
|
| 41 | + $limit_start = 0; |
|
| 42 | + $limit_end = 25; |
|
| 43 | + $absolute_difference = 25; |
|
| 44 | + } else { |
|
| 45 | + if ($_GET['number_results'] > 1000){ |
|
| 46 | + $_GET['number_results'] = 1000; |
|
| 47 | + } |
|
| 48 | + $limit_start = 0; |
|
| 49 | + $limit_end = $_GET['number_results']; |
|
| 50 | + $absolute_difference = $_GET['number_results']; |
|
| 51 | + } |
|
| 52 | 52 | } else { |
| 53 | - $limit_explode = explode(",", $_GET['limit']); |
|
| 54 | - $limit_start = $limit_explode[0]; |
|
| 55 | - $limit_end = $limit_explode[1]; |
|
| 53 | + $limit_explode = explode(",", $_GET['limit']); |
|
| 54 | + $limit_start = $limit_explode[0]; |
|
| 55 | + $limit_end = $limit_explode[1]; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | $absolute_difference = abs($limit_start - $limit_end); |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['airport'])) { |
| 6 | - header('Location: '.$globalURL.'/airport'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/airport'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 6 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -6,706 +6,706 @@ |
||
| 6 | 6 | class NOTAM { |
| 7 | 7 | public $db; |
| 8 | 8 | private $abbr = array( |
| 9 | - 'A/A' => 'Air-to-air', |
|
| 10 | - 'A/G' => 'Air-to-ground', |
|
| 11 | - 'AAL' => 'Above Aerodrome Level', |
|
| 12 | - 'ABM' => 'Abeam', |
|
| 13 | - 'ABN' => 'Aerodrome Beacon', |
|
| 14 | - 'ABT' => 'About', |
|
| 15 | - 'ABV' => 'Above', |
|
| 16 | - 'ACC' => 'Area Control', |
|
| 17 | - 'ACFT' => 'Aircraft', |
|
| 18 | - 'ACK' => 'Acknowledge', |
|
| 19 | - 'ACL' => 'Altimeter Check Location', |
|
| 20 | - 'ACN' => 'Aircraft Classification Number', |
|
| 21 | - 'ACPT' => 'Accepted', |
|
| 22 | - 'ACT' => 'Active', |
|
| 23 | - 'AD' => 'Aerodrome', |
|
| 24 | - 'ADA' => 'Advisory Area', |
|
| 25 | - 'ADC' => 'Aerodrome Chart', |
|
| 26 | - 'ADDN' => 'Additional', |
|
| 27 | - 'ADJ' => 'Adjacent', |
|
| 28 | - 'ADR' => 'Advisory Route', |
|
| 29 | - 'ADS' => 'Automatic Dependent Surveillance', |
|
| 30 | - 'ADVS' => 'Advisory Service', |
|
| 31 | - 'ADZ' => 'Advised', |
|
| 32 | - 'AFIL' => 'Flight Plan Filed In The Air', |
|
| 33 | - 'AFM' => 'Affirm', |
|
| 34 | - 'AFT' => 'After', |
|
| 35 | - 'AGA' => 'Aerodromes, Air Routes and Ground Aids', |
|
| 36 | - 'AGN' => 'Again', |
|
| 37 | - 'ALERFA' => 'Alert Phase', |
|
| 38 | - 'ALRS' => 'Alerting Service', |
|
| 39 | - 'ALS' => 'Approach Lighting System', |
|
| 40 | - 'ALT' => 'Altitude', |
|
| 41 | - 'ALTN' => 'Alternate', |
|
| 42 | - 'AMA' => 'Area Minimum Altitude', |
|
| 43 | - 'ANC' => 'Aeronautical Chart', |
|
| 44 | - 'ANCS' => 'Aeronautical Navigation Chart', |
|
| 45 | - 'ANS' => 'Answer', |
|
| 46 | - 'AOC' => 'Aerodrome Obstacle Chart', |
|
| 47 | - 'AP' => 'Airport', |
|
| 48 | - 'APCH' => 'Approach', |
|
| 49 | - 'APDC' => 'Aircraft Parking/docking Chart', |
|
| 50 | - 'APN' => 'Apron', |
|
| 51 | - 'APNS' => 'Aprons', |
|
| 52 | - 'APP' => 'Approach Control', |
|
| 53 | - 'APR' => 'April', |
|
| 54 | - 'APRX' => 'Approximately', |
|
| 55 | - 'APSG' => 'After Passing', |
|
| 56 | - 'APV' => 'Approved', |
|
| 57 | - 'ARC' => 'Area Chart', |
|
| 58 | - 'ARNG' => 'Arrange', |
|
| 59 | - 'ARO' => 'Air Traffic Services Reporting Office', |
|
| 60 | - 'ARP' => 'Aerodrome Reference Point', |
|
| 61 | - 'ARR' => 'Arriving', |
|
| 62 | - 'ARST' => 'Arresting', |
|
| 63 | - 'ASC' => 'Ascend To', |
|
| 64 | - 'ASDA' => 'Accelerate-Stop Distance Available', |
|
| 65 | - 'ASPEEDG' => 'Airspeed Gain', |
|
| 66 | - 'ASPEEDL' => 'Airspeed Loss', |
|
| 67 | - 'ASPH' => 'Asphalt', |
|
| 68 | - 'ATA' => 'Actual Time of Arrival', |
|
| 69 | - 'ATD' => 'Actual Time of Departure', |
|
| 70 | - 'ATFM' => 'Air Traffic Flow Management', |
|
| 71 | - 'ATM' => 'Air Traffic Management', |
|
| 72 | - 'ATP' => 'At', |
|
| 73 | - 'ATTN' => 'Attention', |
|
| 74 | - 'ATZ' => 'Aerodrome Traffic Zone', |
|
| 75 | - 'AUG' => 'August', |
|
| 76 | - 'AUTH' => 'Authorization', |
|
| 77 | - 'AUW' => 'All Up Weight', |
|
| 78 | - 'AUX' => 'Auxiliary', |
|
| 79 | - 'AVBL' => 'Available', |
|
| 80 | - 'AVG' => 'Average', |
|
| 81 | - 'AVGAS' => 'Aviation Gasoline', |
|
| 82 | - 'AWTA' => 'Advise At What Time Able', |
|
| 83 | - 'AWY' => 'Airway', |
|
| 84 | - 'AWYS' => 'Airways', |
|
| 85 | - 'AZM' => 'Azimuth', |
|
| 86 | - 'BA' => 'Braking Action', |
|
| 87 | - 'BCN' => 'Beacon', |
|
| 88 | - 'BCST' => 'Broadcast', |
|
| 89 | - 'BDRY' => 'Boundary', |
|
| 90 | - 'BFR' => 'Before', |
|
| 91 | - 'BLDG' => 'Building', |
|
| 92 | - 'BLO' => 'Below Clouds', |
|
| 93 | - 'BLW' => 'Below', |
|
| 94 | - 'BRF' => 'Short', |
|
| 95 | - 'BRG' => 'Bearing', |
|
| 96 | - 'BRKG' => 'Breaking', |
|
| 97 | - 'BTL' => 'Between Layers', |
|
| 98 | - 'BTN' => 'Between', |
|
| 99 | - 'CD' => 'Candela', |
|
| 100 | - 'CDN' => 'Coordination', |
|
| 101 | - 'CF' => 'Change Frequency To', |
|
| 102 | - 'CFM' => 'Confirm', |
|
| 103 | - 'CGL' => 'Circling Guidance Light(s)', |
|
| 104 | - 'CH' => 'Channel', |
|
| 105 | - 'CHG' => 'Changed', |
|
| 106 | - 'CIT' => 'Near or Over Large Towns', |
|
| 107 | - 'CIV' => 'Civil', |
|
| 108 | - 'CK' => 'Check', |
|
| 109 | - 'CL' => 'Centre Line', |
|
| 110 | - 'CLBR' => 'Calibration', |
|
| 111 | - 'CLD' => 'Cloud', |
|
| 112 | - 'CLG' => 'Calling', |
|
| 113 | - 'CLIMB-OUT' => 'Climb-out Area', |
|
| 114 | - 'CLR' => 'Clearance', |
|
| 115 | - 'CLRD' => 'Cleared', |
|
| 116 | - 'CLSD' => 'Closed', |
|
| 117 | - 'CMB' => 'Climb', |
|
| 118 | - 'CMPL' => 'Complete', |
|
| 119 | - 'CNL' => 'Cancel', |
|
| 120 | - 'CNS' => 'Communications, Navigation And Surveillance', |
|
| 121 | - 'COM' => 'Communications', |
|
| 122 | - 'CONC' => 'Concrete', |
|
| 123 | - 'COND' => 'Condition', |
|
| 124 | - 'CONS' => 'Continuous', |
|
| 125 | - 'CONST' => 'Construction', |
|
| 126 | - 'CONT' => 'Continued', |
|
| 127 | - 'COOR' => 'Coordination', |
|
| 128 | - 'COORD' => 'Coordinates', |
|
| 129 | - 'COP' => 'Change-over Point', |
|
| 130 | - 'COR' => 'Correction', |
|
| 131 | - 'COT' => 'At The Coast', |
|
| 132 | - 'COV' => 'Covered', |
|
| 133 | - 'CPDLC' => 'Controller-pilot Data Link Communications', |
|
| 134 | - 'CPL' => 'Current Flight Plan', |
|
| 135 | - 'CRC' => 'Cyclic Redundancy Check', |
|
| 136 | - 'CRZ' => 'Cruise', |
|
| 137 | - 'CTAM' => 'Climb To And Maintain', |
|
| 138 | - 'CTC' => 'Contact', |
|
| 139 | - 'CTL' => 'Control', |
|
| 140 | - 'CTN' => 'Caution', |
|
| 141 | - 'CTR' => 'Control Zone', |
|
| 142 | - 'CVR' => 'Cockpit Voice Recorder', |
|
| 143 | - 'CW' => 'Continuous Wave', |
|
| 144 | - 'CWY' => 'Clearway', |
|
| 145 | - 'DA' => 'Decision Altitude', |
|
| 146 | - 'DCKG' => 'Docking', |
|
| 147 | - 'DCP' => 'Datum Crossing Point', |
|
| 148 | - 'DCPC' => 'Direct Controller-pilot Communications', |
|
| 149 | - 'DCT' => 'Direct', |
|
| 150 | - 'DEC' => 'December', |
|
| 151 | - 'DEG' => 'Degrees', |
|
| 152 | - 'DEP' => 'Departing', |
|
| 153 | - 'DES' => 'Descend', |
|
| 154 | - 'DEST' => 'Destination', |
|
| 155 | - 'DETRESFA' => 'Distress Phase', |
|
| 156 | - 'DEV' => 'Deviating', |
|
| 157 | - 'DFDR' => 'Digital Flight Data Recorder', |
|
| 158 | - 'DFTI' => 'Distance From Touchdown Indicator', |
|
| 159 | - 'DH' => 'Decision Height', |
|
| 160 | - 'DIP' => 'Diffuse', |
|
| 161 | - 'DIST' => 'Distance', |
|
| 162 | - 'DIV' => 'Divert', |
|
| 163 | - 'DLA' => 'Delay', |
|
| 164 | - 'DLY' => 'Daily', |
|
| 165 | - 'DNG' => 'Dangerous', |
|
| 166 | - 'DOM' => 'Domestic', |
|
| 167 | - 'DPT' => 'Depth', |
|
| 168 | - 'DR' => 'Dead Reckoning', |
|
| 169 | - 'DRG' => 'During', |
|
| 170 | - 'DTAM' => 'Descend To And Maintain', |
|
| 171 | - 'DTG' => 'Date-time Group', |
|
| 172 | - 'DTHR' => 'Displaced Runway Threshold', |
|
| 173 | - 'DTRT' => 'Deteriorating', |
|
| 174 | - 'DTW' => 'Dual Tandem Wheels', |
|
| 175 | - 'DUPE' => 'This Is A Duplicate Message', |
|
| 176 | - 'DUR' => 'Duration', |
|
| 177 | - 'DVOR' => 'Doppler VOR', |
|
| 178 | - 'DW' => 'Dual Wheels', |
|
| 179 | - 'EAT' => 'Expected Approach Time', |
|
| 180 | - 'EB' => 'Eastbound', |
|
| 181 | - 'EDA' => 'Elevation Differential Area', |
|
| 182 | - 'EET' => 'Estimated Elapsed Time', |
|
| 183 | - 'EFC' => 'Expect Further Clearance', |
|
| 184 | - 'ELBA' => 'Emergency Location Beacon', |
|
| 185 | - 'ELEV' => 'Elevation', |
|
| 186 | - 'ELR' => 'Extra Long Range', |
|
| 187 | - 'EM' => 'Emission', |
|
| 188 | - 'EMERG' => 'Emergency', |
|
| 189 | - 'END' => 'Stop-end', |
|
| 190 | - 'ENE' => 'East-north-east', |
|
| 191 | - 'ENG' => 'Engine', |
|
| 192 | - 'ENR' => 'En-route', |
|
| 193 | - 'ENRC' => 'En-route Chart', |
|
| 194 | - 'EOBT' => 'Estimated Off-block Time', |
|
| 195 | - 'EQPT' => 'Equipment', |
|
| 196 | - 'ER' => 'Here', |
|
| 197 | - 'ESE' => 'East-south-east', |
|
| 198 | - 'EST' => 'Estimate', |
|
| 199 | - 'ETA' => 'Estimated Time Of Arrival', |
|
| 200 | - 'ETD' => 'Estimated Time Of Departure', |
|
| 201 | - 'ETO' => 'Estimated Time Over Significant Point', |
|
| 202 | - 'EV' => 'Every', |
|
| 203 | - 'EXC' => 'Except', |
|
| 204 | - 'EXER' => 'Exercise', |
|
| 205 | - 'EXP' => 'Expect', |
|
| 206 | - 'EXTD' => 'Extend', |
|
| 207 | - 'FAC' => 'Facilities', |
|
| 208 | - 'FAF' => 'Final Approach Fix', |
|
| 209 | - 'FAL' => 'Facilitation of International Airtransport', |
|
| 210 | - 'FAP' => 'Final Approach Point', |
|
| 211 | - 'FATO' => 'Final Approach And Take-off Area', |
|
| 212 | - 'FAX' => 'Fax', |
|
| 213 | - 'FBL' => 'Light', |
|
| 214 | - 'FCST' => 'Forecast', |
|
| 215 | - 'FCT' => 'Friction Coefficient', |
|
| 216 | - 'FDPS' => 'Flight Data Processing System', |
|
| 217 | - 'FEB' => 'February', |
|
| 218 | - 'FLD' => 'Field', |
|
| 219 | - 'FLG' => 'Flashing', |
|
| 220 | - 'FLR' => 'Flares', |
|
| 221 | - 'FLT' => 'Flight', |
|
| 222 | - 'FLTS' => 'Flights', |
|
| 223 | - 'FLTCK' => 'Flight Check', |
|
| 224 | - 'FLUC' => 'Fluctuating', |
|
| 225 | - 'FLW' => 'Follow(s)', |
|
| 226 | - 'FLY' => 'Fly', |
|
| 227 | - 'FM' => 'From', |
|
| 228 | - 'FMS' => 'Flight Management System', |
|
| 229 | - 'FMU' => 'Flow Management Unit', |
|
| 230 | - 'FNA' => 'Final Approach', |
|
| 231 | - 'FPAP' => 'Flight Path Alignment Point', |
|
| 232 | - 'FPL' => 'Flight Plan', |
|
| 233 | - 'FPLS' => 'Flight Plans', |
|
| 234 | - 'FPM' => 'Feet Per Minute', |
|
| 235 | - 'FPR' => 'Flight Plan Route', |
|
| 236 | - 'FR' => 'Fuel Remaining', |
|
| 237 | - 'FREQ' => 'Frequency', |
|
| 238 | - 'FRI' => 'Friday', |
|
| 239 | - 'FRNG' => 'Firing', |
|
| 240 | - 'FRONT' => 'Front', |
|
| 241 | - 'FRQ' => 'Frequent', |
|
| 242 | - 'FSL' => 'Full Stop Landing', |
|
| 243 | - 'FSS' => 'Flight Service Station', |
|
| 244 | - 'FST' => 'First', |
|
| 245 | - 'FTP' => 'Fictitious Threshold Point', |
|
| 246 | - 'G/A' => 'Ground-to-air', |
|
| 247 | - 'G/A/G' => 'Ground-to-air and Air-to-ground', |
|
| 248 | - 'GARP' => 'GBAS Azimuth Reference Point', |
|
| 249 | - 'GBAS' => 'Ground-based Augmentation System', |
|
| 250 | - 'GCAJ' => 'Ground Controlled Approach', |
|
| 251 | - 'GEN' => 'General', |
|
| 252 | - 'GEO' => 'Geographic or True', |
|
| 253 | - 'GES' => 'Ground Earth Station', |
|
| 254 | - 'GLD' => 'Glider', |
|
| 255 | - 'GMC' => 'Ground Movement Chart', |
|
| 256 | - 'GND' => 'Ground', |
|
| 257 | - 'GNDCK' => 'Ground Check', |
|
| 258 | - 'GP' => 'Glide Path', |
|
| 259 | - 'GRASS' => 'Grass landing area', |
|
| 260 | - 'GRVL' => 'Gravel', |
|
| 261 | - 'GUND' => 'Geoid Undulation', |
|
| 262 | - 'H24' => '24 Hours', |
|
| 263 | - 'HAPI' => 'Helicopter Approach Path Indicator', |
|
| 264 | - 'HBN' => 'Hazard Beacon', |
|
| 265 | - 'HDG' => 'Heading', |
|
| 266 | - 'HEL' => 'Helicopter', |
|
| 267 | - 'HGT' => 'Height', |
|
| 268 | - 'HJ' => 'Sunrise to Sunset', |
|
| 269 | - 'HLDG' => 'Holding', |
|
| 270 | - 'HN' => 'Sunset to Sunrise', |
|
| 271 | - 'HO' => 'Service Available To Meet Operational Requirements', |
|
| 272 | - 'HOL' => 'Holiday', |
|
| 273 | - 'HOSP' => 'Hospital Aircraft', |
|
| 274 | - 'HOT' => 'Height', |
|
| 275 | - 'HPA' => 'Hectopascal', |
|
| 276 | - 'HR' => 'Hours', |
|
| 277 | - 'HRS' => 'Hours', |
|
| 278 | - 'HS' => 'Service Available During Hours Of Scheduled Operations', |
|
| 279 | - 'HURCN' => 'Hurricane', |
|
| 280 | - 'HVY' => 'Heavy', |
|
| 281 | - 'HX' => 'No Specific Working Hours', |
|
| 282 | - 'HYR' => 'Higher', |
|
| 283 | - 'IAC' => 'Instrument Approach Chart', |
|
| 284 | - 'IAF' => 'Initial Approach Fix', |
|
| 285 | - 'IAO' => 'In And Out Of Clouds', |
|
| 286 | - 'IAP' => 'Instrument Approach Procedure', |
|
| 287 | - 'IAR' => 'Intersection Of Air Routes', |
|
| 288 | - 'IBN' => 'Identification Beacon', |
|
| 289 | - 'ID' => 'Identifier', |
|
| 290 | - 'IDENT' => 'Identification', |
|
| 291 | - 'IFF' => 'Identification Friend/Foe', |
|
| 292 | - 'IGA' => 'International General Aviation', |
|
| 293 | - 'IM' => 'Inner Marker', |
|
| 294 | - 'IMPR' => 'Improving', |
|
| 295 | - 'IMT' => 'Immediately', |
|
| 296 | - 'INA' => 'Initial Approach', |
|
| 297 | - 'INBD' => 'Inbound', |
|
| 298 | - 'INCERFA' => 'Uncertainty Phase', |
|
| 299 | - 'INFO' => 'Information', |
|
| 300 | - 'INOP' => 'Inoperative', |
|
| 301 | - 'INP' => 'If Not Possible', |
|
| 302 | - 'INPR' => 'In Progress', |
|
| 303 | - 'INSTL' => 'Installation', |
|
| 304 | - 'INSTR' => 'Instrument', |
|
| 305 | - 'INT' => 'Intersection', |
|
| 306 | - 'INTS' => 'Intersections', |
|
| 307 | - 'INTL' => 'International', |
|
| 308 | - 'INTRG' => 'Interrogator', |
|
| 309 | - 'INTRP' => 'Interruption', |
|
| 310 | - 'INTSF' => 'Intensifying', |
|
| 311 | - 'INTST' => 'Intensity', |
|
| 312 | - 'ISA' => 'International Standard Atmosphere', |
|
| 313 | - 'JAN' => 'January', |
|
| 314 | - 'JTST' => 'Jet stream', |
|
| 315 | - 'JUL' => 'July', |
|
| 316 | - 'JUN' => 'June', |
|
| 317 | - 'KMH' => 'Kilometres Per Hour', |
|
| 318 | - 'KPA' => 'Kilopascal', |
|
| 319 | - 'KT' => 'Knots', |
|
| 320 | - 'KW' => 'Kilowatts', |
|
| 321 | - 'LAN' => 'Inland', |
|
| 322 | - 'LAT' => 'Latitude', |
|
| 323 | - 'LDA' => 'Landing Distance Available', |
|
| 324 | - 'LDAH' => 'Landing Distance Available, Helicopter', |
|
| 325 | - 'LDG' => 'Landing', |
|
| 326 | - 'LDI' => 'Landing Direction Indicator', |
|
| 327 | - 'LEN' => 'Length', |
|
| 328 | - 'LGT' => 'Lighting', |
|
| 329 | - 'LGTD' => 'Lighted', |
|
| 330 | - 'LIH' => 'Light Intensity High', |
|
| 331 | - 'LIL' => 'Light Intensity Low', |
|
| 332 | - 'LIM' => 'Light Intensity Medium', |
|
| 333 | - 'LLZ' => 'Localizer', |
|
| 334 | - 'LM' => 'Locator, Middle', |
|
| 335 | - 'LMT' => 'Local Mean Time', |
|
| 336 | - 'LNG' => 'Long', |
|
| 337 | - 'LO' => 'Locator, Outer', |
|
| 338 | - 'LOG' => 'Located', |
|
| 339 | - 'LONG' => 'Longitude', |
|
| 340 | - 'LRG' => 'Long Range', |
|
| 341 | - 'LTD' => 'Limited', |
|
| 342 | - 'LTP' => 'Landing Threshold Point', |
|
| 343 | - 'LVE' => 'Leaving', |
|
| 344 | - 'LVL' => 'Level', |
|
| 345 | - 'LYR' => 'Layer', |
|
| 346 | - 'MAA' => 'Maximum Authorized Altitude', |
|
| 347 | - 'MAG' => 'Magnetic', |
|
| 348 | - 'MAINT' => 'Maintenance', |
|
| 349 | - 'MAP' => 'Aeronautical Maps and Charts', |
|
| 350 | - 'MAPT' => 'Missed Approach Point', |
|
| 351 | - 'MAR' => 'March', |
|
| 352 | - 'MAX' => 'Maximum', |
|
| 353 | - 'MAY' => 'May', |
|
| 354 | - 'MBST' => 'Microburst', |
|
| 355 | - 'MCA' => 'Minimum Crossing Altitude', |
|
| 356 | - 'MCW' => 'Modulated Continuous Wave', |
|
| 357 | - 'MDA' => 'Minimum Descent Altitude', |
|
| 358 | - 'MDH' => 'Minimum Descent Height', |
|
| 359 | - 'MEA' => 'Minimum En-route Altitude', |
|
| 360 | - 'MEHT' => 'Minimum Eye Height Over Threshold', |
|
| 361 | - 'MET' => 'Meteorological', |
|
| 362 | - 'MID' => 'Mid-point', |
|
| 363 | - 'MIL' => 'Military', |
|
| 364 | - 'MIN' => 'Minutes', |
|
| 365 | - 'MKR' => 'Marker Radio Beacon', |
|
| 366 | - 'MLS' => 'Microwave Landing System', |
|
| 367 | - 'MM' => 'Middle Marker', |
|
| 368 | - 'MNM' => 'Minimum', |
|
| 369 | - 'MNPS' => 'Minimum Navigation Performance Specifications', |
|
| 370 | - 'MNT' => 'Monitor', |
|
| 371 | - 'MNTN' => 'Maintain', |
|
| 372 | - 'MOA' => 'Military Operating Area', |
|
| 373 | - 'MOC' => 'Minimum Obstacle Clearance', |
|
| 374 | - 'MOD' => 'Moderate', |
|
| 375 | - 'MON' => 'Monday', |
|
| 376 | - 'MOPS' => 'Minimum Operational Performance Standards', |
|
| 377 | - 'MOV' => 'Movement', |
|
| 378 | - 'MRA' => 'Minimum Reception Altitude', |
|
| 379 | - 'MRG' => 'Medium Range', |
|
| 380 | - 'MRP' => 'ATS/MET Reporting Point', |
|
| 381 | - 'MS' => 'Minus', |
|
| 382 | - 'MSA' => 'Minimum Sector Altitude', |
|
| 383 | - 'MSAW' => 'Minimum Safe Altitude Warning', |
|
| 384 | - 'MSG' => 'Message', |
|
| 385 | - 'MSSR' => 'Monopulse Secondary Surveillance Radar', |
|
| 386 | - 'MT' => 'Mountain', |
|
| 387 | - 'MTU' => 'Metric Units', |
|
| 388 | - 'MTW' => 'Mountain Waves', |
|
| 389 | - 'NASC' => 'National AIS System Centre', |
|
| 390 | - 'NAT' => 'North Atlantic', |
|
| 391 | - 'NAV' => 'Navigation', |
|
| 392 | - 'NB' => 'Northbound', |
|
| 393 | - 'NBFR' => 'Not Before', |
|
| 394 | - 'NE' => 'North-east', |
|
| 395 | - 'NEB' => 'North-eastbound', |
|
| 396 | - 'NEG' => 'Negative', |
|
| 397 | - 'NGT' => 'Night', |
|
| 398 | - 'NIL' => 'None', |
|
| 399 | - 'NML' => 'Normal', |
|
| 400 | - 'NNE' => 'North-north-east', |
|
| 401 | - 'NNW' => 'North-north-west', |
|
| 402 | - 'NOF' => 'International NOTAM Office', |
|
| 403 | - 'NOV' => 'November', |
|
| 404 | - 'NOZ' => 'Normal Operating Zone', |
|
| 405 | - 'NR' => 'Number', |
|
| 406 | - 'NRH' => 'No Reply Heard', |
|
| 407 | - 'NTL' => 'National', |
|
| 408 | - 'NTZ' => 'No Transgression Zone', |
|
| 409 | - 'NW' => 'North-west', |
|
| 410 | - 'NWB' => 'North-westbound', |
|
| 411 | - 'NXT' => 'Next', |
|
| 412 | - 'O/R' => 'On Request', |
|
| 413 | - 'OAC' => 'Oceanic Area Control Centre', |
|
| 414 | - 'OAS' => 'Obstacle Assessment Surface', |
|
| 415 | - 'OBS' => 'Observe', |
|
| 416 | - 'OBST' => 'Obstacle', |
|
| 417 | - 'OBSTS' => 'Obstacles', |
|
| 418 | - 'OCA' => 'Oceanic Control Area', |
|
| 419 | - 'OCH' => 'Obstacle Clearance Height', |
|
| 420 | - 'OCS' => 'Obstacle Clearance Surface', |
|
| 421 | - 'OCT' => 'October', |
|
| 422 | - 'OFZ' => 'Obstacle Free Zone', |
|
| 423 | - 'OGN' => 'Originate', |
|
| 424 | - 'OHD' => 'Overhead', |
|
| 425 | - 'OM' => 'Outer Marker', |
|
| 426 | - 'OPC' => 'Control Indicated Is Operational Control', |
|
| 427 | - 'OPMET' => 'Operational Meteorological', |
|
| 428 | - 'OPN' => 'Open', |
|
| 429 | - 'OPR' => 'Operate', |
|
| 430 | - 'OPS' => 'Operations', |
|
| 431 | - 'ORD' => 'Order', |
|
| 432 | - 'OSV' => 'Ocean Station Vessel', |
|
| 433 | - 'OTLK' => 'Outlook', |
|
| 434 | - 'OTP' => 'On Top', |
|
| 435 | - 'OTS' => 'Organized Track System', |
|
| 436 | - 'OUBD' => 'Outbound', |
|
| 437 | - 'PA' => 'Precision Approach', |
|
| 438 | - 'PALS' => 'Precision Approach Lighting System', |
|
| 439 | - 'PANS' => 'Procedures for Air Navigation Services', |
|
| 440 | - 'PAR' => 'Precision Approach Radar', |
|
| 441 | - 'PARL' => 'Parallel', |
|
| 442 | - 'PATC' => 'Precision Approach Terrain Chart', |
|
| 443 | - 'PAX' => 'Passenger(s)', |
|
| 444 | - 'PCD' => 'Proceed', |
|
| 445 | - 'PCL' => 'Pilot-controlled Lighting', |
|
| 446 | - 'PCN' => 'Pavement Classification Number', |
|
| 447 | - 'PDC' => 'Pre-departure Clearance', |
|
| 448 | - 'PDG' => 'Procedure Design Gradient', |
|
| 449 | - 'PER' => 'Performance', |
|
| 450 | - 'PERM' => 'Permanent', |
|
| 451 | - 'PIB' => 'Pre-flight Information Bulletin', |
|
| 452 | - 'PJE' => 'Parachute Jumping Exercise', |
|
| 453 | - 'PLA' => 'Practice Low Approach', |
|
| 454 | - 'PLN' => 'Flight Plan', |
|
| 455 | - 'PLVL' => 'Present Level', |
|
| 456 | - 'PN' => 'Prior Notice Required', |
|
| 457 | - 'PNR' => 'Point Of No Return', |
|
| 458 | - 'POB' => 'Persons On Board', |
|
| 459 | - 'POSS' => 'Possible', |
|
| 460 | - 'PPI' => 'Plan Position Indicator', |
|
| 461 | - 'PPR' => 'Prior Permission Required', |
|
| 462 | - 'PPSN' => 'Present Position', |
|
| 463 | - 'PRI' => 'Primary', |
|
| 464 | - 'PRKG' => 'Parking', |
|
| 465 | - 'PROB' => 'Probability', |
|
| 466 | - 'PROC' => 'Procedure', |
|
| 467 | - 'PROV' => 'Provisional', |
|
| 468 | - 'PS' => 'Plus', |
|
| 469 | - 'PSG' => 'Passing', |
|
| 470 | - 'PSN' => 'Position', |
|
| 471 | - 'PSNS' => 'Positions', |
|
| 472 | - 'PSR' => 'Primary Surveillance Radar', |
|
| 473 | - 'PSYS' => 'Pressure System(s)', |
|
| 474 | - 'PTN' => 'Procedure Turn', |
|
| 475 | - 'PTS' => 'Polar Track Structure', |
|
| 476 | - 'PWR' => 'Power', |
|
| 477 | - 'QUAD' => 'Quadrant', |
|
| 478 | - 'RAC' => 'Rules of The Air and Air Traffic Services', |
|
| 479 | - 'RAG' => 'Runway Arresting Gear', |
|
| 480 | - 'RAI' => 'Runway Alignment Indicator', |
|
| 481 | - 'RASC' => 'Regional AIS System Centre', |
|
| 482 | - 'RASS' => 'Remote Altimeter Setting Source', |
|
| 483 | - 'RB' => 'Rescue Boat', |
|
| 484 | - 'RCA' => 'Reach Cruising Altitude', |
|
| 485 | - 'RCC' => 'Rescue Coordination Centre', |
|
| 486 | - 'RCF' => 'Radiocommunication Failure', |
|
| 487 | - 'RCH' => 'Reaching', |
|
| 488 | - 'RCL' => 'Runway Centre Line', |
|
| 489 | - 'RCLL' => 'Runway Centre Line Light(s)', |
|
| 490 | - 'RCLR' => 'Recleared', |
|
| 491 | - 'RDH' => 'Reference Datum Height', |
|
| 492 | - 'RDL' => 'Radial', |
|
| 493 | - 'RDO' => 'Radio', |
|
| 494 | - 'RE' => 'Recent', |
|
| 495 | - 'REC' => 'Receiver', |
|
| 496 | - 'REDL' => 'Runway Edge Light(s)', |
|
| 497 | - 'REF' => 'Refer To', |
|
| 498 | - 'REG' => 'Registration', |
|
| 499 | - 'RENL' => 'Runway End Light(s)', |
|
| 500 | - 'REP' => 'Report', |
|
| 501 | - 'REQ' => 'Requested', |
|
| 502 | - 'RERTE' => 'Re-route', |
|
| 503 | - 'RESA' => 'Runway End Safety Area', |
|
| 504 | - 'RG' => 'Range (lights)', |
|
| 505 | - 'RHC' => 'Right-hand Circuit', |
|
| 506 | - 'RIF' => 'Reclearance In Flight', |
|
| 507 | - 'RITE' => 'Right', |
|
| 508 | - 'RL' => 'Report Leaving', |
|
| 509 | - 'RLA' => 'Relay To', |
|
| 510 | - 'RLCE' => 'Request Level Change En Route', |
|
| 511 | - 'RLLS' => 'Runway Lead-in Lighting System', |
|
| 512 | - 'RLNA' => 'Request Level Not Available', |
|
| 513 | - 'RMAC' => 'Radar Minimum Altitude Chart', |
|
| 514 | - 'RMK' => 'Remark', |
|
| 515 | - 'RNG' => 'Radio Range', |
|
| 516 | - 'RNP' => 'Required Navigation Performance', |
|
| 517 | - 'ROC' => 'Rate Of Climb', |
|
| 518 | - 'ROD' => 'Rate Of Descent', |
|
| 519 | - 'ROFOR' => 'Route Forecast', |
|
| 520 | - 'RON' => 'Receiving Only', |
|
| 521 | - 'RPI' => 'Radar Position Indicator', |
|
| 522 | - 'RPL' => 'Repetitive Flight Plan', |
|
| 523 | - 'RPLC' => 'Replaced', |
|
| 524 | - 'RPS' => 'Radar Position Symbol', |
|
| 525 | - 'RQMNTS' => 'Requirements', |
|
| 526 | - 'RQP' => 'Request Flight Plan', |
|
| 527 | - 'RQS' => 'Request Supplementary Flight Plan', |
|
| 528 | - 'RR' => 'Report Reaching', |
|
| 529 | - 'RSC' => 'Rescue Sub-centre', |
|
| 530 | - 'RSCD' => 'Runway Surface Condition', |
|
| 531 | - 'RSP' => 'Responder Beacon', |
|
| 532 | - 'RSR' => 'En-route Surveillance Radar', |
|
| 533 | - 'RTE' => 'Route', |
|
| 534 | - 'RTES' => 'Routes', |
|
| 535 | - 'RTF' => 'Radiotelephone', |
|
| 536 | - 'RTG' => 'Radiotelegraph', |
|
| 537 | - 'RTHL' => 'Runway Threshold Light(s)', |
|
| 538 | - 'RTN' => 'Return', |
|
| 539 | - 'RTODAH' => 'Rejected Take-off Distance Available, Helicopter', |
|
| 540 | - 'RTS' => 'Return To Service', |
|
| 541 | - 'RTT' => 'Radioteletypewriter', |
|
| 542 | - 'RTZL' => 'Runway Touchdown Zone Light(s)', |
|
| 543 | - 'RUT' => 'Standard Regional Route Transmitting Frequencies', |
|
| 544 | - 'RV' => 'Rescue Vessel', |
|
| 545 | - 'RVSM' => 'Reduced Vertical Separation Minimum', |
|
| 546 | - 'RWY' => 'Runway', |
|
| 547 | - 'RWYS' => 'Runways', |
|
| 548 | - 'SALS' => 'Simple Approach Lighting System', |
|
| 549 | - 'SAN' => 'Sanitary', |
|
| 550 | - 'SAP' => 'As Soon As Possible', |
|
| 551 | - 'SAR' => 'Search and Rescue', |
|
| 552 | - 'SARPS' => 'Standards and Recommended Practices', |
|
| 553 | - 'SAT' => 'Saturday', |
|
| 554 | - 'SATCOM' => 'Satellite Communication', |
|
| 555 | - 'SB' => 'Southbound', |
|
| 556 | - 'SBAS' => 'Satellite-based Augmentation System', |
|
| 557 | - 'SDBY' => 'Stand by', |
|
| 558 | - 'SE' => 'South-east', |
|
| 559 | - 'SEA' => 'Sea', |
|
| 560 | - 'SEB' => 'South-eastbound', |
|
| 561 | - 'SEC' => 'Seconds', |
|
| 562 | - 'SECN' => 'Section', |
|
| 563 | - 'SECT' => 'Sector', |
|
| 564 | - 'SEP' => 'September', |
|
| 565 | - 'SER' => 'Service', |
|
| 566 | - 'SEV' => 'Severe', |
|
| 567 | - 'SFC' => 'Surface', |
|
| 568 | - 'SGL' => 'Signal', |
|
| 569 | - 'SID' => 'Standard Instrument Departure', |
|
| 570 | - 'SIF' => 'Selective Identification Feature', |
|
| 571 | - 'SIG' => 'Significant', |
|
| 572 | - 'SIMUL' => 'Simultaneous', |
|
| 573 | - 'SKED' => 'Schedule', |
|
| 574 | - 'SLP' => 'Speed Limiting Point', |
|
| 575 | - 'SLW' => 'Slow', |
|
| 576 | - 'SMC' => 'Surface Movement Control', |
|
| 577 | - 'SMR' => 'Surface Movement Radar', |
|
| 578 | - 'SPL' => 'Supplementary Flight Plan', |
|
| 579 | - 'SPOC' => 'SAR Point Of Contact', |
|
| 580 | - 'SPOT' => 'Spot Wind', |
|
| 581 | - 'SR' => 'Sunrise', |
|
| 582 | - 'SRA' => 'Surveillance Radar Approach', |
|
| 583 | - 'SRE' => 'Surveillance Radar Element Of Precision Approach Radar System', |
|
| 584 | - 'SRG' => 'Short Range', |
|
| 585 | - 'SRR' => 'Search and Rescue Region', |
|
| 586 | - 'SRY' => 'Secondary', |
|
| 587 | - 'SS' => 'Sunset', |
|
| 588 | - 'SSE' => 'South-south-east', |
|
| 589 | - 'SSR' => 'Secondary Surveillance Radar', |
|
| 590 | - 'SST' => 'Supersonic Transport', |
|
| 591 | - 'SSW' => 'South-south-west', |
|
| 592 | - 'STA' => 'Straight-in Approach', |
|
| 593 | - 'STAR' => 'Standard Instrument Arrival', |
|
| 594 | - 'STD' => 'Standard', |
|
| 595 | - 'STN' => 'Station', |
|
| 596 | - 'STNR' => 'Stationary', |
|
| 597 | - 'STOL' => 'Short Take-off and Landing', |
|
| 598 | - 'STS' => 'Status', |
|
| 599 | - 'STWL' => 'Stopway Light(s)', |
|
| 600 | - 'SUBJ' => 'Subject To', |
|
| 601 | - 'SUN' => 'Sunday', |
|
| 602 | - 'SUP' => 'Supplement', |
|
| 603 | - 'SUPPS' => 'Regional Supplementary Procedures Service Message', |
|
| 604 | - 'SVCBL' => 'Serviceable', |
|
| 605 | - 'SW' => 'South-west', |
|
| 606 | - 'SWB' => 'South-westbound', |
|
| 607 | - 'SWY' => 'Stopway', |
|
| 608 | - 'TA' => 'Transition Altitude', |
|
| 609 | - 'TAA' => 'Terminal Arrival Altitude', |
|
| 610 | - 'TAF' => 'Aerodrome Forecast', |
|
| 611 | - 'TAIL' => 'Tail Wind', |
|
| 612 | - 'TAR' => 'Terminal Area Surveillance Radar', |
|
| 613 | - 'TAX' => 'Taxi', |
|
| 614 | - 'TCAC' => 'Tropical Cyclone Advisory Centre', |
|
| 615 | - 'TDO' => 'Tornado', |
|
| 616 | - 'TDZ' => 'Touchdown Zone', |
|
| 617 | - 'TECR' => 'Technical Reason', |
|
| 618 | - 'TEMPO' => 'Temporarily', |
|
| 619 | - 'TFC' => 'Traffic', |
|
| 620 | - 'TGL' => 'Touch-and-go', |
|
| 621 | - 'TGS' => 'Taxiing Guidance System', |
|
| 622 | - 'THR' => 'Threshold', |
|
| 623 | - 'THRU' => 'Through', |
|
| 624 | - 'THU' => 'Thursday', |
|
| 625 | - 'TIBA' => 'Traffic Information Broadcast By Aircraft', |
|
| 626 | - 'TIL' => 'Until', |
|
| 627 | - 'TIP' => 'Until Past', |
|
| 628 | - 'TKOF' => 'Take-off', |
|
| 629 | - 'TL' => 'Till', |
|
| 630 | - 'TLOF' => 'Touchdown And Lift-off Area', |
|
| 631 | - 'TMA' => 'Terminal Control Area', |
|
| 632 | - 'TNA' => 'Turn Altitude', |
|
| 633 | - 'TNH' => 'Turn Height', |
|
| 634 | - 'TOC' => 'Top of Climb', |
|
| 635 | - 'TODA' => 'Take-off Distance Available', |
|
| 636 | - 'TODAH' => 'Take-off Distance Available, Helicopter', |
|
| 637 | - 'TORA' => 'Take-off Run Available', |
|
| 638 | - 'TP' => 'Turning Point', |
|
| 639 | - 'TR' => 'Track', |
|
| 640 | - 'TRA' => 'Temporary Reserved Airspace', |
|
| 641 | - 'TRANS' => 'Transmitter', |
|
| 642 | - 'TRL' => 'Transition Level', |
|
| 643 | - 'TUE' => 'Tuesday', |
|
| 644 | - 'TURB' => 'Turbulence', |
|
| 645 | - 'TVOR' => 'Terminal VOR', |
|
| 646 | - 'TWR' => 'Tower', |
|
| 647 | - 'TWY' => 'Taxiway', |
|
| 648 | - 'TWYL' => 'Taxiway-link', |
|
| 649 | - 'TXT' => 'Text', |
|
| 650 | - 'TYP' => 'Type of Aircraft', |
|
| 651 | - 'U/S' => 'Unserviceable', |
|
| 652 | - 'UAB' => 'Until Advised By', |
|
| 653 | - 'UAC' => 'Upper Area Control Centre', |
|
| 654 | - 'UAR' => 'Upper Air Route', |
|
| 655 | - 'UFN' => 'Until Further Notice', |
|
| 656 | - 'UHDT' => 'Unable Higher Due Traffic', |
|
| 657 | - 'UIC' => 'Upper Information Centre', |
|
| 658 | - 'UIR' => 'Upper Flight Information Region', |
|
| 659 | - 'ULR' => 'Ultra Long Range', |
|
| 660 | - 'UNA' => 'Unable', |
|
| 661 | - 'UNAP' => 'Unable To Approve', |
|
| 662 | - 'UNL' => 'Unlimited', |
|
| 663 | - 'UNREL' => 'Unreliable', |
|
| 664 | - 'UTA' => 'Upper Control Area', |
|
| 665 | - 'VAAC' => 'Volcanic Ash Advisory Centre', |
|
| 666 | - 'VAC' => 'Visual Approach Chart', |
|
| 667 | - 'VAL' => 'In Valleys', |
|
| 668 | - 'VAN' => 'Runway Control Van', |
|
| 669 | - 'VAR' => 'Visual-aural Radio Range', |
|
| 670 | - 'VC' => 'Vicinity', |
|
| 671 | - 'VCY' => 'Vicinity', |
|
| 672 | - 'VER' => 'Vertical', |
|
| 673 | - 'VIS' => 'Visibility', |
|
| 674 | - 'VLR' => 'Very Long Range', |
|
| 675 | - 'VPA' => 'Vertical Path Angle', |
|
| 676 | - 'VRB' => 'Variable', |
|
| 677 | - 'VSA' => 'By Visual Reference To The Ground', |
|
| 678 | - 'VSP' => 'Vertical Speed', |
|
| 679 | - 'VTOL' => 'Vertical Take-off And Landing', |
|
| 680 | - 'WAC' => 'World Aeronautical Chart', |
|
| 681 | - 'WAFC' => 'World Area Forecast Centre', |
|
| 682 | - 'WB' => 'Westbound', |
|
| 683 | - 'WBAR' => 'Wing Bar Lights', |
|
| 684 | - 'WDI' => 'Wind Direction Indicator', |
|
| 685 | - 'WDSPR' => 'Widespread', |
|
| 686 | - 'WED' => 'Wednesday', |
|
| 687 | - 'WEF' => 'Effective From', |
|
| 688 | - 'WI' => 'Within', |
|
| 689 | - 'WID' => 'Width', |
|
| 690 | - 'WIE' => 'Effective Immediately', |
|
| 691 | - 'WILCO' => 'Will Comply', |
|
| 692 | - 'WIND' => 'Wind', |
|
| 693 | - 'WINTEM' => 'Forecast Upper Wind And Temperature For Aviation', |
|
| 694 | - 'WIP' => 'Work In Progress', |
|
| 695 | - 'WKN' => 'Weaken', |
|
| 696 | - 'WNW' => 'West-north-west', |
|
| 697 | - 'WO' => 'Without', |
|
| 698 | - 'WPT' => 'Way-point', |
|
| 699 | - 'WRNG' => 'Warning', |
|
| 700 | - 'WSW' => 'West-south-west', |
|
| 701 | - 'WT' => 'Weight', |
|
| 702 | - 'WWW' => 'Worldwide Web', |
|
| 703 | - 'WX' => 'Weather', |
|
| 704 | - 'XBAR' => 'Crossbar', |
|
| 705 | - 'XNG' => 'Crossing', |
|
| 706 | - 'XS' => 'Atmospherics', |
|
| 707 | - 'YCZ' => 'Yellow Caution Zone', |
|
| 708 | - 'YR' => 'Your'); |
|
| 9 | + 'A/A' => 'Air-to-air', |
|
| 10 | + 'A/G' => 'Air-to-ground', |
|
| 11 | + 'AAL' => 'Above Aerodrome Level', |
|
| 12 | + 'ABM' => 'Abeam', |
|
| 13 | + 'ABN' => 'Aerodrome Beacon', |
|
| 14 | + 'ABT' => 'About', |
|
| 15 | + 'ABV' => 'Above', |
|
| 16 | + 'ACC' => 'Area Control', |
|
| 17 | + 'ACFT' => 'Aircraft', |
|
| 18 | + 'ACK' => 'Acknowledge', |
|
| 19 | + 'ACL' => 'Altimeter Check Location', |
|
| 20 | + 'ACN' => 'Aircraft Classification Number', |
|
| 21 | + 'ACPT' => 'Accepted', |
|
| 22 | + 'ACT' => 'Active', |
|
| 23 | + 'AD' => 'Aerodrome', |
|
| 24 | + 'ADA' => 'Advisory Area', |
|
| 25 | + 'ADC' => 'Aerodrome Chart', |
|
| 26 | + 'ADDN' => 'Additional', |
|
| 27 | + 'ADJ' => 'Adjacent', |
|
| 28 | + 'ADR' => 'Advisory Route', |
|
| 29 | + 'ADS' => 'Automatic Dependent Surveillance', |
|
| 30 | + 'ADVS' => 'Advisory Service', |
|
| 31 | + 'ADZ' => 'Advised', |
|
| 32 | + 'AFIL' => 'Flight Plan Filed In The Air', |
|
| 33 | + 'AFM' => 'Affirm', |
|
| 34 | + 'AFT' => 'After', |
|
| 35 | + 'AGA' => 'Aerodromes, Air Routes and Ground Aids', |
|
| 36 | + 'AGN' => 'Again', |
|
| 37 | + 'ALERFA' => 'Alert Phase', |
|
| 38 | + 'ALRS' => 'Alerting Service', |
|
| 39 | + 'ALS' => 'Approach Lighting System', |
|
| 40 | + 'ALT' => 'Altitude', |
|
| 41 | + 'ALTN' => 'Alternate', |
|
| 42 | + 'AMA' => 'Area Minimum Altitude', |
|
| 43 | + 'ANC' => 'Aeronautical Chart', |
|
| 44 | + 'ANCS' => 'Aeronautical Navigation Chart', |
|
| 45 | + 'ANS' => 'Answer', |
|
| 46 | + 'AOC' => 'Aerodrome Obstacle Chart', |
|
| 47 | + 'AP' => 'Airport', |
|
| 48 | + 'APCH' => 'Approach', |
|
| 49 | + 'APDC' => 'Aircraft Parking/docking Chart', |
|
| 50 | + 'APN' => 'Apron', |
|
| 51 | + 'APNS' => 'Aprons', |
|
| 52 | + 'APP' => 'Approach Control', |
|
| 53 | + 'APR' => 'April', |
|
| 54 | + 'APRX' => 'Approximately', |
|
| 55 | + 'APSG' => 'After Passing', |
|
| 56 | + 'APV' => 'Approved', |
|
| 57 | + 'ARC' => 'Area Chart', |
|
| 58 | + 'ARNG' => 'Arrange', |
|
| 59 | + 'ARO' => 'Air Traffic Services Reporting Office', |
|
| 60 | + 'ARP' => 'Aerodrome Reference Point', |
|
| 61 | + 'ARR' => 'Arriving', |
|
| 62 | + 'ARST' => 'Arresting', |
|
| 63 | + 'ASC' => 'Ascend To', |
|
| 64 | + 'ASDA' => 'Accelerate-Stop Distance Available', |
|
| 65 | + 'ASPEEDG' => 'Airspeed Gain', |
|
| 66 | + 'ASPEEDL' => 'Airspeed Loss', |
|
| 67 | + 'ASPH' => 'Asphalt', |
|
| 68 | + 'ATA' => 'Actual Time of Arrival', |
|
| 69 | + 'ATD' => 'Actual Time of Departure', |
|
| 70 | + 'ATFM' => 'Air Traffic Flow Management', |
|
| 71 | + 'ATM' => 'Air Traffic Management', |
|
| 72 | + 'ATP' => 'At', |
|
| 73 | + 'ATTN' => 'Attention', |
|
| 74 | + 'ATZ' => 'Aerodrome Traffic Zone', |
|
| 75 | + 'AUG' => 'August', |
|
| 76 | + 'AUTH' => 'Authorization', |
|
| 77 | + 'AUW' => 'All Up Weight', |
|
| 78 | + 'AUX' => 'Auxiliary', |
|
| 79 | + 'AVBL' => 'Available', |
|
| 80 | + 'AVG' => 'Average', |
|
| 81 | + 'AVGAS' => 'Aviation Gasoline', |
|
| 82 | + 'AWTA' => 'Advise At What Time Able', |
|
| 83 | + 'AWY' => 'Airway', |
|
| 84 | + 'AWYS' => 'Airways', |
|
| 85 | + 'AZM' => 'Azimuth', |
|
| 86 | + 'BA' => 'Braking Action', |
|
| 87 | + 'BCN' => 'Beacon', |
|
| 88 | + 'BCST' => 'Broadcast', |
|
| 89 | + 'BDRY' => 'Boundary', |
|
| 90 | + 'BFR' => 'Before', |
|
| 91 | + 'BLDG' => 'Building', |
|
| 92 | + 'BLO' => 'Below Clouds', |
|
| 93 | + 'BLW' => 'Below', |
|
| 94 | + 'BRF' => 'Short', |
|
| 95 | + 'BRG' => 'Bearing', |
|
| 96 | + 'BRKG' => 'Breaking', |
|
| 97 | + 'BTL' => 'Between Layers', |
|
| 98 | + 'BTN' => 'Between', |
|
| 99 | + 'CD' => 'Candela', |
|
| 100 | + 'CDN' => 'Coordination', |
|
| 101 | + 'CF' => 'Change Frequency To', |
|
| 102 | + 'CFM' => 'Confirm', |
|
| 103 | + 'CGL' => 'Circling Guidance Light(s)', |
|
| 104 | + 'CH' => 'Channel', |
|
| 105 | + 'CHG' => 'Changed', |
|
| 106 | + 'CIT' => 'Near or Over Large Towns', |
|
| 107 | + 'CIV' => 'Civil', |
|
| 108 | + 'CK' => 'Check', |
|
| 109 | + 'CL' => 'Centre Line', |
|
| 110 | + 'CLBR' => 'Calibration', |
|
| 111 | + 'CLD' => 'Cloud', |
|
| 112 | + 'CLG' => 'Calling', |
|
| 113 | + 'CLIMB-OUT' => 'Climb-out Area', |
|
| 114 | + 'CLR' => 'Clearance', |
|
| 115 | + 'CLRD' => 'Cleared', |
|
| 116 | + 'CLSD' => 'Closed', |
|
| 117 | + 'CMB' => 'Climb', |
|
| 118 | + 'CMPL' => 'Complete', |
|
| 119 | + 'CNL' => 'Cancel', |
|
| 120 | + 'CNS' => 'Communications, Navigation And Surveillance', |
|
| 121 | + 'COM' => 'Communications', |
|
| 122 | + 'CONC' => 'Concrete', |
|
| 123 | + 'COND' => 'Condition', |
|
| 124 | + 'CONS' => 'Continuous', |
|
| 125 | + 'CONST' => 'Construction', |
|
| 126 | + 'CONT' => 'Continued', |
|
| 127 | + 'COOR' => 'Coordination', |
|
| 128 | + 'COORD' => 'Coordinates', |
|
| 129 | + 'COP' => 'Change-over Point', |
|
| 130 | + 'COR' => 'Correction', |
|
| 131 | + 'COT' => 'At The Coast', |
|
| 132 | + 'COV' => 'Covered', |
|
| 133 | + 'CPDLC' => 'Controller-pilot Data Link Communications', |
|
| 134 | + 'CPL' => 'Current Flight Plan', |
|
| 135 | + 'CRC' => 'Cyclic Redundancy Check', |
|
| 136 | + 'CRZ' => 'Cruise', |
|
| 137 | + 'CTAM' => 'Climb To And Maintain', |
|
| 138 | + 'CTC' => 'Contact', |
|
| 139 | + 'CTL' => 'Control', |
|
| 140 | + 'CTN' => 'Caution', |
|
| 141 | + 'CTR' => 'Control Zone', |
|
| 142 | + 'CVR' => 'Cockpit Voice Recorder', |
|
| 143 | + 'CW' => 'Continuous Wave', |
|
| 144 | + 'CWY' => 'Clearway', |
|
| 145 | + 'DA' => 'Decision Altitude', |
|
| 146 | + 'DCKG' => 'Docking', |
|
| 147 | + 'DCP' => 'Datum Crossing Point', |
|
| 148 | + 'DCPC' => 'Direct Controller-pilot Communications', |
|
| 149 | + 'DCT' => 'Direct', |
|
| 150 | + 'DEC' => 'December', |
|
| 151 | + 'DEG' => 'Degrees', |
|
| 152 | + 'DEP' => 'Departing', |
|
| 153 | + 'DES' => 'Descend', |
|
| 154 | + 'DEST' => 'Destination', |
|
| 155 | + 'DETRESFA' => 'Distress Phase', |
|
| 156 | + 'DEV' => 'Deviating', |
|
| 157 | + 'DFDR' => 'Digital Flight Data Recorder', |
|
| 158 | + 'DFTI' => 'Distance From Touchdown Indicator', |
|
| 159 | + 'DH' => 'Decision Height', |
|
| 160 | + 'DIP' => 'Diffuse', |
|
| 161 | + 'DIST' => 'Distance', |
|
| 162 | + 'DIV' => 'Divert', |
|
| 163 | + 'DLA' => 'Delay', |
|
| 164 | + 'DLY' => 'Daily', |
|
| 165 | + 'DNG' => 'Dangerous', |
|
| 166 | + 'DOM' => 'Domestic', |
|
| 167 | + 'DPT' => 'Depth', |
|
| 168 | + 'DR' => 'Dead Reckoning', |
|
| 169 | + 'DRG' => 'During', |
|
| 170 | + 'DTAM' => 'Descend To And Maintain', |
|
| 171 | + 'DTG' => 'Date-time Group', |
|
| 172 | + 'DTHR' => 'Displaced Runway Threshold', |
|
| 173 | + 'DTRT' => 'Deteriorating', |
|
| 174 | + 'DTW' => 'Dual Tandem Wheels', |
|
| 175 | + 'DUPE' => 'This Is A Duplicate Message', |
|
| 176 | + 'DUR' => 'Duration', |
|
| 177 | + 'DVOR' => 'Doppler VOR', |
|
| 178 | + 'DW' => 'Dual Wheels', |
|
| 179 | + 'EAT' => 'Expected Approach Time', |
|
| 180 | + 'EB' => 'Eastbound', |
|
| 181 | + 'EDA' => 'Elevation Differential Area', |
|
| 182 | + 'EET' => 'Estimated Elapsed Time', |
|
| 183 | + 'EFC' => 'Expect Further Clearance', |
|
| 184 | + 'ELBA' => 'Emergency Location Beacon', |
|
| 185 | + 'ELEV' => 'Elevation', |
|
| 186 | + 'ELR' => 'Extra Long Range', |
|
| 187 | + 'EM' => 'Emission', |
|
| 188 | + 'EMERG' => 'Emergency', |
|
| 189 | + 'END' => 'Stop-end', |
|
| 190 | + 'ENE' => 'East-north-east', |
|
| 191 | + 'ENG' => 'Engine', |
|
| 192 | + 'ENR' => 'En-route', |
|
| 193 | + 'ENRC' => 'En-route Chart', |
|
| 194 | + 'EOBT' => 'Estimated Off-block Time', |
|
| 195 | + 'EQPT' => 'Equipment', |
|
| 196 | + 'ER' => 'Here', |
|
| 197 | + 'ESE' => 'East-south-east', |
|
| 198 | + 'EST' => 'Estimate', |
|
| 199 | + 'ETA' => 'Estimated Time Of Arrival', |
|
| 200 | + 'ETD' => 'Estimated Time Of Departure', |
|
| 201 | + 'ETO' => 'Estimated Time Over Significant Point', |
|
| 202 | + 'EV' => 'Every', |
|
| 203 | + 'EXC' => 'Except', |
|
| 204 | + 'EXER' => 'Exercise', |
|
| 205 | + 'EXP' => 'Expect', |
|
| 206 | + 'EXTD' => 'Extend', |
|
| 207 | + 'FAC' => 'Facilities', |
|
| 208 | + 'FAF' => 'Final Approach Fix', |
|
| 209 | + 'FAL' => 'Facilitation of International Airtransport', |
|
| 210 | + 'FAP' => 'Final Approach Point', |
|
| 211 | + 'FATO' => 'Final Approach And Take-off Area', |
|
| 212 | + 'FAX' => 'Fax', |
|
| 213 | + 'FBL' => 'Light', |
|
| 214 | + 'FCST' => 'Forecast', |
|
| 215 | + 'FCT' => 'Friction Coefficient', |
|
| 216 | + 'FDPS' => 'Flight Data Processing System', |
|
| 217 | + 'FEB' => 'February', |
|
| 218 | + 'FLD' => 'Field', |
|
| 219 | + 'FLG' => 'Flashing', |
|
| 220 | + 'FLR' => 'Flares', |
|
| 221 | + 'FLT' => 'Flight', |
|
| 222 | + 'FLTS' => 'Flights', |
|
| 223 | + 'FLTCK' => 'Flight Check', |
|
| 224 | + 'FLUC' => 'Fluctuating', |
|
| 225 | + 'FLW' => 'Follow(s)', |
|
| 226 | + 'FLY' => 'Fly', |
|
| 227 | + 'FM' => 'From', |
|
| 228 | + 'FMS' => 'Flight Management System', |
|
| 229 | + 'FMU' => 'Flow Management Unit', |
|
| 230 | + 'FNA' => 'Final Approach', |
|
| 231 | + 'FPAP' => 'Flight Path Alignment Point', |
|
| 232 | + 'FPL' => 'Flight Plan', |
|
| 233 | + 'FPLS' => 'Flight Plans', |
|
| 234 | + 'FPM' => 'Feet Per Minute', |
|
| 235 | + 'FPR' => 'Flight Plan Route', |
|
| 236 | + 'FR' => 'Fuel Remaining', |
|
| 237 | + 'FREQ' => 'Frequency', |
|
| 238 | + 'FRI' => 'Friday', |
|
| 239 | + 'FRNG' => 'Firing', |
|
| 240 | + 'FRONT' => 'Front', |
|
| 241 | + 'FRQ' => 'Frequent', |
|
| 242 | + 'FSL' => 'Full Stop Landing', |
|
| 243 | + 'FSS' => 'Flight Service Station', |
|
| 244 | + 'FST' => 'First', |
|
| 245 | + 'FTP' => 'Fictitious Threshold Point', |
|
| 246 | + 'G/A' => 'Ground-to-air', |
|
| 247 | + 'G/A/G' => 'Ground-to-air and Air-to-ground', |
|
| 248 | + 'GARP' => 'GBAS Azimuth Reference Point', |
|
| 249 | + 'GBAS' => 'Ground-based Augmentation System', |
|
| 250 | + 'GCAJ' => 'Ground Controlled Approach', |
|
| 251 | + 'GEN' => 'General', |
|
| 252 | + 'GEO' => 'Geographic or True', |
|
| 253 | + 'GES' => 'Ground Earth Station', |
|
| 254 | + 'GLD' => 'Glider', |
|
| 255 | + 'GMC' => 'Ground Movement Chart', |
|
| 256 | + 'GND' => 'Ground', |
|
| 257 | + 'GNDCK' => 'Ground Check', |
|
| 258 | + 'GP' => 'Glide Path', |
|
| 259 | + 'GRASS' => 'Grass landing area', |
|
| 260 | + 'GRVL' => 'Gravel', |
|
| 261 | + 'GUND' => 'Geoid Undulation', |
|
| 262 | + 'H24' => '24 Hours', |
|
| 263 | + 'HAPI' => 'Helicopter Approach Path Indicator', |
|
| 264 | + 'HBN' => 'Hazard Beacon', |
|
| 265 | + 'HDG' => 'Heading', |
|
| 266 | + 'HEL' => 'Helicopter', |
|
| 267 | + 'HGT' => 'Height', |
|
| 268 | + 'HJ' => 'Sunrise to Sunset', |
|
| 269 | + 'HLDG' => 'Holding', |
|
| 270 | + 'HN' => 'Sunset to Sunrise', |
|
| 271 | + 'HO' => 'Service Available To Meet Operational Requirements', |
|
| 272 | + 'HOL' => 'Holiday', |
|
| 273 | + 'HOSP' => 'Hospital Aircraft', |
|
| 274 | + 'HOT' => 'Height', |
|
| 275 | + 'HPA' => 'Hectopascal', |
|
| 276 | + 'HR' => 'Hours', |
|
| 277 | + 'HRS' => 'Hours', |
|
| 278 | + 'HS' => 'Service Available During Hours Of Scheduled Operations', |
|
| 279 | + 'HURCN' => 'Hurricane', |
|
| 280 | + 'HVY' => 'Heavy', |
|
| 281 | + 'HX' => 'No Specific Working Hours', |
|
| 282 | + 'HYR' => 'Higher', |
|
| 283 | + 'IAC' => 'Instrument Approach Chart', |
|
| 284 | + 'IAF' => 'Initial Approach Fix', |
|
| 285 | + 'IAO' => 'In And Out Of Clouds', |
|
| 286 | + 'IAP' => 'Instrument Approach Procedure', |
|
| 287 | + 'IAR' => 'Intersection Of Air Routes', |
|
| 288 | + 'IBN' => 'Identification Beacon', |
|
| 289 | + 'ID' => 'Identifier', |
|
| 290 | + 'IDENT' => 'Identification', |
|
| 291 | + 'IFF' => 'Identification Friend/Foe', |
|
| 292 | + 'IGA' => 'International General Aviation', |
|
| 293 | + 'IM' => 'Inner Marker', |
|
| 294 | + 'IMPR' => 'Improving', |
|
| 295 | + 'IMT' => 'Immediately', |
|
| 296 | + 'INA' => 'Initial Approach', |
|
| 297 | + 'INBD' => 'Inbound', |
|
| 298 | + 'INCERFA' => 'Uncertainty Phase', |
|
| 299 | + 'INFO' => 'Information', |
|
| 300 | + 'INOP' => 'Inoperative', |
|
| 301 | + 'INP' => 'If Not Possible', |
|
| 302 | + 'INPR' => 'In Progress', |
|
| 303 | + 'INSTL' => 'Installation', |
|
| 304 | + 'INSTR' => 'Instrument', |
|
| 305 | + 'INT' => 'Intersection', |
|
| 306 | + 'INTS' => 'Intersections', |
|
| 307 | + 'INTL' => 'International', |
|
| 308 | + 'INTRG' => 'Interrogator', |
|
| 309 | + 'INTRP' => 'Interruption', |
|
| 310 | + 'INTSF' => 'Intensifying', |
|
| 311 | + 'INTST' => 'Intensity', |
|
| 312 | + 'ISA' => 'International Standard Atmosphere', |
|
| 313 | + 'JAN' => 'January', |
|
| 314 | + 'JTST' => 'Jet stream', |
|
| 315 | + 'JUL' => 'July', |
|
| 316 | + 'JUN' => 'June', |
|
| 317 | + 'KMH' => 'Kilometres Per Hour', |
|
| 318 | + 'KPA' => 'Kilopascal', |
|
| 319 | + 'KT' => 'Knots', |
|
| 320 | + 'KW' => 'Kilowatts', |
|
| 321 | + 'LAN' => 'Inland', |
|
| 322 | + 'LAT' => 'Latitude', |
|
| 323 | + 'LDA' => 'Landing Distance Available', |
|
| 324 | + 'LDAH' => 'Landing Distance Available, Helicopter', |
|
| 325 | + 'LDG' => 'Landing', |
|
| 326 | + 'LDI' => 'Landing Direction Indicator', |
|
| 327 | + 'LEN' => 'Length', |
|
| 328 | + 'LGT' => 'Lighting', |
|
| 329 | + 'LGTD' => 'Lighted', |
|
| 330 | + 'LIH' => 'Light Intensity High', |
|
| 331 | + 'LIL' => 'Light Intensity Low', |
|
| 332 | + 'LIM' => 'Light Intensity Medium', |
|
| 333 | + 'LLZ' => 'Localizer', |
|
| 334 | + 'LM' => 'Locator, Middle', |
|
| 335 | + 'LMT' => 'Local Mean Time', |
|
| 336 | + 'LNG' => 'Long', |
|
| 337 | + 'LO' => 'Locator, Outer', |
|
| 338 | + 'LOG' => 'Located', |
|
| 339 | + 'LONG' => 'Longitude', |
|
| 340 | + 'LRG' => 'Long Range', |
|
| 341 | + 'LTD' => 'Limited', |
|
| 342 | + 'LTP' => 'Landing Threshold Point', |
|
| 343 | + 'LVE' => 'Leaving', |
|
| 344 | + 'LVL' => 'Level', |
|
| 345 | + 'LYR' => 'Layer', |
|
| 346 | + 'MAA' => 'Maximum Authorized Altitude', |
|
| 347 | + 'MAG' => 'Magnetic', |
|
| 348 | + 'MAINT' => 'Maintenance', |
|
| 349 | + 'MAP' => 'Aeronautical Maps and Charts', |
|
| 350 | + 'MAPT' => 'Missed Approach Point', |
|
| 351 | + 'MAR' => 'March', |
|
| 352 | + 'MAX' => 'Maximum', |
|
| 353 | + 'MAY' => 'May', |
|
| 354 | + 'MBST' => 'Microburst', |
|
| 355 | + 'MCA' => 'Minimum Crossing Altitude', |
|
| 356 | + 'MCW' => 'Modulated Continuous Wave', |
|
| 357 | + 'MDA' => 'Minimum Descent Altitude', |
|
| 358 | + 'MDH' => 'Minimum Descent Height', |
|
| 359 | + 'MEA' => 'Minimum En-route Altitude', |
|
| 360 | + 'MEHT' => 'Minimum Eye Height Over Threshold', |
|
| 361 | + 'MET' => 'Meteorological', |
|
| 362 | + 'MID' => 'Mid-point', |
|
| 363 | + 'MIL' => 'Military', |
|
| 364 | + 'MIN' => 'Minutes', |
|
| 365 | + 'MKR' => 'Marker Radio Beacon', |
|
| 366 | + 'MLS' => 'Microwave Landing System', |
|
| 367 | + 'MM' => 'Middle Marker', |
|
| 368 | + 'MNM' => 'Minimum', |
|
| 369 | + 'MNPS' => 'Minimum Navigation Performance Specifications', |
|
| 370 | + 'MNT' => 'Monitor', |
|
| 371 | + 'MNTN' => 'Maintain', |
|
| 372 | + 'MOA' => 'Military Operating Area', |
|
| 373 | + 'MOC' => 'Minimum Obstacle Clearance', |
|
| 374 | + 'MOD' => 'Moderate', |
|
| 375 | + 'MON' => 'Monday', |
|
| 376 | + 'MOPS' => 'Minimum Operational Performance Standards', |
|
| 377 | + 'MOV' => 'Movement', |
|
| 378 | + 'MRA' => 'Minimum Reception Altitude', |
|
| 379 | + 'MRG' => 'Medium Range', |
|
| 380 | + 'MRP' => 'ATS/MET Reporting Point', |
|
| 381 | + 'MS' => 'Minus', |
|
| 382 | + 'MSA' => 'Minimum Sector Altitude', |
|
| 383 | + 'MSAW' => 'Minimum Safe Altitude Warning', |
|
| 384 | + 'MSG' => 'Message', |
|
| 385 | + 'MSSR' => 'Monopulse Secondary Surveillance Radar', |
|
| 386 | + 'MT' => 'Mountain', |
|
| 387 | + 'MTU' => 'Metric Units', |
|
| 388 | + 'MTW' => 'Mountain Waves', |
|
| 389 | + 'NASC' => 'National AIS System Centre', |
|
| 390 | + 'NAT' => 'North Atlantic', |
|
| 391 | + 'NAV' => 'Navigation', |
|
| 392 | + 'NB' => 'Northbound', |
|
| 393 | + 'NBFR' => 'Not Before', |
|
| 394 | + 'NE' => 'North-east', |
|
| 395 | + 'NEB' => 'North-eastbound', |
|
| 396 | + 'NEG' => 'Negative', |
|
| 397 | + 'NGT' => 'Night', |
|
| 398 | + 'NIL' => 'None', |
|
| 399 | + 'NML' => 'Normal', |
|
| 400 | + 'NNE' => 'North-north-east', |
|
| 401 | + 'NNW' => 'North-north-west', |
|
| 402 | + 'NOF' => 'International NOTAM Office', |
|
| 403 | + 'NOV' => 'November', |
|
| 404 | + 'NOZ' => 'Normal Operating Zone', |
|
| 405 | + 'NR' => 'Number', |
|
| 406 | + 'NRH' => 'No Reply Heard', |
|
| 407 | + 'NTL' => 'National', |
|
| 408 | + 'NTZ' => 'No Transgression Zone', |
|
| 409 | + 'NW' => 'North-west', |
|
| 410 | + 'NWB' => 'North-westbound', |
|
| 411 | + 'NXT' => 'Next', |
|
| 412 | + 'O/R' => 'On Request', |
|
| 413 | + 'OAC' => 'Oceanic Area Control Centre', |
|
| 414 | + 'OAS' => 'Obstacle Assessment Surface', |
|
| 415 | + 'OBS' => 'Observe', |
|
| 416 | + 'OBST' => 'Obstacle', |
|
| 417 | + 'OBSTS' => 'Obstacles', |
|
| 418 | + 'OCA' => 'Oceanic Control Area', |
|
| 419 | + 'OCH' => 'Obstacle Clearance Height', |
|
| 420 | + 'OCS' => 'Obstacle Clearance Surface', |
|
| 421 | + 'OCT' => 'October', |
|
| 422 | + 'OFZ' => 'Obstacle Free Zone', |
|
| 423 | + 'OGN' => 'Originate', |
|
| 424 | + 'OHD' => 'Overhead', |
|
| 425 | + 'OM' => 'Outer Marker', |
|
| 426 | + 'OPC' => 'Control Indicated Is Operational Control', |
|
| 427 | + 'OPMET' => 'Operational Meteorological', |
|
| 428 | + 'OPN' => 'Open', |
|
| 429 | + 'OPR' => 'Operate', |
|
| 430 | + 'OPS' => 'Operations', |
|
| 431 | + 'ORD' => 'Order', |
|
| 432 | + 'OSV' => 'Ocean Station Vessel', |
|
| 433 | + 'OTLK' => 'Outlook', |
|
| 434 | + 'OTP' => 'On Top', |
|
| 435 | + 'OTS' => 'Organized Track System', |
|
| 436 | + 'OUBD' => 'Outbound', |
|
| 437 | + 'PA' => 'Precision Approach', |
|
| 438 | + 'PALS' => 'Precision Approach Lighting System', |
|
| 439 | + 'PANS' => 'Procedures for Air Navigation Services', |
|
| 440 | + 'PAR' => 'Precision Approach Radar', |
|
| 441 | + 'PARL' => 'Parallel', |
|
| 442 | + 'PATC' => 'Precision Approach Terrain Chart', |
|
| 443 | + 'PAX' => 'Passenger(s)', |
|
| 444 | + 'PCD' => 'Proceed', |
|
| 445 | + 'PCL' => 'Pilot-controlled Lighting', |
|
| 446 | + 'PCN' => 'Pavement Classification Number', |
|
| 447 | + 'PDC' => 'Pre-departure Clearance', |
|
| 448 | + 'PDG' => 'Procedure Design Gradient', |
|
| 449 | + 'PER' => 'Performance', |
|
| 450 | + 'PERM' => 'Permanent', |
|
| 451 | + 'PIB' => 'Pre-flight Information Bulletin', |
|
| 452 | + 'PJE' => 'Parachute Jumping Exercise', |
|
| 453 | + 'PLA' => 'Practice Low Approach', |
|
| 454 | + 'PLN' => 'Flight Plan', |
|
| 455 | + 'PLVL' => 'Present Level', |
|
| 456 | + 'PN' => 'Prior Notice Required', |
|
| 457 | + 'PNR' => 'Point Of No Return', |
|
| 458 | + 'POB' => 'Persons On Board', |
|
| 459 | + 'POSS' => 'Possible', |
|
| 460 | + 'PPI' => 'Plan Position Indicator', |
|
| 461 | + 'PPR' => 'Prior Permission Required', |
|
| 462 | + 'PPSN' => 'Present Position', |
|
| 463 | + 'PRI' => 'Primary', |
|
| 464 | + 'PRKG' => 'Parking', |
|
| 465 | + 'PROB' => 'Probability', |
|
| 466 | + 'PROC' => 'Procedure', |
|
| 467 | + 'PROV' => 'Provisional', |
|
| 468 | + 'PS' => 'Plus', |
|
| 469 | + 'PSG' => 'Passing', |
|
| 470 | + 'PSN' => 'Position', |
|
| 471 | + 'PSNS' => 'Positions', |
|
| 472 | + 'PSR' => 'Primary Surveillance Radar', |
|
| 473 | + 'PSYS' => 'Pressure System(s)', |
|
| 474 | + 'PTN' => 'Procedure Turn', |
|
| 475 | + 'PTS' => 'Polar Track Structure', |
|
| 476 | + 'PWR' => 'Power', |
|
| 477 | + 'QUAD' => 'Quadrant', |
|
| 478 | + 'RAC' => 'Rules of The Air and Air Traffic Services', |
|
| 479 | + 'RAG' => 'Runway Arresting Gear', |
|
| 480 | + 'RAI' => 'Runway Alignment Indicator', |
|
| 481 | + 'RASC' => 'Regional AIS System Centre', |
|
| 482 | + 'RASS' => 'Remote Altimeter Setting Source', |
|
| 483 | + 'RB' => 'Rescue Boat', |
|
| 484 | + 'RCA' => 'Reach Cruising Altitude', |
|
| 485 | + 'RCC' => 'Rescue Coordination Centre', |
|
| 486 | + 'RCF' => 'Radiocommunication Failure', |
|
| 487 | + 'RCH' => 'Reaching', |
|
| 488 | + 'RCL' => 'Runway Centre Line', |
|
| 489 | + 'RCLL' => 'Runway Centre Line Light(s)', |
|
| 490 | + 'RCLR' => 'Recleared', |
|
| 491 | + 'RDH' => 'Reference Datum Height', |
|
| 492 | + 'RDL' => 'Radial', |
|
| 493 | + 'RDO' => 'Radio', |
|
| 494 | + 'RE' => 'Recent', |
|
| 495 | + 'REC' => 'Receiver', |
|
| 496 | + 'REDL' => 'Runway Edge Light(s)', |
|
| 497 | + 'REF' => 'Refer To', |
|
| 498 | + 'REG' => 'Registration', |
|
| 499 | + 'RENL' => 'Runway End Light(s)', |
|
| 500 | + 'REP' => 'Report', |
|
| 501 | + 'REQ' => 'Requested', |
|
| 502 | + 'RERTE' => 'Re-route', |
|
| 503 | + 'RESA' => 'Runway End Safety Area', |
|
| 504 | + 'RG' => 'Range (lights)', |
|
| 505 | + 'RHC' => 'Right-hand Circuit', |
|
| 506 | + 'RIF' => 'Reclearance In Flight', |
|
| 507 | + 'RITE' => 'Right', |
|
| 508 | + 'RL' => 'Report Leaving', |
|
| 509 | + 'RLA' => 'Relay To', |
|
| 510 | + 'RLCE' => 'Request Level Change En Route', |
|
| 511 | + 'RLLS' => 'Runway Lead-in Lighting System', |
|
| 512 | + 'RLNA' => 'Request Level Not Available', |
|
| 513 | + 'RMAC' => 'Radar Minimum Altitude Chart', |
|
| 514 | + 'RMK' => 'Remark', |
|
| 515 | + 'RNG' => 'Radio Range', |
|
| 516 | + 'RNP' => 'Required Navigation Performance', |
|
| 517 | + 'ROC' => 'Rate Of Climb', |
|
| 518 | + 'ROD' => 'Rate Of Descent', |
|
| 519 | + 'ROFOR' => 'Route Forecast', |
|
| 520 | + 'RON' => 'Receiving Only', |
|
| 521 | + 'RPI' => 'Radar Position Indicator', |
|
| 522 | + 'RPL' => 'Repetitive Flight Plan', |
|
| 523 | + 'RPLC' => 'Replaced', |
|
| 524 | + 'RPS' => 'Radar Position Symbol', |
|
| 525 | + 'RQMNTS' => 'Requirements', |
|
| 526 | + 'RQP' => 'Request Flight Plan', |
|
| 527 | + 'RQS' => 'Request Supplementary Flight Plan', |
|
| 528 | + 'RR' => 'Report Reaching', |
|
| 529 | + 'RSC' => 'Rescue Sub-centre', |
|
| 530 | + 'RSCD' => 'Runway Surface Condition', |
|
| 531 | + 'RSP' => 'Responder Beacon', |
|
| 532 | + 'RSR' => 'En-route Surveillance Radar', |
|
| 533 | + 'RTE' => 'Route', |
|
| 534 | + 'RTES' => 'Routes', |
|
| 535 | + 'RTF' => 'Radiotelephone', |
|
| 536 | + 'RTG' => 'Radiotelegraph', |
|
| 537 | + 'RTHL' => 'Runway Threshold Light(s)', |
|
| 538 | + 'RTN' => 'Return', |
|
| 539 | + 'RTODAH' => 'Rejected Take-off Distance Available, Helicopter', |
|
| 540 | + 'RTS' => 'Return To Service', |
|
| 541 | + 'RTT' => 'Radioteletypewriter', |
|
| 542 | + 'RTZL' => 'Runway Touchdown Zone Light(s)', |
|
| 543 | + 'RUT' => 'Standard Regional Route Transmitting Frequencies', |
|
| 544 | + 'RV' => 'Rescue Vessel', |
|
| 545 | + 'RVSM' => 'Reduced Vertical Separation Minimum', |
|
| 546 | + 'RWY' => 'Runway', |
|
| 547 | + 'RWYS' => 'Runways', |
|
| 548 | + 'SALS' => 'Simple Approach Lighting System', |
|
| 549 | + 'SAN' => 'Sanitary', |
|
| 550 | + 'SAP' => 'As Soon As Possible', |
|
| 551 | + 'SAR' => 'Search and Rescue', |
|
| 552 | + 'SARPS' => 'Standards and Recommended Practices', |
|
| 553 | + 'SAT' => 'Saturday', |
|
| 554 | + 'SATCOM' => 'Satellite Communication', |
|
| 555 | + 'SB' => 'Southbound', |
|
| 556 | + 'SBAS' => 'Satellite-based Augmentation System', |
|
| 557 | + 'SDBY' => 'Stand by', |
|
| 558 | + 'SE' => 'South-east', |
|
| 559 | + 'SEA' => 'Sea', |
|
| 560 | + 'SEB' => 'South-eastbound', |
|
| 561 | + 'SEC' => 'Seconds', |
|
| 562 | + 'SECN' => 'Section', |
|
| 563 | + 'SECT' => 'Sector', |
|
| 564 | + 'SEP' => 'September', |
|
| 565 | + 'SER' => 'Service', |
|
| 566 | + 'SEV' => 'Severe', |
|
| 567 | + 'SFC' => 'Surface', |
|
| 568 | + 'SGL' => 'Signal', |
|
| 569 | + 'SID' => 'Standard Instrument Departure', |
|
| 570 | + 'SIF' => 'Selective Identification Feature', |
|
| 571 | + 'SIG' => 'Significant', |
|
| 572 | + 'SIMUL' => 'Simultaneous', |
|
| 573 | + 'SKED' => 'Schedule', |
|
| 574 | + 'SLP' => 'Speed Limiting Point', |
|
| 575 | + 'SLW' => 'Slow', |
|
| 576 | + 'SMC' => 'Surface Movement Control', |
|
| 577 | + 'SMR' => 'Surface Movement Radar', |
|
| 578 | + 'SPL' => 'Supplementary Flight Plan', |
|
| 579 | + 'SPOC' => 'SAR Point Of Contact', |
|
| 580 | + 'SPOT' => 'Spot Wind', |
|
| 581 | + 'SR' => 'Sunrise', |
|
| 582 | + 'SRA' => 'Surveillance Radar Approach', |
|
| 583 | + 'SRE' => 'Surveillance Radar Element Of Precision Approach Radar System', |
|
| 584 | + 'SRG' => 'Short Range', |
|
| 585 | + 'SRR' => 'Search and Rescue Region', |
|
| 586 | + 'SRY' => 'Secondary', |
|
| 587 | + 'SS' => 'Sunset', |
|
| 588 | + 'SSE' => 'South-south-east', |
|
| 589 | + 'SSR' => 'Secondary Surveillance Radar', |
|
| 590 | + 'SST' => 'Supersonic Transport', |
|
| 591 | + 'SSW' => 'South-south-west', |
|
| 592 | + 'STA' => 'Straight-in Approach', |
|
| 593 | + 'STAR' => 'Standard Instrument Arrival', |
|
| 594 | + 'STD' => 'Standard', |
|
| 595 | + 'STN' => 'Station', |
|
| 596 | + 'STNR' => 'Stationary', |
|
| 597 | + 'STOL' => 'Short Take-off and Landing', |
|
| 598 | + 'STS' => 'Status', |
|
| 599 | + 'STWL' => 'Stopway Light(s)', |
|
| 600 | + 'SUBJ' => 'Subject To', |
|
| 601 | + 'SUN' => 'Sunday', |
|
| 602 | + 'SUP' => 'Supplement', |
|
| 603 | + 'SUPPS' => 'Regional Supplementary Procedures Service Message', |
|
| 604 | + 'SVCBL' => 'Serviceable', |
|
| 605 | + 'SW' => 'South-west', |
|
| 606 | + 'SWB' => 'South-westbound', |
|
| 607 | + 'SWY' => 'Stopway', |
|
| 608 | + 'TA' => 'Transition Altitude', |
|
| 609 | + 'TAA' => 'Terminal Arrival Altitude', |
|
| 610 | + 'TAF' => 'Aerodrome Forecast', |
|
| 611 | + 'TAIL' => 'Tail Wind', |
|
| 612 | + 'TAR' => 'Terminal Area Surveillance Radar', |
|
| 613 | + 'TAX' => 'Taxi', |
|
| 614 | + 'TCAC' => 'Tropical Cyclone Advisory Centre', |
|
| 615 | + 'TDO' => 'Tornado', |
|
| 616 | + 'TDZ' => 'Touchdown Zone', |
|
| 617 | + 'TECR' => 'Technical Reason', |
|
| 618 | + 'TEMPO' => 'Temporarily', |
|
| 619 | + 'TFC' => 'Traffic', |
|
| 620 | + 'TGL' => 'Touch-and-go', |
|
| 621 | + 'TGS' => 'Taxiing Guidance System', |
|
| 622 | + 'THR' => 'Threshold', |
|
| 623 | + 'THRU' => 'Through', |
|
| 624 | + 'THU' => 'Thursday', |
|
| 625 | + 'TIBA' => 'Traffic Information Broadcast By Aircraft', |
|
| 626 | + 'TIL' => 'Until', |
|
| 627 | + 'TIP' => 'Until Past', |
|
| 628 | + 'TKOF' => 'Take-off', |
|
| 629 | + 'TL' => 'Till', |
|
| 630 | + 'TLOF' => 'Touchdown And Lift-off Area', |
|
| 631 | + 'TMA' => 'Terminal Control Area', |
|
| 632 | + 'TNA' => 'Turn Altitude', |
|
| 633 | + 'TNH' => 'Turn Height', |
|
| 634 | + 'TOC' => 'Top of Climb', |
|
| 635 | + 'TODA' => 'Take-off Distance Available', |
|
| 636 | + 'TODAH' => 'Take-off Distance Available, Helicopter', |
|
| 637 | + 'TORA' => 'Take-off Run Available', |
|
| 638 | + 'TP' => 'Turning Point', |
|
| 639 | + 'TR' => 'Track', |
|
| 640 | + 'TRA' => 'Temporary Reserved Airspace', |
|
| 641 | + 'TRANS' => 'Transmitter', |
|
| 642 | + 'TRL' => 'Transition Level', |
|
| 643 | + 'TUE' => 'Tuesday', |
|
| 644 | + 'TURB' => 'Turbulence', |
|
| 645 | + 'TVOR' => 'Terminal VOR', |
|
| 646 | + 'TWR' => 'Tower', |
|
| 647 | + 'TWY' => 'Taxiway', |
|
| 648 | + 'TWYL' => 'Taxiway-link', |
|
| 649 | + 'TXT' => 'Text', |
|
| 650 | + 'TYP' => 'Type of Aircraft', |
|
| 651 | + 'U/S' => 'Unserviceable', |
|
| 652 | + 'UAB' => 'Until Advised By', |
|
| 653 | + 'UAC' => 'Upper Area Control Centre', |
|
| 654 | + 'UAR' => 'Upper Air Route', |
|
| 655 | + 'UFN' => 'Until Further Notice', |
|
| 656 | + 'UHDT' => 'Unable Higher Due Traffic', |
|
| 657 | + 'UIC' => 'Upper Information Centre', |
|
| 658 | + 'UIR' => 'Upper Flight Information Region', |
|
| 659 | + 'ULR' => 'Ultra Long Range', |
|
| 660 | + 'UNA' => 'Unable', |
|
| 661 | + 'UNAP' => 'Unable To Approve', |
|
| 662 | + 'UNL' => 'Unlimited', |
|
| 663 | + 'UNREL' => 'Unreliable', |
|
| 664 | + 'UTA' => 'Upper Control Area', |
|
| 665 | + 'VAAC' => 'Volcanic Ash Advisory Centre', |
|
| 666 | + 'VAC' => 'Visual Approach Chart', |
|
| 667 | + 'VAL' => 'In Valleys', |
|
| 668 | + 'VAN' => 'Runway Control Van', |
|
| 669 | + 'VAR' => 'Visual-aural Radio Range', |
|
| 670 | + 'VC' => 'Vicinity', |
|
| 671 | + 'VCY' => 'Vicinity', |
|
| 672 | + 'VER' => 'Vertical', |
|
| 673 | + 'VIS' => 'Visibility', |
|
| 674 | + 'VLR' => 'Very Long Range', |
|
| 675 | + 'VPA' => 'Vertical Path Angle', |
|
| 676 | + 'VRB' => 'Variable', |
|
| 677 | + 'VSA' => 'By Visual Reference To The Ground', |
|
| 678 | + 'VSP' => 'Vertical Speed', |
|
| 679 | + 'VTOL' => 'Vertical Take-off And Landing', |
|
| 680 | + 'WAC' => 'World Aeronautical Chart', |
|
| 681 | + 'WAFC' => 'World Area Forecast Centre', |
|
| 682 | + 'WB' => 'Westbound', |
|
| 683 | + 'WBAR' => 'Wing Bar Lights', |
|
| 684 | + 'WDI' => 'Wind Direction Indicator', |
|
| 685 | + 'WDSPR' => 'Widespread', |
|
| 686 | + 'WED' => 'Wednesday', |
|
| 687 | + 'WEF' => 'Effective From', |
|
| 688 | + 'WI' => 'Within', |
|
| 689 | + 'WID' => 'Width', |
|
| 690 | + 'WIE' => 'Effective Immediately', |
|
| 691 | + 'WILCO' => 'Will Comply', |
|
| 692 | + 'WIND' => 'Wind', |
|
| 693 | + 'WINTEM' => 'Forecast Upper Wind And Temperature For Aviation', |
|
| 694 | + 'WIP' => 'Work In Progress', |
|
| 695 | + 'WKN' => 'Weaken', |
|
| 696 | + 'WNW' => 'West-north-west', |
|
| 697 | + 'WO' => 'Without', |
|
| 698 | + 'WPT' => 'Way-point', |
|
| 699 | + 'WRNG' => 'Warning', |
|
| 700 | + 'WSW' => 'West-south-west', |
|
| 701 | + 'WT' => 'Weight', |
|
| 702 | + 'WWW' => 'Worldwide Web', |
|
| 703 | + 'WX' => 'Weather', |
|
| 704 | + 'XBAR' => 'Crossbar', |
|
| 705 | + 'XNG' => 'Crossing', |
|
| 706 | + 'XS' => 'Atmospherics', |
|
| 707 | + 'YCZ' => 'Yellow Caution Zone', |
|
| 708 | + 'YR' => 'Your'); |
|
| 709 | 709 | |
| 710 | 710 | |
| 711 | 711 | function __construct($dbc = null) { |
@@ -7,90 +7,90 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | class Translation { |
| 10 | - public $db; |
|
| 11 | - function __construct($dbc = null) { |
|
| 12 | - $Connection = new Connection($dbc); |
|
| 13 | - $this->db = $Connection->db; |
|
| 14 | - } |
|
| 10 | + public $db; |
|
| 11 | + function __construct($dbc = null) { |
|
| 12 | + $Connection = new Connection($dbc); |
|
| 13 | + $this->db = $Connection->db; |
|
| 14 | + } |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * Change IATA to ICAO value for ident |
|
| 18 | - * |
|
| 19 | - * @param String $ident ident |
|
| 20 | - * @return String the icao |
|
| 21 | - */ |
|
| 22 | - public function ident2icao($ident) { |
|
| 16 | + /** |
|
| 17 | + * Change IATA to ICAO value for ident |
|
| 18 | + * |
|
| 19 | + * @param String $ident ident |
|
| 20 | + * @return String the icao |
|
| 21 | + */ |
|
| 22 | + public function ident2icao($ident) { |
|
| 23 | 23 | $Spotter = new Spotter(); |
| 24 | 24 | if (!is_numeric(substr($ident, 0, 3))) |
| 25 | - { |
|
| 26 | - if (is_numeric(substr(substr($ident, 0, 3), -1, 1))) { |
|
| 27 | - $airline_icao = substr($ident, 0, 2); |
|
| 28 | - } elseif (is_numeric(substr(substr($ident, 0, 4), -1, 1))) { |
|
| 29 | - //$airline_icao = substr($ident, 0, 3); |
|
| 30 | - return $ident; |
|
| 31 | - } else return $ident; |
|
| 32 | - } else return $ident; |
|
| 33 | - if ($airline_icao == 'AF') { |
|
| 34 | - if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
|
| 35 | - else $icao = 'AFR'.ltrim(substr($ident,2),'0'); |
|
| 36 | - } else { |
|
| 37 | - $identicao = $Spotter->getAllAirlineInfo($airline_icao); |
|
| 38 | - if (isset($identicao[0])) { |
|
| 39 | - $icao = $identicao[0]['icao'].ltrim(substr($ident,2),'0'); |
|
| 40 | - } else $icao = $ident; |
|
| 41 | - } |
|
| 42 | - return $icao; |
|
| 43 | - } |
|
| 25 | + { |
|
| 26 | + if (is_numeric(substr(substr($ident, 0, 3), -1, 1))) { |
|
| 27 | + $airline_icao = substr($ident, 0, 2); |
|
| 28 | + } elseif (is_numeric(substr(substr($ident, 0, 4), -1, 1))) { |
|
| 29 | + //$airline_icao = substr($ident, 0, 3); |
|
| 30 | + return $ident; |
|
| 31 | + } else return $ident; |
|
| 32 | + } else return $ident; |
|
| 33 | + if ($airline_icao == 'AF') { |
|
| 34 | + if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
|
| 35 | + else $icao = 'AFR'.ltrim(substr($ident,2),'0'); |
|
| 36 | + } else { |
|
| 37 | + $identicao = $Spotter->getAllAirlineInfo($airline_icao); |
|
| 38 | + if (isset($identicao[0])) { |
|
| 39 | + $icao = $identicao[0]['icao'].ltrim(substr($ident,2),'0'); |
|
| 40 | + } else $icao = $ident; |
|
| 41 | + } |
|
| 42 | + return $icao; |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | 45 | |
| 46 | - public function getOperator($ident) { |
|
| 47 | - $query = "SELECT * FROM translation WHERE Operator = :ident LIMIT 1"; |
|
| 48 | - $query_values = array(':ident' => $ident); |
|
| 49 | - try { |
|
| 50 | - $sth = $this->db->prepare($query); |
|
| 51 | - $sth->execute($query_values); |
|
| 52 | - } catch(PDOException $e) { |
|
| 53 | - return "error : ".$e->getMessage(); |
|
| 54 | - } |
|
| 55 | - $row = $sth->fetch(PDO::FETCH_ASSOC); |
|
| 56 | - if (count($row) > 0) { |
|
| 57 | - return $row['operator_correct']; |
|
| 58 | - } else return $ident; |
|
| 59 | - } |
|
| 46 | + public function getOperator($ident) { |
|
| 47 | + $query = "SELECT * FROM translation WHERE Operator = :ident LIMIT 1"; |
|
| 48 | + $query_values = array(':ident' => $ident); |
|
| 49 | + try { |
|
| 50 | + $sth = $this->db->prepare($query); |
|
| 51 | + $sth->execute($query_values); |
|
| 52 | + } catch(PDOException $e) { |
|
| 53 | + return "error : ".$e->getMessage(); |
|
| 54 | + } |
|
| 55 | + $row = $sth->fetch(PDO::FETCH_ASSOC); |
|
| 56 | + if (count($row) > 0) { |
|
| 57 | + return $row['operator_correct']; |
|
| 58 | + } else return $ident; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - public function addOperator($ident,$correct_ident,$source) { |
|
| 62 | - $query = "INSERT INTO translation (Operator,Operator_correct,Source) VALUES (:ident,:correct_ident,:source)"; |
|
| 63 | - $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |
|
| 64 | - try { |
|
| 65 | - $sth = $this->db->prepare($query); |
|
| 66 | - $sth->execute($query_values); |
|
| 67 | - } catch(PDOException $e) { |
|
| 68 | - return "error : ".$e->getMessage(); |
|
| 69 | - } |
|
| 70 | - } |
|
| 61 | + public function addOperator($ident,$correct_ident,$source) { |
|
| 62 | + $query = "INSERT INTO translation (Operator,Operator_correct,Source) VALUES (:ident,:correct_ident,:source)"; |
|
| 63 | + $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |
|
| 64 | + try { |
|
| 65 | + $sth = $this->db->prepare($query); |
|
| 66 | + $sth->execute($query_values); |
|
| 67 | + } catch(PDOException $e) { |
|
| 68 | + return "error : ".$e->getMessage(); |
|
| 69 | + } |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - public function updateOperator($ident,$correct_ident,$source) { |
|
| 73 | - $query = "UPDATE translation SET Operator_correct = :correct_ident,Source = :source WHERE Operator = :ident"; |
|
| 74 | - $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |
|
| 75 | - try { |
|
| 76 | - $sth = $this->db->prepare($query); |
|
| 77 | - $sth->execute($query_values); |
|
| 78 | - } catch(PDOException $e) { |
|
| 79 | - return "error : ".$e->getMessage(); |
|
| 80 | - } |
|
| 81 | - } |
|
| 72 | + public function updateOperator($ident,$correct_ident,$source) { |
|
| 73 | + $query = "UPDATE translation SET Operator_correct = :correct_ident,Source = :source WHERE Operator = :ident"; |
|
| 74 | + $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |
|
| 75 | + try { |
|
| 76 | + $sth = $this->db->prepare($query); |
|
| 77 | + $sth->execute($query_values); |
|
| 78 | + } catch(PDOException $e) { |
|
| 79 | + return "error : ".$e->getMessage(); |
|
| 80 | + } |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | - public function checkTranslation($ident,$web = false) { |
|
| 84 | - global $globalTranslationSources, $globalTranslationFetch; |
|
| 85 | - //if (!isset($globalTranslationSources)) $globalTranslationSources = array('planefinder'); |
|
| 86 | - $globalTranslationSources = array(); |
|
| 87 | - if (!isset($globalTranslationFetch)) $globalTranslationFetch = TRUE; |
|
| 88 | - //echo "Check Translation for ".$ident."..."; |
|
| 89 | - $correct = $this->getOperator($ident); |
|
| 90 | - if ($correct != '' && $correct != $ident) { |
|
| 91 | - //echo "Found in DB !\n"; |
|
| 92 | - return $correct; |
|
| 93 | - } /* |
|
| 83 | + public function checkTranslation($ident,$web = false) { |
|
| 84 | + global $globalTranslationSources, $globalTranslationFetch; |
|
| 85 | + //if (!isset($globalTranslationSources)) $globalTranslationSources = array('planefinder'); |
|
| 86 | + $globalTranslationSources = array(); |
|
| 87 | + if (!isset($globalTranslationFetch)) $globalTranslationFetch = TRUE; |
|
| 88 | + //echo "Check Translation for ".$ident."..."; |
|
| 89 | + $correct = $this->getOperator($ident); |
|
| 90 | + if ($correct != '' && $correct != $ident) { |
|
| 91 | + //echo "Found in DB !\n"; |
|
| 92 | + return $correct; |
|
| 93 | + } /* |
|
| 94 | 94 | elseif ($web && $globalTranslationFetch) { |
| 95 | 95 | if (! is_numeric(substr($ident,-4))) { |
| 96 | 96 | if (count($globalTranslationSources) > 0) { |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | */ |
| 110 | - return $this->ident2icao($ident); |
|
| 111 | - } |
|
| 110 | + return $this->ident2icao($ident); |
|
| 111 | + } |
|
| 112 | 112 | |
| 113 | 113 | /* |
| 114 | 114 | function fromPlanefinder($icao) { |
@@ -11,11 +11,11 @@ discard block |
||
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | - * Gets all the spotter information based on the latest data entry |
|
| 15 | - * |
|
| 16 | - * @return Array the spotter information |
|
| 17 | - * |
|
| 18 | - */ |
|
| 14 | + * Gets all the spotter information based on the latest data entry |
|
| 15 | + * |
|
| 16 | + * @return Array the spotter information |
|
| 17 | + * |
|
| 18 | + */ |
|
| 19 | 19 | public function getLiveSpotterData($limit = '', $sort = '', $filter = array()) |
| 20 | 20 | { |
| 21 | 21 | global $globalDBdriver, $globalLiveInterval; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | if ($globalDBdriver == 'mysql') { |
| 59 | 59 | //$query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 30 SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate"; |
| 60 | 60 | $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate'.$filter_query.$orderby_query; |
| 61 | - } else if ($globalDBdriver == 'pgsql') { |
|
| 61 | + } else if ($globalDBdriver == 'pgsql') { |
|
| 62 | 62 | $query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate".$filter_query.$orderby_query; |
| 63 | 63 | } |
| 64 | 64 | $spotter_array = $Spotter->getDataFromDB($query.$limit_query); |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | - * Gets Minimal Live Spotter data |
|
| 71 | - * |
|
| 72 | - * @return Array the spotter information |
|
| 73 | - * |
|
| 74 | - */ |
|
| 70 | + * Gets Minimal Live Spotter data |
|
| 71 | + * |
|
| 72 | + * @return Array the spotter information |
|
| 73 | + * |
|
| 74 | + */ |
|
| 75 | 75 | public function getMinLiveSpotterData($filter = array()) |
| 76 | 76 | { |
| 77 | 77 | global $globalDBdriver, $globalLiveInterval; |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | // $query = 'SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk FROM spotter_live WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= spotter_live.date ORDER BY spotter_live.date GROUP BY spotter_live.flightaware_id'.$filter_query; |
| 105 | 105 | |
| 106 | 106 | //$query = 'SELECT a.aircraft_shadow, spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk FROM spotter_live WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date '.$filter_query.'LEFT JOIN (SELECT aircraft_shadow,icao FROM aircraft) a ON spotter_live.aircraft_icao = a.icao'; |
| 107 | - } else if ($globalDBdriver == 'pgsql') { |
|
| 108 | - //$query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() AT TIME ZONE 'UTC' - '30 SECONDS'->INTERVAL <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate"; |
|
| 109 | - //$query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() AT TIME ZONE 'UTC' - '".$globalLiveInterval." SECONDS'->INTERVAL <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate$orderby_query"; |
|
| 107 | + } else if ($globalDBdriver == 'pgsql') { |
|
| 108 | + //$query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() AT TIME ZONE 'UTC' - '30 SECONDS'->INTERVAL <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate"; |
|
| 109 | + //$query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() AT TIME ZONE 'UTC' - '".$globalLiveInterval." SECONDS'->INTERVAL <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate$orderby_query"; |
|
| 110 | 110 | //$query = 'SELECT spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, a.aircraft_shadow FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate '.$filter_query.'INNER JOIN (SELECT * FROM aircraft) a on spotter_live.aircraft_icao = a.icao'; |
| 111 | 111 | $query = "SELECT a.aircraft_shadow, spotter_live.ident, spotter_live.flightaware_id, spotter_live.aircraft_icao, spotter_live.departure_airport_icao as departure_airport, spotter_live.arrival_airport_icao as arrival_airport, spotter_live.latitude, spotter_live.longitude, spotter_live.altitude, spotter_live.heading, spotter_live.ground_speed, spotter_live.squawk, spotter_live.date |
| 112 | 112 | FROM spotter_live |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | // $spotter_array = Spotter->getDataFromDB($query.$limit_query); |
| 116 | 116 | //echo $query; |
| 117 | 117 | |
| 118 | - try { |
|
| 118 | + try { |
|
| 119 | 119 | $sth = $this->db->prepare($query); |
| 120 | 120 | $sth->execute(); |
| 121 | 121 | } catch(PDOException $e) { |
@@ -127,11 +127,11 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | - * Gets number of latest data entry |
|
| 131 | - * |
|
| 132 | - * @return String number of entry |
|
| 133 | - * |
|
| 134 | - */ |
|
| 130 | + * Gets number of latest data entry |
|
| 131 | + * |
|
| 132 | + * @return String number of entry |
|
| 133 | + * |
|
| 134 | + */ |
|
| 135 | 135 | public function getLiveSpotterCount($filter = array()) |
| 136 | 136 | { |
| 137 | 137 | global $globalDBdriver, $globalLiveInterval; |
@@ -151,13 +151,13 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
| 153 | 153 | if ($globalDBdriver == 'mysql') { |
| 154 | - //$query = 'SELECT COUNT(*) as nb FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate'.$filter_query; |
|
| 154 | + //$query = 'SELECT COUNT(*) as nb FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate'.$filter_query; |
|
| 155 | 155 | $query = 'SELECT COUNT(DISTINCT flightaware_id) as nb FROM spotter_live WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'.$filter_query; |
| 156 | - } elseif ($globalDBdriver == 'pgsql') { |
|
| 157 | - //$query = "SELECT COUNT(*) as nb FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() AT TIME ZONE 'UTC' - '".$globalLiveInterval." SECONDS'->INTERVAL <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate".$filter_query; |
|
| 156 | + } elseif ($globalDBdriver == 'pgsql') { |
|
| 157 | + //$query = "SELECT COUNT(*) as nb FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() AT TIME ZONE 'UTC' - '".$globalLiveInterval." SECONDS'->INTERVAL <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate".$filter_query; |
|
| 158 | 158 | $query = "SELECT COUNT(DISTINCT flightaware_id) as nb FROM spotter_live WHERE CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= date".$filter_query; |
| 159 | - } |
|
| 160 | - try { |
|
| 159 | + } |
|
| 160 | + try { |
|
| 161 | 161 | $sth = $this->db->prepare($query); |
| 162 | 162 | $sth->execute(); |
| 163 | 163 | } catch(PDOException $e) { |
@@ -168,11 +168,11 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | - * Gets all the spotter information based on the latest data entry and coord |
|
| 172 | - * |
|
| 173 | - * @return Array the spotter information |
|
| 174 | - * |
|
| 175 | - */ |
|
| 171 | + * Gets all the spotter information based on the latest data entry and coord |
|
| 172 | + * |
|
| 173 | + * @return Array the spotter information |
|
| 174 | + * |
|
| 175 | + */ |
|
| 176 | 176 | public function getLiveSpotterDatabyCoord($coord, $filter = array()) |
| 177 | 177 | { |
| 178 | 178 | global $globalDBdriver, $globalLiveInterval; |
@@ -193,140 +193,140 @@ discard block |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | if (is_array($coord)) { |
| 196 | - $minlong = filter_var($coord[0],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 197 | - $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 198 | - $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 199 | - $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 200 | - } else return array(); |
|
| 201 | - if ($globalDBdriver == 'mysql') { |
|
| 202 | - //$query = "SELECT spotter_output.* FROM spotter_output WHERE spotter_output.flightaware_id IN (SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL ".$globalLiveInterval." SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
| 203 | - $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND spotter_live.latitude BETWEEN '.$minlat.' AND '.$maxlat.' AND spotter_live.longitude BETWEEN '.$minlong.' AND '.$maxlong.' GROUP BY spotter_live.flightaware_id'.$filter_query; |
|
| 204 | - } else if ($globalDBdriver == 'pgsql') { |
|
| 205 | - $query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() at time zone 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong." GROUP BY spotter_live.flightaware_id".$filter_query; |
|
| 206 | - } |
|
| 207 | - $spotter_array = $Spotter->getDataFromDB($query); |
|
| 208 | - return $spotter_array; |
|
| 209 | - } |
|
| 196 | + $minlong = filter_var($coord[0],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 197 | + $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 198 | + $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 199 | + $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 200 | + } else return array(); |
|
| 201 | + if ($globalDBdriver == 'mysql') { |
|
| 202 | + //$query = "SELECT spotter_output.* FROM spotter_output WHERE spotter_output.flightaware_id IN (SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL ".$globalLiveInterval." SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong.")"; |
|
| 203 | + $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND spotter_live.latitude BETWEEN '.$minlat.' AND '.$maxlat.' AND spotter_live.longitude BETWEEN '.$minlong.' AND '.$maxlong.' GROUP BY spotter_live.flightaware_id'.$filter_query; |
|
| 204 | + } else if ($globalDBdriver == 'pgsql') { |
|
| 205 | + $query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE NOW() at time zone 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= l.date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND spotter_live.latitude BETWEEN ".$minlat." AND ".$maxlat." AND spotter_live.longitude BETWEEN ".$minlong." AND ".$maxlong." GROUP BY spotter_live.flightaware_id".$filter_query; |
|
| 206 | + } |
|
| 207 | + $spotter_array = $Spotter->getDataFromDB($query); |
|
| 208 | + return $spotter_array; |
|
| 209 | + } |
|
| 210 | 210 | |
| 211 | 211 | /** |
| 212 | - * Gets all the spotter information based on a user's latitude and longitude |
|
| 213 | - * |
|
| 214 | - * @return Array the spotter information |
|
| 215 | - * |
|
| 216 | - */ |
|
| 217 | - public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
|
| 218 | - { |
|
| 219 | - $Spotter = new Spotter($this->db); |
|
| 220 | - date_default_timezone_set('UTC'); |
|
| 221 | - |
|
| 222 | - if ($lat != '') |
|
| 223 | - { |
|
| 224 | - if (!is_numeric($lat)) |
|
| 225 | - { |
|
| 226 | - return false; |
|
| 227 | - } |
|
| 228 | - } |
|
| 212 | + * Gets all the spotter information based on a user's latitude and longitude |
|
| 213 | + * |
|
| 214 | + * @return Array the spotter information |
|
| 215 | + * |
|
| 216 | + */ |
|
| 217 | + public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
|
| 218 | + { |
|
| 219 | + $Spotter = new Spotter($this->db); |
|
| 220 | + date_default_timezone_set('UTC'); |
|
| 221 | + |
|
| 222 | + if ($lat != '') |
|
| 223 | + { |
|
| 224 | + if (!is_numeric($lat)) |
|
| 225 | + { |
|
| 226 | + return false; |
|
| 227 | + } |
|
| 228 | + } |
|
| 229 | 229 | |
| 230 | - if ($lng != '') |
|
| 231 | - { |
|
| 232 | - if (!is_numeric($lng)) |
|
| 233 | - { |
|
| 234 | - return false; |
|
| 235 | - } |
|
| 236 | - } |
|
| 237 | - |
|
| 238 | - if ($radius != '') |
|
| 239 | - { |
|
| 240 | - if (!is_numeric($radius)) |
|
| 241 | - { |
|
| 242 | - return false; |
|
| 243 | - } |
|
| 244 | - } |
|
| 230 | + if ($lng != '') |
|
| 231 | + { |
|
| 232 | + if (!is_numeric($lng)) |
|
| 233 | + { |
|
| 234 | + return false; |
|
| 235 | + } |
|
| 236 | + } |
|
| 237 | + |
|
| 238 | + if ($radius != '') |
|
| 239 | + { |
|
| 240 | + if (!is_numeric($radius)) |
|
| 241 | + { |
|
| 242 | + return false; |
|
| 243 | + } |
|
| 244 | + } |
|
| 245 | 245 | |
| 246 | - if ($interval != '') |
|
| 247 | - { |
|
| 248 | - if (!is_string($interval)) |
|
| 249 | - { |
|
| 250 | - $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 MINUTE) <= spotter_live.date '; |
|
| 251 | - return false; |
|
| 252 | - } else { |
|
| 253 | - if ($interval == '1m') |
|
| 254 | - { |
|
| 255 | - $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 MINUTE) <= spotter_live.date '; |
|
| 256 | - } else if ($interval == '15m'){ |
|
| 257 | - $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 15 MINUTE) <= spotter_live.date '; |
|
| 258 | - } |
|
| 259 | - } |
|
| 260 | - } else { |
|
| 261 | - $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 MINUTE) <= spotter_live.date '; |
|
| 262 | - } |
|
| 263 | - |
|
| 264 | - $query = "SELECT spotter_live.*, ( 6371 * acos( cos( radians(:lat) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians(:lng) ) + sin( radians(:lat) ) * sin( radians( latitude ) ) ) ) AS distance FROM spotter_live |
|
| 246 | + if ($interval != '') |
|
| 247 | + { |
|
| 248 | + if (!is_string($interval)) |
|
| 249 | + { |
|
| 250 | + $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 MINUTE) <= spotter_live.date '; |
|
| 251 | + return false; |
|
| 252 | + } else { |
|
| 253 | + if ($interval == '1m') |
|
| 254 | + { |
|
| 255 | + $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 MINUTE) <= spotter_live.date '; |
|
| 256 | + } else if ($interval == '15m'){ |
|
| 257 | + $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 15 MINUTE) <= spotter_live.date '; |
|
| 258 | + } |
|
| 259 | + } |
|
| 260 | + } else { |
|
| 261 | + $additional_query = ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 MINUTE) <= spotter_live.date '; |
|
| 262 | + } |
|
| 263 | + |
|
| 264 | + $query = "SELECT spotter_live.*, ( 6371 * acos( cos( radians(:lat) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians(:lng) ) + sin( radians(:lat) ) * sin( radians( latitude ) ) ) ) AS distance FROM spotter_live |
|
| 265 | 265 | WHERE spotter_live.latitude <> '' |
| 266 | 266 | AND spotter_live.longitude <> '' |
| 267 | 267 | ".$additional_query." |
| 268 | 268 | HAVING distance < :radius |
| 269 | 269 | ORDER BY distance"; |
| 270 | 270 | |
| 271 | - $spotter_array = $Spotter->getDataFromDB($query, array(':lat' => $lat, ':lng' => $lng,':radius' => $radius),$limit_query); |
|
| 271 | + $spotter_array = $Spotter->getDataFromDB($query, array(':lat' => $lat, ':lng' => $lng,':radius' => $radius),$limit_query); |
|
| 272 | 272 | |
| 273 | - return $spotter_array; |
|
| 274 | - } |
|
| 273 | + return $spotter_array; |
|
| 274 | + } |
|
| 275 | 275 | |
| 276 | 276 | |
| 277 | - /** |
|
| 278 | - * Gets all the spotter information based on a particular callsign |
|
| 279 | - * |
|
| 280 | - * @return Array the spotter information |
|
| 281 | - * |
|
| 282 | - */ |
|
| 277 | + /** |
|
| 278 | + * Gets all the spotter information based on a particular callsign |
|
| 279 | + * |
|
| 280 | + * @return Array the spotter information |
|
| 281 | + * |
|
| 282 | + */ |
|
| 283 | 283 | public function getLastLiveSpotterDataByIdent($ident) |
| 284 | 284 | { |
| 285 | 285 | $Spotter = new Spotter($this->db); |
| 286 | 286 | date_default_timezone_set('UTC'); |
| 287 | 287 | |
| 288 | 288 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
| 289 | - $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE l.ident = :ident GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate ORDER BY spotter_live.date DESC'; |
|
| 289 | + $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE l.ident = :ident GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate ORDER BY spotter_live.date DESC'; |
|
| 290 | 290 | |
| 291 | 291 | $spotter_array = $Spotter->getDataFromDB($query,array(':ident' => $ident)); |
| 292 | 292 | |
| 293 | 293 | return $spotter_array; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | - /** |
|
| 297 | - * Gets last spotter information based on a particular callsign |
|
| 298 | - * |
|
| 299 | - * @return Array the spotter information |
|
| 300 | - * |
|
| 301 | - */ |
|
| 296 | + /** |
|
| 297 | + * Gets last spotter information based on a particular callsign |
|
| 298 | + * |
|
| 299 | + * @return Array the spotter information |
|
| 300 | + * |
|
| 301 | + */ |
|
| 302 | 302 | public function getLastLiveSpotterDataById($id) |
| 303 | 303 | { |
| 304 | 304 | $Spotter = new Spotter($this->db); |
| 305 | 305 | date_default_timezone_set('UTC'); |
| 306 | 306 | |
| 307 | 307 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
| 308 | - $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE l.flightaware_id = :id GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate ORDER BY spotter_live.date DESC'; |
|
| 308 | + $query = 'SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE l.flightaware_id = :id GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate ORDER BY spotter_live.date DESC'; |
|
| 309 | 309 | |
| 310 | 310 | $spotter_array = $Spotter->getDataFromDB($query,array(':id' => $id)); |
| 311 | 311 | |
| 312 | 312 | return $spotter_array; |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | - /** |
|
| 316 | - * Gets altitude information based on a particular callsign |
|
| 317 | - * |
|
| 318 | - * @return Array the spotter information |
|
| 319 | - * |
|
| 320 | - */ |
|
| 315 | + /** |
|
| 316 | + * Gets altitude information based on a particular callsign |
|
| 317 | + * |
|
| 318 | + * @return Array the spotter information |
|
| 319 | + * |
|
| 320 | + */ |
|
| 321 | 321 | public function getAltitudeLiveSpotterDataByIdent($ident) |
| 322 | 322 | { |
| 323 | 323 | |
| 324 | 324 | date_default_timezone_set('UTC'); |
| 325 | 325 | |
| 326 | 326 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
| 327 | - $query = 'SELECT spotter_live.altitude, spotter_live.date FROM spotter_live WHERE spotter_live.ident = :ident'; |
|
| 327 | + $query = 'SELECT spotter_live.altitude, spotter_live.date FROM spotter_live WHERE spotter_live.ident = :ident'; |
|
| 328 | 328 | |
| 329 | - try { |
|
| 329 | + try { |
|
| 330 | 330 | |
| 331 | 331 | $sth = $this->db->prepare($query); |
| 332 | 332 | $sth->execute(array(':ident' => $ident)); |
@@ -338,12 +338,12 @@ discard block |
||
| 338 | 338 | return $spotter_array; |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | - /** |
|
| 342 | - * Gets all the spotter information based on a particular id |
|
| 343 | - * |
|
| 344 | - * @return Array the spotter information |
|
| 345 | - * |
|
| 346 | - */ |
|
| 341 | + /** |
|
| 342 | + * Gets all the spotter information based on a particular id |
|
| 343 | + * |
|
| 344 | + * @return Array the spotter information |
|
| 345 | + * |
|
| 346 | + */ |
|
| 347 | 347 | public function getAllLiveSpotterDataById($id) |
| 348 | 348 | { |
| 349 | 349 | date_default_timezone_set('UTC'); |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | $query = self::$global_query.' WHERE spotter_live.flightaware_id = :id ORDER BY date'; |
| 352 | 352 | // $spotter_array = Spotter->getDataFromDB($query,array(':id' => $id)); |
| 353 | 353 | |
| 354 | - try { |
|
| 354 | + try { |
|
| 355 | 355 | |
| 356 | 356 | $sth = $this->db->prepare($query); |
| 357 | 357 | $sth->execute(array(':id' => $id)); |
@@ -363,18 +363,18 @@ discard block |
||
| 363 | 363 | return $spotter_array; |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | - /** |
|
| 367 | - * Gets all the spotter information based on a particular ident |
|
| 368 | - * |
|
| 369 | - * @return Array the spotter information |
|
| 370 | - * |
|
| 371 | - */ |
|
| 366 | + /** |
|
| 367 | + * Gets all the spotter information based on a particular ident |
|
| 368 | + * |
|
| 369 | + * @return Array the spotter information |
|
| 370 | + * |
|
| 371 | + */ |
|
| 372 | 372 | public function getAllLiveSpotterDataByIdent($ident) |
| 373 | 373 | { |
| 374 | 374 | date_default_timezone_set('UTC'); |
| 375 | 375 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
| 376 | 376 | $query = self::$global_query.' WHERE spotter_live.ident = :ident'; |
| 377 | - try { |
|
| 377 | + try { |
|
| 378 | 378 | |
| 379 | 379 | $sth = $this->db->prepare($query); |
| 380 | 380 | $sth->execute(array(':ident' => $ident)); |
@@ -387,24 +387,24 @@ discard block |
||
| 387 | 387 | |
| 388 | 388 | |
| 389 | 389 | /** |
| 390 | - * Deletes all info in the table |
|
| 391 | - * |
|
| 392 | - * @return String success or false |
|
| 393 | - * |
|
| 394 | - */ |
|
| 390 | + * Deletes all info in the table |
|
| 391 | + * |
|
| 392 | + * @return String success or false |
|
| 393 | + * |
|
| 394 | + */ |
|
| 395 | 395 | public function deleteLiveSpotterData() |
| 396 | 396 | { |
| 397 | 397 | global $globalDBdriver; |
| 398 | 398 | if ($globalDBdriver == 'mysql') { |
| 399 | 399 | //$query = "DELETE FROM spotter_live WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 30 MINUTE) >= spotter_live.date"; |
| 400 | 400 | $query = 'DELETE FROM spotter_live WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 9 HOUR) >= spotter_live.date'; |
| 401 | - //$query = "DELETE FROM spotter_live WHERE spotter_live.id IN (SELECT spotter_live.id FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 HOUR) >= spotter_live.date)"; |
|
| 401 | + //$query = "DELETE FROM spotter_live WHERE spotter_live.id IN (SELECT spotter_live.id FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 HOUR) >= spotter_live.date)"; |
|
| 402 | 402 | |
| 403 | 403 | } elseif ($globalDBdriver == 'pgsql') { |
| 404 | 404 | $query = "DELETE FROM spotter_live WHERE NOW() AT TIME ZONE 'UTC' - INTERVAL '9 HOURS' >= spotter_live.date"; |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | - try { |
|
| 407 | + try { |
|
| 408 | 408 | |
| 409 | 409 | $sth = $this->db->prepare($query); |
| 410 | 410 | $sth->execute(); |
@@ -416,18 +416,18 @@ discard block |
||
| 416 | 416 | } |
| 417 | 417 | |
| 418 | 418 | /** |
| 419 | - * Deletes all info in the table for aircraft not seen since 2 HOUR |
|
| 420 | - * |
|
| 421 | - * @return String success or false |
|
| 422 | - * |
|
| 423 | - */ |
|
| 419 | + * Deletes all info in the table for aircraft not seen since 2 HOUR |
|
| 420 | + * |
|
| 421 | + * @return String success or false |
|
| 422 | + * |
|
| 423 | + */ |
|
| 424 | 424 | public function deleteLiveSpotterDataNotUpdated() |
| 425 | 425 | { |
| 426 | 426 | global $globalDBdriver, $globalDebug; |
| 427 | 427 | if ($globalDBdriver == 'mysql') { |
| 428 | 428 | //$query = 'SELECT flightaware_id FROM spotter_live WHERE DATE_SUB(UTC_TIMESTAMP(), INTERVAL 1 HOUR) >= spotter_live.date AND spotter_live.flightaware_id NOT IN (SELECT flightaware_id FROM spotter_live WHERE DATE_SUB(UTC_TIMESTAMP(), INTERVAL 1 HOUR) < spotter_live.date) LIMIT 800 OFFSET 0'; |
| 429 | - $query = "SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT flightaware_id,MAX(date) as max_date FROM spotter_live GROUP BY flightaware_id) s ON s.flightaware_id = spotter_live.flightaware_id AND DATE_SUB(UTC_TIMESTAMP(), INTERVAL 2 HOUR) >= s.max_date LIMIT 1200 OFFSET 0"; |
|
| 430 | - try { |
|
| 429 | + $query = "SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT flightaware_id,MAX(date) as max_date FROM spotter_live GROUP BY flightaware_id) s ON s.flightaware_id = spotter_live.flightaware_id AND DATE_SUB(UTC_TIMESTAMP(), INTERVAL 2 HOUR) >= s.max_date LIMIT 1200 OFFSET 0"; |
|
| 430 | + try { |
|
| 431 | 431 | |
| 432 | 432 | $sth = $this->db->prepare($query); |
| 433 | 433 | $sth->execute(); |
@@ -435,8 +435,8 @@ discard block |
||
| 435 | 435 | return "error"; |
| 436 | 436 | } |
| 437 | 437 | $query_delete = 'DELETE FROM spotter_live WHERE flightaware_id IN ('; |
| 438 | - $i = 0; |
|
| 439 | - $j =0; |
|
| 438 | + $i = 0; |
|
| 439 | + $j =0; |
|
| 440 | 440 | $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
| 441 | 441 | foreach($all as $row) |
| 442 | 442 | { |
@@ -444,20 +444,20 @@ discard block |
||
| 444 | 444 | $j++; |
| 445 | 445 | if ($j == 30) { |
| 446 | 446 | if ($globalDebug) echo "."; |
| 447 | - try { |
|
| 447 | + try { |
|
| 448 | 448 | |
| 449 | 449 | $sth = $this->db->prepare(substr($query_delete,0,-1).")"); |
| 450 | 450 | $sth->execute(); |
| 451 | 451 | } catch(PDOException $e) { |
| 452 | 452 | return "error"; |
| 453 | 453 | } |
| 454 | - $query_delete = 'DELETE FROM spotter_live WHERE flightaware_id IN ('; |
|
| 455 | - $j = 0; |
|
| 454 | + $query_delete = 'DELETE FROM spotter_live WHERE flightaware_id IN ('; |
|
| 455 | + $j = 0; |
|
| 456 | 456 | } |
| 457 | 457 | $query_delete .= "'".$row['flightaware_id']."',"; |
| 458 | 458 | } |
| 459 | 459 | if ($i > 0) { |
| 460 | - try { |
|
| 460 | + try { |
|
| 461 | 461 | |
| 462 | 462 | $sth = $this->db->prepare(substr($query_delete,0,-1).")"); |
| 463 | 463 | $sth->execute(); |
@@ -468,9 +468,9 @@ discard block |
||
| 468 | 468 | return "success"; |
| 469 | 469 | } elseif ($globalDBdriver == 'pgsql') { |
| 470 | 470 | //$query = "SELECT flightaware_id FROM spotter_live WHERE NOW() AT TIME ZONE 'UTC' - INTERVAL '9 HOURS' >= spotter_live.date AND spotter_live.flightaware_id NOT IN (SELECT flightaware_id FROM spotter_live WHERE NOW() AT TIME ZONE 'UTC' - INTERVAL '9 HOURS' < spotter_live.date) LIMIT 800 OFFSET 0"; |
| 471 | - //$query = "SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT flightaware_id,MAX(date) as max_date FROM spotter_live GROUP BY flightaware_id) s ON s.flightaware_id = spotter_live.flightaware_id AND NOW() AT TIME ZONE 'UTC' - INTERVAL '2 HOURS' >= s.max_date LIMIT 800 OFFSET 0"; |
|
| 472 | - $query = "DELETE FROM spotter_live WHERE flightaware_id IN (SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT flightaware_id,MAX(date) as max_date FROM spotter_live GROUP BY flightaware_id) s ON s.flightaware_id = spotter_live.flightaware_id AND NOW() AT TIME ZONE 'UTC' - INTERVAL '2 HOURS' >= s.max_date LIMIT 800 OFFSET 0)"; |
|
| 473 | - try { |
|
| 471 | + //$query = "SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT flightaware_id,MAX(date) as max_date FROM spotter_live GROUP BY flightaware_id) s ON s.flightaware_id = spotter_live.flightaware_id AND NOW() AT TIME ZONE 'UTC' - INTERVAL '2 HOURS' >= s.max_date LIMIT 800 OFFSET 0"; |
|
| 472 | + $query = "DELETE FROM spotter_live WHERE flightaware_id IN (SELECT spotter_live.flightaware_id FROM spotter_live INNER JOIN (SELECT flightaware_id,MAX(date) as max_date FROM spotter_live GROUP BY flightaware_id) s ON s.flightaware_id = spotter_live.flightaware_id AND NOW() AT TIME ZONE 'UTC' - INTERVAL '2 HOURS' >= s.max_date LIMIT 800 OFFSET 0)"; |
|
| 473 | + try { |
|
| 474 | 474 | |
| 475 | 475 | $sth = $this->db->prepare($query); |
| 476 | 476 | $sth->execute(); |
@@ -514,17 +514,17 @@ discard block |
||
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | /** |
| 517 | - * Deletes all info in the table for an ident |
|
| 518 | - * |
|
| 519 | - * @return String success or false |
|
| 520 | - * |
|
| 521 | - */ |
|
| 517 | + * Deletes all info in the table for an ident |
|
| 518 | + * |
|
| 519 | + * @return String success or false |
|
| 520 | + * |
|
| 521 | + */ |
|
| 522 | 522 | public function deleteLiveSpotterDataByIdent($ident) |
| 523 | 523 | { |
| 524 | 524 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
| 525 | 525 | $query = 'DELETE FROM spotter_live WHERE ident = :ident'; |
| 526 | 526 | |
| 527 | - try { |
|
| 527 | + try { |
|
| 528 | 528 | |
| 529 | 529 | $sth = $this->db->prepare($query); |
| 530 | 530 | $sth->execute(array(':ident' => $ident)); |
@@ -536,17 +536,17 @@ discard block |
||
| 536 | 536 | } |
| 537 | 537 | |
| 538 | 538 | /** |
| 539 | - * Deletes all info in the table for an id |
|
| 540 | - * |
|
| 541 | - * @return String success or false |
|
| 542 | - * |
|
| 543 | - */ |
|
| 539 | + * Deletes all info in the table for an id |
|
| 540 | + * |
|
| 541 | + * @return String success or false |
|
| 542 | + * |
|
| 543 | + */ |
|
| 544 | 544 | public function deleteLiveSpotterDataById($id) |
| 545 | 545 | { |
| 546 | 546 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
| 547 | 547 | $query = 'DELETE FROM spotter_live WHERE flightaware_id = :id'; |
| 548 | 548 | |
| 549 | - try { |
|
| 549 | + try { |
|
| 550 | 550 | |
| 551 | 551 | $sth = $this->db->prepare($query); |
| 552 | 552 | $sth->execute(array(':id' => $id)); |
@@ -559,11 +559,11 @@ discard block |
||
| 559 | 559 | |
| 560 | 560 | |
| 561 | 561 | /** |
| 562 | - * Gets the aircraft ident within the last hour |
|
| 563 | - * |
|
| 564 | - * @return String the ident |
|
| 565 | - * |
|
| 566 | - */ |
|
| 562 | + * Gets the aircraft ident within the last hour |
|
| 563 | + * |
|
| 564 | + * @return String the ident |
|
| 565 | + * |
|
| 566 | + */ |
|
| 567 | 567 | public function getIdentFromLastHour($ident) |
| 568 | 568 | { |
| 569 | 569 | global $globalDBdriver, $globalTimezone; |
@@ -589,14 +589,14 @@ discard block |
||
| 589 | 589 | $ident_result = $row['ident']; |
| 590 | 590 | } |
| 591 | 591 | return $ident_result; |
| 592 | - } |
|
| 592 | + } |
|
| 593 | 593 | |
| 594 | 594 | /** |
| 595 | - * Check recent aircraft |
|
| 596 | - * |
|
| 597 | - * @return String the ident |
|
| 598 | - * |
|
| 599 | - */ |
|
| 595 | + * Check recent aircraft |
|
| 596 | + * |
|
| 597 | + * @return String the ident |
|
| 598 | + * |
|
| 599 | + */ |
|
| 600 | 600 | public function checkIdentRecent($ident) |
| 601 | 601 | { |
| 602 | 602 | global $globalDBdriver, $globalTimezone; |
@@ -622,14 +622,14 @@ discard block |
||
| 622 | 622 | $ident_result = $row['flightaware_id']; |
| 623 | 623 | } |
| 624 | 624 | return $ident_result; |
| 625 | - } |
|
| 625 | + } |
|
| 626 | 626 | |
| 627 | 627 | /** |
| 628 | - * Check recent aircraft by ModeS |
|
| 629 | - * |
|
| 630 | - * @return String the ModeS |
|
| 631 | - * |
|
| 632 | - */ |
|
| 628 | + * Check recent aircraft by ModeS |
|
| 629 | + * |
|
| 630 | + * @return String the ModeS |
|
| 631 | + * |
|
| 632 | + */ |
|
| 633 | 633 | public function checkModeSRecent($modes) |
| 634 | 634 | { |
| 635 | 635 | global $globalDBdriver, $globalTimezone; |
@@ -656,19 +656,19 @@ discard block |
||
| 656 | 656 | $ident_result = $row['flightaware_id']; |
| 657 | 657 | } |
| 658 | 658 | return $ident_result; |
| 659 | - } |
|
| 659 | + } |
|
| 660 | 660 | |
| 661 | 661 | /** |
| 662 | - * Adds a new spotter data |
|
| 663 | - * |
|
| 664 | - * @param String $flightaware_id the ID from flightaware |
|
| 665 | - * @param String $ident the flight ident |
|
| 666 | - * @param String $aircraft_icao the aircraft type |
|
| 667 | - * @param String $departure_airport_icao the departure airport |
|
| 668 | - * @param String $arrival_airport_icao the arrival airport |
|
| 669 | - * @return String success or false |
|
| 670 | - * |
|
| 671 | - */ |
|
| 662 | + * Adds a new spotter data |
|
| 663 | + * |
|
| 664 | + * @param String $flightaware_id the ID from flightaware |
|
| 665 | + * @param String $ident the flight ident |
|
| 666 | + * @param String $aircraft_icao the aircraft type |
|
| 667 | + * @param String $departure_airport_icao the departure airport |
|
| 668 | + * @param String $arrival_airport_icao the arrival airport |
|
| 669 | + * @return String success or false |
|
| 670 | + * |
|
| 671 | + */ |
|
| 672 | 672 | public function addLiveSpotterData($flightaware_id = '', $ident = '', $aircraft_icao = '', $departure_airport_icao = '', $arrival_airport_icao = '', $latitude = '', $longitude = '', $waypoints = '', $altitude = '', $heading = '', $groundspeed = '', $date = '',$departure_airport_time = '', $arrival_airport_time = '', $squawk = '', $route_stop = '', $ModeS = '', $putinarchive = false,$registration = '',$pilot_id = '', $pilot_name = '', $verticalrate = '', $noarchive = false, $ground = false,$format_source = '', $source_name = '', $over_country = '') |
| 673 | 673 | { |
| 674 | 674 | global $globalURL, $globalArchive, $globalDebug; |
@@ -894,10 +894,10 @@ discard block |
||
| 894 | 894 | $arrival_airport_country = ''; |
| 895 | 895 | } |
| 896 | 896 | |
| 897 | - if ($squawk == '' || $Common->isInteger($squawk) == false ) $squawk = NULL; |
|
| 898 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) == false ) $verticalrate = NULL; |
|
| 899 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) == false ) $groundspeed = 0; |
|
| 900 | - if ($heading == '' || $Common->isInteger($heading) == false ) $heading = 0; |
|
| 897 | + if ($squawk == '' || $Common->isInteger($squawk) == false ) $squawk = NULL; |
|
| 898 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) == false ) $verticalrate = NULL; |
|
| 899 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) == false ) $groundspeed = 0; |
|
| 900 | + if ($heading == '' || $Common->isInteger($heading) == false ) $heading = 0; |
|
| 901 | 901 | |
| 902 | 902 | $query = 'INSERT INTO spotter_live (flightaware_id, ident, registration, airline_name, airline_icao, airline_country, airline_type, aircraft_icao, aircraft_shadow, aircraft_name, aircraft_manufacturer, departure_airport_icao, departure_airport_name, departure_airport_city, departure_airport_country, arrival_airport_icao, arrival_airport_name, arrival_airport_city, arrival_airport_country, latitude, longitude, waypoints, altitude, heading, ground_speed, date, departure_airport_time, arrival_airport_time, squawk, route_stop, ModeS, pilot_id, pilot_name, verticalrate, ground, format_source, source_name, over_country) |
| 903 | 903 | VALUES (:flightaware_id,:ident,:registration,:airline_name,:airline_icao,:airline_country,:airline_type,:aircraft_icao,:aircraft_shadow,:aircraft_type,:aircraft_manufacturer,:departure_airport_icao,:departure_airport_name, :departure_airport_city, :departure_airport_country, :arrival_airport_icao, :arrival_airport_name, :arrival_airport_city, :arrival_airport_country, :latitude,:longitude,:waypoints,:altitude,:heading,:groundspeed,:date,:departure_airport_time,:arrival_airport_time,:squawk,:route_stop,:ModeS, :pilot_id, :pilot_name, :verticalrate, :ground, :format_source, :source_name, :over_country)'; |
@@ -908,13 +908,13 @@ discard block |
||
| 908 | 908 | |
| 909 | 909 | $sth = $this->db->prepare($query); |
| 910 | 910 | $sth->execute($query_values); |
| 911 | - } catch(PDOException $e) { |
|
| 912 | - return "error : ".$e->getMessage(); |
|
| 913 | - } |
|
| 911 | + } catch(PDOException $e) { |
|
| 912 | + return "error : ".$e->getMessage(); |
|
| 913 | + } |
|
| 914 | 914 | if (isset($globalArchive) && $globalArchive && $putinarchive && !$noarchive) { |
| 915 | - if ($globalDebug) echo '(Add to SBS archive : '; |
|
| 916 | - $result = $SpotterArchive->addSpotterArchiveData($flightaware_id, $ident, $registration, $airline_name, $airline_icao, $airline_country, $airline_type, $aircraft_icao, $aircraft_shadow, $aircraft_name, $aircraft_manufacturer, $departure_airport_icao, $departure_airport_name, $departure_airport_city, $departure_airport_country, $departure_airport_time,$arrival_airport_icao, $arrival_airport_name, $arrival_airport_city, $arrival_airport_country, $arrival_airport_time, $route_stop, $date,$latitude, $longitude, $waypoints, $altitude, $heading, $groundspeed, $squawk, $ModeS, $pilot_id, $pilot_name,$verticalrate,$format_source,$source_name, $over_country); |
|
| 917 | - if ($globalDebug) echo $result.')'; |
|
| 915 | + if ($globalDebug) echo '(Add to SBS archive : '; |
|
| 916 | + $result = $SpotterArchive->addSpotterArchiveData($flightaware_id, $ident, $registration, $airline_name, $airline_icao, $airline_country, $airline_type, $aircraft_icao, $aircraft_shadow, $aircraft_name, $aircraft_manufacturer, $departure_airport_icao, $departure_airport_name, $departure_airport_city, $departure_airport_country, $departure_airport_time,$arrival_airport_icao, $arrival_airport_name, $arrival_airport_city, $arrival_airport_country, $arrival_airport_time, $route_stop, $date,$latitude, $longitude, $waypoints, $altitude, $heading, $groundspeed, $squawk, $ModeS, $pilot_id, $pilot_name,$verticalrate,$format_source,$source_name, $over_country); |
|
| 917 | + if ($globalDebug) echo $result.')'; |
|
| 918 | 918 | } |
| 919 | 919 | return "success"; |
| 920 | 920 | |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | public $latest_schema = 23; |
| 8 | 8 | |
| 9 | 9 | public function __construct($dbc = null,$dbname = null) { |
| 10 | - global $globalDBdriver; |
|
| 11 | - if ($dbc === null) { |
|
| 10 | + global $globalDBdriver; |
|
| 11 | + if ($dbc === null) { |
|
| 12 | 12 | if ($this->db === null && $dbname === null) { |
| 13 | - $this->createDBConnection(); |
|
| 13 | + $this->createDBConnection(); |
|
| 14 | 14 | } else { |
| 15 | - $this->createDBConnection($dbname); |
|
| 15 | + $this->createDBConnection($dbname); |
|
| 16 | 16 | } |
| 17 | - } elseif ($dbname === null || $dbname === 'default') { |
|
| 17 | + } elseif ($dbname === null || $dbname === 'default') { |
|
| 18 | 18 | $this->db = $dbc; |
| 19 | 19 | if ($this->connectionExists() === false) { |
| 20 | 20 | /* |
@@ -24,19 +24,19 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | $this->createDBConnection(); |
| 26 | 26 | } |
| 27 | - } else { |
|
| 27 | + } else { |
|
| 28 | 28 | //$this->connectionExists(); |
| 29 | 29 | $this->dbs[$dbname] = $dbc; |
| 30 | - } |
|
| 30 | + } |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * Creates the database connection |
|
| 36 | - * |
|
| 37 | - * @return Boolean of the database connection |
|
| 38 | - * |
|
| 39 | - */ |
|
| 35 | + * Creates the database connection |
|
| 36 | + * |
|
| 37 | + * @return Boolean of the database connection |
|
| 38 | + * |
|
| 39 | + */ |
|
| 40 | 40 | |
| 41 | 41 | public function createDBConnection($DBname = null) |
| 42 | 42 | { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | return false; |
| 119 | 119 | } |
| 120 | 120 | if($results->rowCount()>0) { |
| 121 | - return true; |
|
| 121 | + return true; |
|
| 122 | 122 | } |
| 123 | 123 | else return false; |
| 124 | 124 | } |
@@ -135,14 +135,14 @@ discard block |
||
| 135 | 135 | $sum = $sum->fetchColumn(0); |
| 136 | 136 | } else $sum = 0; |
| 137 | 137 | if (intval($sum) !== 2) { |
| 138 | - return false; |
|
| 138 | + return false; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | } catch(PDOException $e) { |
| 142 | 142 | if($e->getCode() != 'HY000' || !stristr($e->getMessage(), 'server has gone away')) { |
| 143 | - throw $e; |
|
| 144 | - } |
|
| 145 | - //echo 'error ! '.$e->getMessage(); |
|
| 143 | + throw $e; |
|
| 144 | + } |
|
| 145 | + //echo 'error ! '.$e->getMessage(); |
|
| 146 | 146 | return false; |
| 147 | 147 | } |
| 148 | 148 | return true; |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | return false; |
| 167 | 167 | } |
| 168 | 168 | if($results->rowCount()>0) { |
| 169 | - return true; |
|
| 169 | + return true; |
|
| 170 | 170 | } |
| 171 | 171 | else return false; |
| 172 | 172 | } |
@@ -220,8 +220,8 @@ discard block |
||
| 220 | 220 | $version = 0; |
| 221 | 221 | if ($this->tableExists('aircraft')) { |
| 222 | 222 | if (!$this->tableExists('config')) { |
| 223 | - $version = '1'; |
|
| 224 | - return $version; |
|
| 223 | + $version = '1'; |
|
| 224 | + return $version; |
|
| 225 | 225 | } else { |
| 226 | 226 | $Connection = new Connection(); |
| 227 | 227 | $query = "SELECT value FROM config WHERE name = 'schema_version' LIMIT 1"; |
@@ -242,8 +242,8 @@ discard block |
||
| 242 | 242 | * @return Boolean if latest version or not |
| 243 | 243 | */ |
| 244 | 244 | public function latest() { |
| 245 | - if ($this->check_schema_version() == $this->latest_schema) return true; |
|
| 246 | - else return false; |
|
| 245 | + if ($this->check_schema_version() == $this->latest_schema) return true; |
|
| 246 | + else return false; |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | } |