@@ -112,6 +112,9 @@ discard block |
||
| 112 | 112 | $geometry->m(); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | +/** |
|
| 116 | + * @param string $input |
|
| 117 | + */ |
|
| 115 | 118 | function test_adapters($geometry, $format, $input) { |
| 116 | 119 | // Test adapter output and input. Do a round-trip and re-test |
| 117 | 120 | foreach (geoPHP::getAdapterMap() as $adapter_key => $adapter_class) { |
@@ -234,6 +237,9 @@ discard block |
||
| 234 | 237 | } |
| 235 | 238 | } |
| 236 | 239 | |
| 240 | +/** |
|
| 241 | + * @param string $value |
|
| 242 | + */ |
|
| 237 | 243 | function test_detection($value, $format, $file) { |
| 238 | 244 | $detected = geoPHP::detectFormat($value); |
| 239 | 245 | if ($detected != $format) { |
@@ -58,6 +58,10 @@ |
||
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $method_name |
|
| 63 | + * @param string|null $argument |
|
| 64 | + */ |
|
| 61 | 65 | function _methods_tester($geometry, $method_name, $argument) { |
| 62 | 66 | |
| 63 | 67 | if (!method_exists($geometry, $method_name)) { |
@@ -122,6 +122,9 @@ |
||
| 122 | 122 | return self::array_random( empty( $lang ) ? self::$languages : $lang ); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | + /** |
|
| 126 | + * @param string $os |
|
| 127 | + */ |
|
| 125 | 128 | private static function get_processor( $os ) |
| 126 | 129 | { |
| 127 | 130 | return self::array_random( self::$processors[$os] ); |
@@ -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) { |
@@ -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(); |