@@ -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) { |
@@ -51,6 +51,10 @@ |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /* Calculates stellite's eclipse status and depth */ |
| 54 | + |
|
| 55 | + /** |
|
| 56 | + * @param double $depth |
|
| 57 | + */ |
|
| 54 | 58 | public static function Sat_Eclipsed(Predict_Vector $pos, Predict_Vector $sol, &$depth) |
| 55 | 59 | { |
| 56 | 60 | $Rho = new Predict_Vector(); |
@@ -36,6 +36,10 @@ discard block |
||
| 36 | 36 | /* the year 1999 assuming that two-digit years in the range 00-56 */ |
| 37 | 37 | /* correspond to 2000-2056. Until the two-line element set format */ |
| 38 | 38 | /* is changed, it is only valid for dates through 2056 December 31. */ |
| 39 | + |
|
| 40 | + /** |
|
| 41 | + * @param double $epoch |
|
| 42 | + */ |
|
| 39 | 43 | public static function Julian_Date_of_Epoch($epoch) |
| 40 | 44 | { |
| 41 | 45 | $year = 0; |
@@ -54,6 +58,11 @@ discard block |
||
| 54 | 58 | } |
| 55 | 59 | |
| 56 | 60 | /* Equivalent to the C modf function */ |
| 61 | + |
|
| 62 | + /** |
|
| 63 | + * @param double $x |
|
| 64 | + * @param integer $ipart |
|
| 65 | + */ |
|
| 57 | 66 | public static function modf($x, &$ipart) { |
| 58 | 67 | $ipart = (int)$x; |
| 59 | 68 | return $x - $ipart; |
@@ -63,6 +72,10 @@ discard block |
||
| 63 | 72 | /* of Day 0.0 of {year}. This function is used to calculate the */ |
| 64 | 73 | /* Julian Date of any date by using Julian_Date_of_Year, DOY, */ |
| 65 | 74 | /* and Fraction_of_Day. */ |
| 75 | + |
|
| 76 | + /** |
|
| 77 | + * @param integer $year |
|
| 78 | + */ |
|
| 66 | 79 | public static function Julian_Date_of_Year($year) |
| 67 | 80 | { |
| 68 | 81 | /* Astronomical Formulae for Calculators, Jean Meeus, */ |
@@ -85,6 +98,10 @@ discard block |
||
| 85 | 98 | /* 1999, as described above. The function ThetaG_JD provides the */ |
| 86 | 99 | /* same calculation except that it is based on an input in the */ |
| 87 | 100 | /* form of a Julian Date. */ |
| 101 | + |
|
| 102 | + /** |
|
| 103 | + * @param double $epoch |
|
| 104 | + */ |
|
| 88 | 105 | public static function ThetaG($epoch, Predict_DeepArg $deep_arg) |
| 89 | 106 | { |
| 90 | 107 | /* Reference: The 1992 Astronomical Almanac, page B6. */ |
@@ -157,6 +174,10 @@ discard block |
||
| 157 | 174 | /* (approximately the same as UTC) and ET (now referred to as TDT).*/ |
| 158 | 175 | /* This function is based on a least squares fit of data from 1950 */ |
| 159 | 176 | /* to 1991 and will need to be updated periodically. */ |
| 177 | + |
|
| 178 | + /** |
|
| 179 | + * @param double $year |
|
| 180 | + */ |
|
| 160 | 181 | public static function Delta_ET($year) |
| 161 | 182 | { |
| 162 | 183 | /* Values determined using data from 1950-1991 in the 1990 |
@@ -204,7 +225,7 @@ discard block |
||
| 204 | 225 | * |
| 205 | 226 | * @param Predict_TLE $tle The TLE object |
| 206 | 227 | * |
| 207 | - * @return int |
|
| 228 | + * @return double |
|
| 208 | 229 | */ |
| 209 | 230 | public static function getEpochTimeStamp(Predict_TLE $tle) |
| 210 | 231 | { |
@@ -1098,6 +1098,10 @@ discard block |
||
| 1098 | 1098 | else return array(); |
| 1099 | 1099 | } |
| 1100 | 1100 | |
| 1101 | + /** |
|
| 1102 | + * @param string $type |
|
| 1103 | + * @param string $rules |
|
| 1104 | + */ |
|
| 1101 | 1105 | public function addNOTAM($ref,$title,$type,$fir,$code,$rules,$scope,$lower_limit,$upper_limit,$center_latitude,$center_longitude,$radius,$date_begin,$date_end,$permanent,$text,$full_notam) { |
| 1102 | 1106 | $query = "INSERT INTO notam (ref,title,notam_type,fir,code,rules,scope,lower_limit,upper_limit,center_latitude,center_longitude,radius,date_begin,date_end,permanent,notam_text,full_notam) VALUES (:ref,:title,:type,:fir,:code,:rules,:scope,:lower_limit,:upper_limit,:center_latitude,:center_longitude,:radius,:date_begin,:date_end,:permanent,:text,:full_notam)"; |
| 1103 | 1107 | $query_values = array(':ref' => $ref,':title' => $title,':type' => $type,':fir' => $fir,':code' => $code,':rules' => $rules,':scope' => $scope,':lower_limit' => $lower_limit,':upper_limit' => $upper_limit,':center_latitude' => $center_latitude,':center_longitude' => $center_longitude,':radius' => $radius,':date_begin' => $date_begin,':date_end' => $date_end,':permanent' => $permanent,':text' => $text,':full_notam' => $full_notam); |
@@ -1179,6 +1183,10 @@ discard block |
||
| 1179 | 1183 | } |
| 1180 | 1184 | } |
| 1181 | 1185 | } |
| 1186 | + |
|
| 1187 | + /** |
|
| 1188 | + * @param string $filename |
|
| 1189 | + */ |
|
| 1182 | 1190 | public function updateNOTAMfromTextFile($filename) { |
| 1183 | 1191 | $alldata = $this->parseNOTAMtextFile($filename); |
| 1184 | 1192 | if (count($alldata) > 0) { |
@@ -1223,6 +1231,9 @@ discard block |
||
| 1223 | 1231 | } |
| 1224 | 1232 | } |
| 1225 | 1233 | |
| 1234 | + /** |
|
| 1235 | + * @param string $icao |
|
| 1236 | + */ |
|
| 1226 | 1237 | public function downloadNOTAM($icao) { |
| 1227 | 1238 | date_default_timezone_set("UTC"); |
| 1228 | 1239 | $Common = new Common(); |
@@ -1359,6 +1370,9 @@ discard block |
||
| 1359 | 1370 | return $result; |
| 1360 | 1371 | } |
| 1361 | 1372 | |
| 1373 | + /** |
|
| 1374 | + * @param string $code |
|
| 1375 | + */ |
|
| 1362 | 1376 | public function parse_code($code) { |
| 1363 | 1377 | $code = str_split($code); |
| 1364 | 1378 | $code_fp = $code[1].$code[2]; |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | /** |
| 12 | 12 | * Get SQL query part for filter used |
| 13 | 13 | * @param Array $filter the filter |
| 14 | - * @return Array the SQL part |
|
| 14 | + * @return string the SQL part |
|
| 15 | 15 | */ |
| 16 | 16 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 17 | 17 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | /** |
| 12 | 12 | * Get SQL query part for filter used |
| 13 | 13 | * @param Array $filter the filter |
| 14 | - * @return Array the SQL part |
|
| 14 | + * @return string the SQL part |
|
| 15 | 15 | */ |
| 16 | 16 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 17 | 17 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
@@ -79,6 +79,10 @@ discard block |
||
| 79 | 79 | return strlen($headerLine); // Needed by curl |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | + /** |
|
| 83 | + * @param string $url |
|
| 84 | + * @param string $file |
|
| 85 | + */ |
|
| 82 | 86 | public static function download($url, $file, $referer = '') { |
| 83 | 87 | global $globalDebug; |
| 84 | 88 | $fp = fopen($file, 'w'); |
@@ -179,7 +183,7 @@ discard block |
||
| 179 | 183 | * Check is distance realistic |
| 180 | 184 | * @param int $timeDifference the time between the reception of both messages |
| 181 | 185 | * @param float $distance distance covered |
| 182 | - * @return whether distance is realistic |
|
| 186 | + * @return boolean distance is realistic |
|
| 183 | 187 | */ |
| 184 | 188 | public function withinThreshold ($timeDifference, $distance) { |
| 185 | 189 | $x = abs($timeDifference); |
@@ -202,6 +206,9 @@ discard block |
||
| 202 | 206 | } |
| 203 | 207 | |
| 204 | 208 | |
| 209 | + /** |
|
| 210 | + * @param string $latlong |
|
| 211 | + */ |
|
| 205 | 212 | public function convertDec($dms,$latlong) { |
| 206 | 213 | if ($latlong == 'latitude') { |
| 207 | 214 | $deg = substr($dms, 0, 2); |
@@ -303,7 +310,7 @@ discard block |
||
| 303 | 310 | /** |
| 304 | 311 | * Returns list of available locales |
| 305 | 312 | * |
| 306 | - * @return array |
|
| 313 | + * @return string[] |
|
| 307 | 314 | */ |
| 308 | 315 | public function listLocaleDir() |
| 309 | 316 | { |