@@ -125,6 +125,9 @@ discard block |
||
125 | 125 | public $tag_start = 0; |
126 | 126 | private $dom = null; |
127 | 127 | |
128 | + /** |
|
129 | + * @param simple_html_dom $dom |
|
130 | + */ |
|
128 | 131 | function __construct($dom) |
129 | 132 | { |
130 | 133 | $this->dom = $dom; |
@@ -1501,6 +1504,11 @@ discard block |
||
1501 | 1504 | } |
1502 | 1505 | |
1503 | 1506 | // parse attributes |
1507 | + |
|
1508 | + /** |
|
1509 | + * @param simple_html_dom_node $node |
|
1510 | + * @param string[] $space |
|
1511 | + */ |
|
1504 | 1512 | protected function parse_attr($node, $name, &$space) |
1505 | 1513 | { |
1506 | 1514 | // Per sourceforge: http://sourceforge.net/tracker/?func=detail&aid=3061408&group_id=218559&atid=1044037 |
@@ -1538,6 +1546,11 @@ discard block |
||
1538 | 1546 | } |
1539 | 1547 | |
1540 | 1548 | // link node's parent |
1549 | + |
|
1550 | + /** |
|
1551 | + * @param simple_html_dom_node $node |
|
1552 | + * @param boolean $is_child |
|
1553 | + */ |
|
1541 | 1554 | protected function link_nodes(&$node, $is_child) |
1542 | 1555 | { |
1543 | 1556 | $node->parent = $this->parent; |
@@ -1549,6 +1562,10 @@ discard block |
||
1549 | 1562 | } |
1550 | 1563 | |
1551 | 1564 | // as a text node |
1565 | + |
|
1566 | + /** |
|
1567 | + * @param string $tag |
|
1568 | + */ |
|
1552 | 1569 | protected function as_text_node($tag) |
1553 | 1570 | { |
1554 | 1571 | $node = new simple_html_dom_node($this); |
@@ -1559,12 +1576,18 @@ discard block |
||
1559 | 1576 | return true; |
1560 | 1577 | } |
1561 | 1578 | |
1579 | + /** |
|
1580 | + * @param string $chars |
|
1581 | + */ |
|
1562 | 1582 | protected function skip($chars) |
1563 | 1583 | { |
1564 | 1584 | $this->pos += strspn($this->doc, $chars, $this->pos); |
1565 | 1585 | $this->char = ($this->pos<$this->size) ? $this->doc[$this->pos] : null; // next |
1566 | 1586 | } |
1567 | 1587 | |
1588 | + /** |
|
1589 | + * @param string $chars |
|
1590 | + */ |
|
1568 | 1591 | protected function copy_skip($chars) |
1569 | 1592 | { |
1570 | 1593 | $pos = $this->pos; |
@@ -1575,6 +1598,9 @@ discard block |
||
1575 | 1598 | return substr($this->doc, $pos, $len); |
1576 | 1599 | } |
1577 | 1600 | |
1601 | + /** |
|
1602 | + * @param string $chars |
|
1603 | + */ |
|
1578 | 1604 | protected function copy_until($chars) |
1579 | 1605 | { |
1580 | 1606 | $pos = $this->pos; |
@@ -1584,6 +1610,9 @@ discard block |
||
1584 | 1610 | return substr($this->doc, $pos, $len); |
1585 | 1611 | } |
1586 | 1612 | |
1613 | + /** |
|
1614 | + * @param string $char |
|
1615 | + */ |
|
1587 | 1616 | protected function copy_until_char($char) |
1588 | 1617 | { |
1589 | 1618 | if ($this->char===null) return ''; |
@@ -1602,6 +1631,9 @@ discard block |
||
1602 | 1631 | return substr($this->doc, $pos_old, $pos-$pos_old); |
1603 | 1632 | } |
1604 | 1633 | |
1634 | + /** |
|
1635 | + * @param string $char |
|
1636 | + */ |
|
1605 | 1637 | protected function copy_until_char_escape($char) |
1606 | 1638 | { |
1607 | 1639 | if ($this->char===null) return ''; |
@@ -1633,6 +1665,10 @@ discard block |
||
1633 | 1665 | |
1634 | 1666 | // remove noise from html content |
1635 | 1667 | // save the noise in the $this->noise array. |
1668 | + |
|
1669 | + /** |
|
1670 | + * @param string $pattern |
|
1671 | + */ |
|
1636 | 1672 | protected function remove_noise($pattern, $remove_tag=false) |
1637 | 1673 | { |
1638 | 1674 | global $debug_object; |
@@ -1658,6 +1694,10 @@ discard block |
||
1658 | 1694 | } |
1659 | 1695 | |
1660 | 1696 | // restore noise to html content |
1697 | + |
|
1698 | + /** |
|
1699 | + * @param string|null $text |
|
1700 | + */ |
|
1661 | 1701 | function restore_noise($text) |
1662 | 1702 | { |
1663 | 1703 | global $debug_object; |
@@ -319,6 +319,9 @@ |
||
319 | 319 | return false; |
320 | 320 | } |
321 | 321 | |
322 | + /** |
|
323 | + * @param string $aircraft_icao |
|
324 | + */ |
|
322 | 325 | public function fromIvaoMtl($aircraft_icao,$airline_icao) { |
323 | 326 | $Common = new Common(); |
324 | 327 | //echo "\n".'SEARCH IMAGE : http://mtlcatalog.ivao.aero/images/aircraft/'.$aircraft_icao.$airline_icao.'.jpg'; |
@@ -6,6 +6,9 @@ discard block |
||
6 | 6 | public $dbs = array(); |
7 | 7 | public $latest_schema = 23; |
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) { |
@@ -131,6 +134,9 @@ discard block |
||
131 | 134 | return true; |
132 | 135 | } |
133 | 136 | |
137 | + /** |
|
138 | + * @param string $table |
|
139 | + */ |
|
134 | 140 | public function tableExists($table) |
135 | 141 | { |
136 | 142 | global $globalDBdriver, $globalDBname; |
@@ -180,6 +186,11 @@ discard block |
||
180 | 186 | /* |
181 | 187 | * Check if index exist |
182 | 188 | */ |
189 | + |
|
190 | + /** |
|
191 | + * @param string $table |
|
192 | + * @param string $index |
|
193 | + */ |
|
183 | 194 | public function indexExists($table,$index) |
184 | 195 | { |
185 | 196 | global $globalDBdriver, $globalDBname; |
@@ -225,6 +236,11 @@ discard block |
||
225 | 236 | * Check if a column name exist in a table |
226 | 237 | * @return Boolean column exist or not |
227 | 238 | */ |
239 | + |
|
240 | + /** |
|
241 | + * @param string $table |
|
242 | + * @param string $name |
|
243 | + */ |
|
228 | 244 | public function checkColumnName($table,$name) |
229 | 245 | { |
230 | 246 | $query = "SELECT * FROM ".$table." LIMIT 0"; |
@@ -10,6 +10,9 @@ discard block |
||
10 | 10 | class update_db { |
11 | 11 | public static $db_sqlite; |
12 | 12 | |
13 | + /** |
|
14 | + * @param string $file |
|
15 | + */ |
|
13 | 16 | public static function download($url, $file, $referer = '') { |
14 | 17 | $fp = fopen($file, 'w+'); |
15 | 18 | $ch = curl_init(); |
@@ -24,6 +27,9 @@ discard block |
||
24 | 27 | fclose($fp); |
25 | 28 | } |
26 | 29 | |
30 | + /** |
|
31 | + * @param string $in_file |
|
32 | + */ |
|
27 | 33 | public static function gunzip($in_file,$out_file_name = '') { |
28 | 34 | //echo $in_file.' -> '.$out_file_name."\n"; |
29 | 35 | $buffer_size = 4096; // read 4kb at a time |
@@ -45,6 +51,9 @@ discard block |
||
45 | 51 | } |
46 | 52 | } |
47 | 53 | |
54 | + /** |
|
55 | + * @param string $in_file |
|
56 | + */ |
|
48 | 57 | public static function unzip($in_file) { |
49 | 58 | if ($in_file != '' && file_exists($in_file)) { |
50 | 59 | $path = pathinfo(realpath($in_file), PATHINFO_DIRNAME); |
@@ -66,6 +75,9 @@ discard block |
||
66 | 75 | } |
67 | 76 | } |
68 | 77 | |
78 | + /** |
|
79 | + * @param string $database_file |
|
80 | + */ |
|
69 | 81 | public static function retrieve_route_sqlite_to_dest($database_file) { |
70 | 82 | global $globalDebug, $globalTransaction; |
71 | 83 | //$query = 'TRUNCATE TABLE routes'; |
@@ -108,6 +120,10 @@ discard block |
||
108 | 120 | } |
109 | 121 | return ''; |
110 | 122 | } |
123 | + |
|
124 | + /** |
|
125 | + * @param string $database_file |
|
126 | + */ |
|
111 | 127 | public static function retrieve_route_oneworld($database_file) { |
112 | 128 | global $globalDebug, $globalTransaction; |
113 | 129 | //$query = 'TRUNCATE TABLE routes'; |
@@ -147,6 +163,9 @@ discard block |
||
147 | 163 | return ''; |
148 | 164 | } |
149 | 165 | |
166 | + /** |
|
167 | + * @param string $database_file |
|
168 | + */ |
|
150 | 169 | public static function retrieve_route_skyteam($database_file) { |
151 | 170 | global $globalDebug, $globalTransaction; |
152 | 171 | //$query = 'TRUNCATE TABLE routes'; |
@@ -186,6 +205,10 @@ discard block |
||
186 | 205 | } |
187 | 206 | return ''; |
188 | 207 | } |
208 | + |
|
209 | + /** |
|
210 | + * @param string $database_file |
|
211 | + */ |
|
189 | 212 | public static function retrieve_modes_sqlite_to_dest($database_file) { |
190 | 213 | global $globalTransaction; |
191 | 214 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -251,6 +274,9 @@ discard block |
||
251 | 274 | return ''; |
252 | 275 | } |
253 | 276 | |
277 | + /** |
|
278 | + * @param string $database_file |
|
279 | + */ |
|
254 | 280 | public static function retrieve_modes_flarmnet($database_file) { |
255 | 281 | global $globalTransaction; |
256 | 282 | $Common = new Common(); |
@@ -321,6 +347,9 @@ discard block |
||
321 | 347 | return ''; |
322 | 348 | } |
323 | 349 | |
350 | + /** |
|
351 | + * @param string $database_file |
|
352 | + */ |
|
324 | 353 | public static function retrieve_modes_ogn($database_file) { |
325 | 354 | global $globalTransaction; |
326 | 355 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -389,6 +418,9 @@ discard block |
||
389 | 418 | return ''; |
390 | 419 | } |
391 | 420 | |
421 | + /** |
|
422 | + * @param string $database_file |
|
423 | + */ |
|
392 | 424 | public static function retrieve_owner($database_file,$country = 'F') { |
393 | 425 | global $globalTransaction; |
394 | 426 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -939,6 +971,10 @@ discard block |
||
939 | 971 | return ''; |
940 | 972 | } |
941 | 973 | |
974 | + /** |
|
975 | + * @param string $filename |
|
976 | + * @param string $tletype |
|
977 | + */ |
|
942 | 978 | public static function tle($filename,$tletype) { |
943 | 979 | require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
944 | 980 | global $tmp_dir, $globalTransaction; |
@@ -1071,6 +1107,9 @@ discard block |
||
1071 | 1107 | |
1072 | 1108 | } |
1073 | 1109 | */ |
1110 | + /** |
|
1111 | + * @param string $filename |
|
1112 | + */ |
|
1074 | 1113 | public static function waypoints($filename) { |
1075 | 1114 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1076 | 1115 | global $tmp_dir, $globalTransaction; |
@@ -1118,6 +1157,9 @@ discard block |
||
1118 | 1157 | return ''; |
1119 | 1158 | } |
1120 | 1159 | |
1160 | + /** |
|
1161 | + * @param string $filename |
|
1162 | + */ |
|
1121 | 1163 | public static function ivao_airlines($filename) { |
1122 | 1164 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1123 | 1165 | global $tmp_dir, $globalTransaction; |
@@ -146,20 +146,6 @@ discard block |
||
146 | 146 | |
147 | 147 | /** Predict first pass after a certain time. |
148 | 148 | * |
149 | - * @param Predict_Sat $sat The satellite data. |
|
150 | - * @param Predict_QTH $qth The observer's location data. |
|
151 | - * @param float $start Starting time. |
|
152 | - * @param int $maxdt The maximum number of days to look ahead (0 for no limit). |
|
153 | - * |
|
154 | - * @return Predict_Pass or NULL if there was an error. |
|
155 | - * |
|
156 | - * This function will find the first upcoming pass with AOS no earlier than |
|
157 | - * t = start and no later than t = (start+maxdt). |
|
158 | - * |
|
159 | - * note For no time limit use maxdt = 0.0 |
|
160 | - * |
|
161 | - * note the data in sat will be corrupt (future) and must be refreshed |
|
162 | - * by the caller, if the caller will need it later on |
|
163 | 149 | */ |
164 | 150 | public function get_pass(Predict_Sat $sat_in, Predict_QTH $qth, $start, $maxdt) |
165 | 151 | { |
@@ -407,7 +393,7 @@ discard block |
||
407 | 393 | * @param Predict_QTH $qth The observer's location (QTH) data. |
408 | 394 | * @param float $start The julian date where calculation should start. |
409 | 395 | * @param int $maxdt The upper time limit in days (0.0 = no limit) |
410 | - * @return The julain date of the next AOS or 0.0 if the satellite has no AOS. |
|
396 | + * @return double julain date of the next AOS or 0.0 if the satellite has no AOS. |
|
411 | 397 | * |
412 | 398 | * This function finds the time of AOS for the first coming pass taking place |
413 | 399 | * no earlier that start. |
@@ -563,7 +549,7 @@ discard block |
||
563 | 549 | * @param Predict_QTH $qth The QTH observer location data. |
564 | 550 | * @param float $start The time where calculation should start. (Julian Date) |
565 | 551 | * @param int $maxdt The upper time limit in days (0.0 = no limit) |
566 | - * @return The time (julian date) of the next LOS or 0.0 if the satellite has no LOS. |
|
552 | + * @return double time (julian date) of the next LOS or 0.0 if the satellite has no LOS. |
|
567 | 553 | * |
568 | 554 | * This function finds the time of LOS for the first coming pass taking place |
569 | 555 | * no earlier that start. |
@@ -648,7 +634,7 @@ discard block |
||
648 | 634 | * @param Predict_Sat $sat The satellite to find AOS for. |
649 | 635 | * @param Predict_QTH $qth The ground station. |
650 | 636 | * @param float $start Start time, prefereably now. |
651 | - * @return The time of the previous AOS or 0.0 if the satellite has no AOS. |
|
637 | + * @return double time of the previous AOS or 0.0 if the satellite has no AOS. |
|
652 | 638 | * |
653 | 639 | * This function can be used to find the AOS time in the past of the |
654 | 640 | * current pass. |
@@ -42,6 +42,10 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | /* Returns arccosine of rgument */ |
45 | + |
|
46 | + /** |
|
47 | + * @param double $arg |
|
48 | + */ |
|
45 | 49 | public static function ArcCos($arg) |
46 | 50 | { |
47 | 51 | return Predict::pio2 - self::ArcSin($arg); |
@@ -68,6 +72,10 @@ discard block |
||
68 | 72 | } |
69 | 73 | |
70 | 74 | /* Multiplies the vector v1 by the scalar k to produce the vector v2 */ |
75 | + |
|
76 | + /** |
|
77 | + * @param integer $k |
|
78 | + */ |
|
71 | 79 | public static function Scalar_Multiply($k, Predict_Vector $v1, Predict_Vector $v2) |
72 | 80 | { |
73 | 81 | $v2->x = $k * $v1->x; |
@@ -155,6 +163,10 @@ discard block |
||
155 | 163 | } |
156 | 164 | |
157 | 165 | /* Returns arg1 mod arg2 */ |
166 | + |
|
167 | + /** |
|
168 | + * @param double $arg1 |
|
169 | + */ |
|
158 | 170 | public static function Modulus($arg1, $arg2) |
159 | 171 | { |
160 | 172 | $ret_val = $arg1; |
@@ -169,6 +181,10 @@ discard block |
||
169 | 181 | } |
170 | 182 | |
171 | 183 | /* Returns fractional part of double argument */ |
184 | + |
|
185 | + /** |
|
186 | + * @param double $arg |
|
187 | + */ |
|
172 | 188 | public static function Frac($arg) |
173 | 189 | { |
174 | 190 | return $arg - floor($arg); |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** Initialise satellite data. |
127 | - * @param sat The satellite to initialise. |
|
128 | - * @param qth Optional QTH info, use (0,0) if NULL. |
|
127 | + * @param sat Predict_Sat satellite to initialise. |
|
128 | + * @param qth Predict_QTH QTH info, use (0,0) if NULL. |
|
129 | 129 | * |
130 | 130 | * This function calculates the satellite data at t = 0, ie. epoch time |
131 | 131 | * The function is called automatically by gtk_sat_data_read_sat. |
@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | |
217 | 217 | /** Determinte whether satellite is in geostationary orbit. |
218 | 218 | * @author John A. Magliacane, KD2BD |
219 | - * @param sat Pointer to satellite data. |
|
220 | - * @return TRUE if the satellite appears to be in geostationary orbit, |
|
219 | + * @param sat Predict_Sat to satellite data. |
|
220 | + * @return boolean if the satellite appears to be in geostationary orbit, |
|
221 | 221 | * FALSE otherwise. |
222 | 222 | * |
223 | 223 | * A satellite is in geostationary orbit if |
@@ -239,8 +239,8 @@ discard block |
||
239 | 239 | /** Determine whether satellite has decayed. |
240 | 240 | * @author John A. Magliacane, KD2BD |
241 | 241 | * @author Alexandru Csete, OZ9AEC |
242 | - * @param sat Pointer to satellite data. |
|
243 | - * @return TRUE if the satellite appears to have decayed, FALSE otherwise. |
|
242 | + * @param sat Predict_Sat to satellite data. |
|
243 | + * @return boolean if the satellite appears to have decayed, FALSE otherwise. |
|
244 | 244 | * @bug Modified version of the predict code but it is not tested. |
245 | 245 | * |
246 | 246 | * A satellite is decayed if |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | * @param float $time The daynum the satellite is calculated for |
274 | 274 | * @param Predict_QTH $qth The observer location |
275 | 275 | * |
276 | - * @return null on failure, float otherwise |
|
276 | + * @return null|double on failure, float otherwise |
|
277 | 277 | */ |
278 | 278 | public function calculateApparentMagnitude($time, Predict_QTH $qth) |
279 | 279 | { |
@@ -56,6 +56,10 @@ |
||
56 | 56 | /* It is intended to be used to determine the ground track of */ |
57 | 57 | /* a satellite. The calculations assume the earth to be an */ |
58 | 58 | /* oblate spheroid as defined in WGS '72. */ |
59 | + |
|
60 | + /** |
|
61 | + * @param double $_time |
|
62 | + */ |
|
59 | 63 | public static function Calculate_LatLonAlt($_time, Predict_Vector $pos, Predict_Geodetic $geodetic) |
60 | 64 | { |
61 | 65 | /* Reference: The 1992 Astronomical Almanac, page K12. */ |
@@ -67,6 +67,10 @@ discard block |
||
67 | 67 | /* structure with Keplerian orbital elements and pos and vel */ |
68 | 68 | /* are vector_t structures returning ECI satellite position and */ |
69 | 69 | /* velocity. Use Convert_Sat_State() to convert to km and km/s.*/ |
70 | + |
|
71 | + /** |
|
72 | + * @param double $tsince |
|
73 | + */ |
|
70 | 74 | public function SGP4(Predict_Sat $sat, $tsince) |
71 | 75 | { |
72 | 76 | /* Initialization */ |
@@ -312,6 +316,10 @@ discard block |
||
312 | 316 | /* structure with Keplerian orbital elements and pos and vel */ |
313 | 317 | /* are vector_t structures returning ECI satellite position and */ |
314 | 318 | /* velocity. Use Convert_Sat_State() to convert to km and km/s. */ |
319 | + |
|
320 | + /** |
|
321 | + * @param double $tsince |
|
322 | + */ |
|
315 | 323 | public function SDP4(Predict_Sat $sat, $tsince) |
316 | 324 | { |
317 | 325 | /* Initialization */ |
@@ -538,6 +546,10 @@ discard block |
||
538 | 546 | /* DEEP */ |
539 | 547 | /* This function is used by SDP4 to add lunar and solar */ |
540 | 548 | /* perturbation effects to deep-space orbit objects. */ |
549 | + |
|
550 | + /** |
|
551 | + * @param integer $ientry |
|
552 | + */ |
|
541 | 553 | public function Deep($ientry, Predict_Sat $sat) |
542 | 554 | { |
543 | 555 | switch ($ientry) { |