@@ -68,6 +68,10 @@ discard block |
||
| 68 | 68 | 't', 'u', 'v', 'w' // 119 |
| 69 | 69 | ); // char 64 |
| 70 | 70 | */ |
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * @param integer $ascii |
|
| 74 | + */ |
|
| 71 | 75 | private function asciidec_2_8bit($ascii) { |
| 72 | 76 | //only process in the following range: 48-87, 96-119 |
| 73 | 77 | if ($ascii < 48) { } |
@@ -93,6 +97,10 @@ discard block |
||
| 93 | 97 | return(substr($bin, -6)); |
| 94 | 98 | } |
| 95 | 99 | |
| 100 | + /** |
|
| 101 | + * @param integer $_start |
|
| 102 | + * @param integer $_size |
|
| 103 | + */ |
|
| 96 | 104 | private function binchar($_str, $_start, $_size) { |
| 97 | 105 | // ' ' --- '?', // 0x20 - 0x3F |
| 98 | 106 | // '@' --- '_', // 0x40 - 0x5F |
@@ -117,6 +125,10 @@ discard block |
||
| 117 | 125 | } |
| 118 | 126 | |
| 119 | 127 | // function for decoding the AIS Message ITU Payload |
| 128 | + |
|
| 129 | + /** |
|
| 130 | + * @param string $_aisdata |
|
| 131 | + */ |
|
| 120 | 132 | private function decode_ais($_aisdata) { |
| 121 | 133 | $ro = new stdClass(); // return object |
| 122 | 134 | $ro->cls = 0; // AIS class undefined, also indicate unparsed msg |
@@ -202,6 +214,12 @@ discard block |
||
| 202 | 214 | } |
| 203 | 215 | } |
| 204 | 216 | |
| 217 | + /** |
|
| 218 | + * @param string $_itu |
|
| 219 | + * @param integer $_len |
|
| 220 | + * @param integer $_filler |
|
| 221 | + * @param string $aux |
|
| 222 | + */ |
|
| 205 | 223 | public function process_ais_itu($_itu, $_len, $_filler, $aux /*, $ais_ch*/) { |
| 206 | 224 | global $port; // tcpip port... |
| 207 | 225 | |
@@ -221,6 +239,10 @@ discard block |
||
| 221 | 239 | |
| 222 | 240 | // char* - AIS \r terminated string |
| 223 | 241 | // TCP based streams which send messages in full can use this instead of calling process_ais_buf |
| 242 | + |
|
| 243 | + /** |
|
| 244 | + * @param string $rawdata |
|
| 245 | + */ |
|
| 224 | 246 | public function process_ais_raw($rawdata, $aux = '') { // return int |
| 225 | 247 | static $num_seq; // 1 to 9 |
| 226 | 248 | static $seq; // 1 to 9 |
@@ -6,6 +6,9 @@ discard block |
||
| 6 | 6 | public $dbs = array(); |
| 7 | 7 | public $latest_schema = 37; |
| 8 | 8 | |
| 9 | + /** |
|
| 10 | + * @param string $dbname |
|
| 11 | + */ |
|
| 9 | 12 | public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) { |
| 10 | 13 | global $globalDBdriver; |
| 11 | 14 | if ($dbc === null) { |
@@ -132,6 +135,9 @@ discard block |
||
| 132 | 135 | return true; |
| 133 | 136 | } |
| 134 | 137 | |
| 138 | + /** |
|
| 139 | + * @param string $table |
|
| 140 | + */ |
|
| 135 | 141 | public function tableExists($table) |
| 136 | 142 | { |
| 137 | 143 | global $globalDBdriver, $globalDBname; |
@@ -181,6 +187,11 @@ discard block |
||
| 181 | 187 | /* |
| 182 | 188 | * Check if index exist |
| 183 | 189 | */ |
| 190 | + |
|
| 191 | + /** |
|
| 192 | + * @param string $table |
|
| 193 | + * @param string $index |
|
| 194 | + */ |
|
| 184 | 195 | public function indexExists($table,$index) |
| 185 | 196 | { |
| 186 | 197 | global $globalDBdriver, $globalDBname; |
@@ -223,6 +234,10 @@ discard block |
||
| 223 | 234 | return $columns; |
| 224 | 235 | } |
| 225 | 236 | |
| 237 | + /** |
|
| 238 | + * @param string $table |
|
| 239 | + * @param string $column |
|
| 240 | + */ |
|
| 226 | 241 | public function getColumnType($table,$column) { |
| 227 | 242 | $select = $this->db->query('SELECT '.$column.' FROM '.$table); |
| 228 | 243 | $tomet = $select->getColumnMeta(0); |
@@ -233,6 +248,11 @@ discard block |
||
| 233 | 248 | * Check if a column name exist in a table |
| 234 | 249 | * @return Boolean column exist or not |
| 235 | 250 | */ |
| 251 | + |
|
| 252 | + /** |
|
| 253 | + * @param string $table |
|
| 254 | + * @param string $name |
|
| 255 | + */ |
|
| 236 | 256 | public function checkColumnName($table,$name) |
| 237 | 257 | { |
| 238 | 258 | global $globalDBdriver, $globalDBname; |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * Get SQL query part for filter used |
| 17 | 17 | * @param Array $filter the filter |
| 18 | - * @return Array the SQL part |
|
| 18 | + * @return string the SQL part |
|
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | public function getFilter($filter = array(),$where = false,$and = false) { |
@@ -502,9 +502,6 @@ discard block |
||
| 502 | 502 | /** |
| 503 | 503 | * Update ident spotter data |
| 504 | 504 | * |
| 505 | - * @param String $flightaware_id the ID from flightaware |
|
| 506 | - * @param String $ident the flight ident |
|
| 507 | - * @return String success or false |
|
| 508 | 505 | * |
| 509 | 506 | */ |
| 510 | 507 | public function updateIdentMarineData($fammarine_id = '', $ident = '',$fromsource = NULL) |
@@ -526,10 +523,6 @@ discard block |
||
| 526 | 523 | /** |
| 527 | 524 | * Update latest spotter data |
| 528 | 525 | * |
| 529 | - * @param String $flightaware_id the ID from flightaware |
|
| 530 | - * @param String $ident the flight ident |
|
| 531 | - * @param String $arrival_airport_icao the arrival airport |
|
| 532 | - * @return String success or false |
|
| 533 | 526 | * |
| 534 | 527 | */ |
| 535 | 528 | public function updateLatestMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $groundspeed = NULL, $date = '') |
@@ -551,28 +544,6 @@ discard block |
||
| 551 | 544 | /** |
| 552 | 545 | * Adds a new spotter data |
| 553 | 546 | * |
| 554 | - * @param String $flightaware_id the ID from flightaware |
|
| 555 | - * @param String $ident the flight ident |
|
| 556 | - * @param String $aircraft_icao the aircraft type |
|
| 557 | - * @param String $departure_airport_icao the departure airport |
|
| 558 | - * @param String $arrival_airport_icao the arrival airport |
|
| 559 | - * @param String $latitude latitude of flight |
|
| 560 | - * @param String $longitude latitude of flight |
|
| 561 | - * @param String $waypoints waypoints of flight |
|
| 562 | - * @param String $heading heading of flight |
|
| 563 | - * @param String $groundspeed speed of flight |
|
| 564 | - * @param String $date date of flight |
|
| 565 | - * @param String $departure_airport_time departure time of flight |
|
| 566 | - * @param String $arrival_airport_time arrival time of flight |
|
| 567 | - * @param String $squawk squawk code of flight |
|
| 568 | - * @param String $route_stop route stop of flight |
|
| 569 | - * @param String $highlight highlight or not |
|
| 570 | - * @param String $ModeS ModesS code of flight |
|
| 571 | - * @param String $registration registration code of flight |
|
| 572 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 573 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 574 | - * @param String $verticalrate vertival rate of flight |
|
| 575 | - * @return String success or false |
|
| 576 | 547 | */ |
| 577 | 548 | public function addMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $heading = '', $groundspeed = '', $date = '', $mmsi = '',$type = '',$status = '',$format_source = '', $source_name = '') |
| 578 | 549 | { |
@@ -1442,7 +1413,7 @@ discard block |
||
| 1442 | 1413 | /** |
| 1443 | 1414 | * Parses the direction degrees to working |
| 1444 | 1415 | * |
| 1445 | - * @param Float $direction the direction in degrees |
|
| 1416 | + * @param integer $direction the direction in degrees |
|
| 1446 | 1417 | * @return Array the direction information |
| 1447 | 1418 | * |
| 1448 | 1419 | */ |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Get SQL query part for filter used |
| 16 | 16 | * @param Array $filter the filter |
| 17 | - * @return Array the SQL part |
|
| 17 | + * @return string the SQL part |
|
| 18 | 18 | */ |
| 19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -762,10 +762,6 @@ discard block |
||
| 762 | 762 | * |
| 763 | 763 | * @param String $fammarine_id the ID from flightaware |
| 764 | 764 | * @param String $ident the flight ident |
| 765 | - * @param String $aircraft_icao the aircraft type |
|
| 766 | - * @param String $departure_airport_icao the departure airport |
|
| 767 | - * @param String $arrival_airport_icao the arrival airport |
|
| 768 | - * @return String success or false |
|
| 769 | 765 | * |
| 770 | 766 | */ |
| 771 | 767 | public function addLiveMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $heading = '', $groundspeed = '', $date = '', $putinarchive = false, $mmsi = '',$type = '',$status = '',$noarchive = false,$format_source = '', $source_name = '', $over_country = '') |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * Get SQL query part for filter used |
| 17 | 17 | * @param Array $filter the filter |
| 18 | - * @return Array the SQL part |
|
| 18 | + * @return string the SQL part |
|
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | public function getFilter($filter = array(),$where = false,$and = false) { |
@@ -486,9 +486,6 @@ discard block |
||
| 486 | 486 | /** |
| 487 | 487 | * Update ident spotter data |
| 488 | 488 | * |
| 489 | - * @param String $flightaware_id the ID from flightaware |
|
| 490 | - * @param String $ident the flight ident |
|
| 491 | - * @return String success or false |
|
| 492 | 489 | * |
| 493 | 490 | */ |
| 494 | 491 | public function updateIdentTrackerData($famtrackid = '', $ident = '',$fromsource = NULL) |
@@ -510,10 +507,6 @@ discard block |
||
| 510 | 507 | /** |
| 511 | 508 | * Update latest spotter data |
| 512 | 509 | * |
| 513 | - * @param String $flightaware_id the ID from flightaware |
|
| 514 | - * @param String $ident the flight ident |
|
| 515 | - * @param String $arrival_airport_icao the arrival airport |
|
| 516 | - * @return String success or false |
|
| 517 | 510 | * |
| 518 | 511 | */ |
| 519 | 512 | public function updateLatestTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $groundspeed = NULL, $date = '') |
@@ -535,29 +528,6 @@ discard block |
||
| 535 | 528 | /** |
| 536 | 529 | * Adds a new spotter data |
| 537 | 530 | * |
| 538 | - * @param String $flightaware_id the ID from flightaware |
|
| 539 | - * @param String $ident the flight ident |
|
| 540 | - * @param String $aircraft_icao the aircraft type |
|
| 541 | - * @param String $departure_airport_icao the departure airport |
|
| 542 | - * @param String $arrival_airport_icao the arrival airport |
|
| 543 | - * @param String $latitude latitude of flight |
|
| 544 | - * @param String $longitude latitude of flight |
|
| 545 | - * @param String $waypoints waypoints of flight |
|
| 546 | - * @param String $altitude altitude of flight |
|
| 547 | - * @param String $heading heading of flight |
|
| 548 | - * @param String $groundspeed speed of flight |
|
| 549 | - * @param String $date date of flight |
|
| 550 | - * @param String $departure_airport_time departure time of flight |
|
| 551 | - * @param String $arrival_airport_time arrival time of flight |
|
| 552 | - * @param String $squawk squawk code of flight |
|
| 553 | - * @param String $route_stop route stop of flight |
|
| 554 | - * @param String $highlight highlight or not |
|
| 555 | - * @param String $ModeS ModesS code of flight |
|
| 556 | - * @param String $registration registration code of flight |
|
| 557 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 558 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 559 | - * @param String $verticalrate vertival rate of flight |
|
| 560 | - * @return String success or false |
|
| 561 | 531 | */ |
| 562 | 532 | public function addTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $heading = '', $groundspeed = '', $date = '', $comment = '', $type = '',$format_source = '', $source_name = '') |
| 563 | 533 | { |
@@ -1428,7 +1398,7 @@ discard block |
||
| 1428 | 1398 | /** |
| 1429 | 1399 | * Parses the direction degrees to working |
| 1430 | 1400 | * |
| 1431 | - * @param Float $direction the direction in degrees |
|
| 1401 | + * @param integer $direction the direction in degrees |
|
| 1432 | 1402 | * @return Array the direction information |
| 1433 | 1403 | * |
| 1434 | 1404 | */ |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * Get SQL query part for filter used |
| 16 | 16 | * @param Array $filter the filter |
| 17 | - * @return Array the SQL part |
|
| 17 | + * @return string the SQL part |
|
| 18 | 18 | */ |
| 19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -759,10 +759,6 @@ discard block |
||
| 759 | 759 | * |
| 760 | 760 | * @param String $famtrackid the ID from flightaware |
| 761 | 761 | * @param String $ident the flight ident |
| 762 | - * @param String $aircraft_icao the aircraft type |
|
| 763 | - * @param String $departure_airport_icao the departure airport |
|
| 764 | - * @param String $arrival_airport_icao the arrival airport |
|
| 765 | - * @return String success or false |
|
| 766 | 762 | * |
| 767 | 763 | */ |
| 768 | 764 | public function addLiveTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $heading = '', $groundspeed = '', $date = '', $putinarchive = false, $comment = '', $type = '',$noarchive = false,$format_source = '', $source_name = '', $over_country = '') |