@@ -12,26 +12,26 @@ |
||
12 | 12 | */ |
13 | 13 | class Predict_PassDetail |
14 | 14 | { |
15 | - public $time; /*!< time in "jul_utc" */ |
|
16 | - public $pos; /*!< Raw unprocessed position at time */ |
|
17 | - public $vel; /*!< Raw unprocessed velocity at time */ |
|
18 | - public $velo; |
|
19 | - public $az; |
|
20 | - public $el; |
|
21 | - public $range; |
|
22 | - public $range_rate; |
|
23 | - public $lat; |
|
24 | - public $lon; |
|
25 | - public $alt; |
|
26 | - public $ma; |
|
27 | - public $phase; |
|
28 | - public $footprint; |
|
29 | - public $vis; |
|
30 | - public $orbit; |
|
15 | + public $time; /*!< time in "jul_utc" */ |
|
16 | + public $pos; /*!< Raw unprocessed position at time */ |
|
17 | + public $vel; /*!< Raw unprocessed velocity at time */ |
|
18 | + public $velo; |
|
19 | + public $az; |
|
20 | + public $el; |
|
21 | + public $range; |
|
22 | + public $range_rate; |
|
23 | + public $lat; |
|
24 | + public $lon; |
|
25 | + public $alt; |
|
26 | + public $ma; |
|
27 | + public $phase; |
|
28 | + public $footprint; |
|
29 | + public $vis; |
|
30 | + public $orbit; |
|
31 | 31 | |
32 | - public function __construct() |
|
33 | - { |
|
34 | - $this->pos = new Predict_Vector(); |
|
35 | - $this->vel = new Predict_Vector(); |
|
36 | - } |
|
32 | + public function __construct() |
|
33 | + { |
|
34 | + $this->pos = new Predict_Vector(); |
|
35 | + $this->vel = new Predict_Vector(); |
|
36 | + } |
|
37 | 37 | } |
@@ -12,9 +12,9 @@ |
||
12 | 12 | */ |
13 | 13 | class Predict_PassDetail |
14 | 14 | { |
15 | - public $time; /*!< time in "jul_utc" */ |
|
16 | - public $pos; /*!< Raw unprocessed position at time */ |
|
17 | - public $vel; /*!< Raw unprocessed velocity at time */ |
|
15 | + public $time; /*!< time in "jul_utc" */ |
|
16 | + public $pos; /*!< Raw unprocessed position at time */ |
|
17 | + public $vel; /*!< Raw unprocessed velocity at time */ |
|
18 | 18 | public $velo; |
19 | 19 | public $az; |
20 | 20 | public $el; |
@@ -5,8 +5,8 @@ |
||
5 | 5 | */ |
6 | 6 | class Predict_ObsSet |
7 | 7 | { |
8 | - public $az = 0.0; /*!< Azimuth [deg] */ |
|
9 | - public $el = 0.0; /*!< Elevation [deg] */ |
|
10 | - public $range = 0.0; /*!< Range [km] */ |
|
11 | - public $range_rate = 0.0; /*!< Velocity [km/sec] */ |
|
8 | + public $az = 0.0; /*!< Azimuth [deg] */ |
|
9 | + public $el = 0.0; /*!< Elevation [deg] */ |
|
10 | + public $range = 0.0; /*!< Range [km] */ |
|
11 | + public $range_rate = 0.0; /*!< Velocity [km/sec] */ |
|
12 | 12 | } |
@@ -5,8 +5,8 @@ |
||
5 | 5 | */ |
6 | 6 | class Predict_ObsSet |
7 | 7 | { |
8 | - public $az = 0.0; /*!< Azimuth [deg] */ |
|
9 | - public $el = 0.0; /*!< Elevation [deg] */ |
|
10 | - public $range = 0.0; /*!< Range [km] */ |
|
11 | - public $range_rate = 0.0; /*!< Velocity [km/sec] */ |
|
8 | + public $az = 0.0; /*!< Azimuth [deg] */ |
|
9 | + public $el = 0.0; /*!< Elevation [deg] */ |
|
10 | + public $range = 0.0; /*!< Range [km] */ |
|
11 | + public $range_rate = 0.0; /*!< Velocity [km/sec] */ |
|
12 | 12 | } |
@@ -12,221 +12,221 @@ |
||
12 | 12 | */ |
13 | 13 | class Predict_TLE |
14 | 14 | { |
15 | - public $header; /* Header line of TLE file */ |
|
16 | - public $line1; /* Line 1 of TLE */ |
|
17 | - public $line2; /* Line 2 of TLE */ |
|
18 | - public $epoch; /*!< Epoch Time in NORAD TLE format YYDDD.FFFFFFFF */ |
|
19 | - public $epoch_year; /*!< Epoch: year */ |
|
20 | - public $epoch_day; /*!< Epoch: day of year */ |
|
21 | - public $epoch_fod; /*!< Epoch: Fraction of day. */ |
|
22 | - public $xndt2o; /*!< 1. time derivative of mean motion */ |
|
23 | - public $xndd6o; /*!< 2. time derivative of mean motion */ |
|
24 | - public $bstar; /*!< Bstar drag coefficient. */ |
|
25 | - public $xincl; /*!< Inclination */ |
|
26 | - public $xnodeo; /*!< R.A.A.N. */ |
|
27 | - public $eo; /*!< Eccentricity */ |
|
28 | - public $omegao; /*!< argument of perigee */ |
|
29 | - public $xmo; /*!< mean anomaly */ |
|
30 | - public $xno; /*!< mean motion */ |
|
31 | - |
|
32 | - public $catnr; /*!< Catalogue Number. */ |
|
33 | - public $elset; /*!< Element Set number. */ |
|
34 | - public $revnum; /*!< Revolution Number at epoch. */ |
|
35 | - |
|
36 | - public $sat_name; /*!< Satellite name string. */ |
|
37 | - public $idesg; /*!< International Designator. */ |
|
38 | - public $status; /*!< Operational status. */ |
|
39 | - |
|
40 | - /* values needed for squint calculations */ |
|
41 | - public $xincl1; |
|
42 | - public $xnodeo1; |
|
43 | - public $omegao1; |
|
44 | - |
|
45 | - |
|
46 | - /* Converts the strings in a raw two-line element set */ |
|
47 | - /* to their intended numerical values. No processing */ |
|
48 | - /* of these values is done, e.g. from deg to rads etc. */ |
|
49 | - /* This is done in the select_ephemeris() function. */ |
|
50 | - public function __construct($header, $line1, $line2) |
|
51 | - { |
|
52 | - if (!$this->Good_Elements($line1, $line2)) { |
|
53 | - throw new Predict_Exception('Invalid TLE contents'); |
|
54 | - } |
|
55 | - |
|
56 | - $this->header = $header; |
|
57 | - $this->line1 = $line1; |
|
58 | - $this->line2 = $line2; |
|
59 | - |
|
60 | - /** Decode Card 1 **/ |
|
61 | - /* Satellite's catalogue number */ |
|
62 | - $this->catnr = (int) substr($line1, 2, 5); |
|
63 | - |
|
64 | - /* International Designator for satellite */ |
|
65 | - $this->idesg = substr($line1, 9, 8); |
|
66 | - |
|
67 | - /* Epoch time; this is the complete, unconverted epoch. */ |
|
68 | - /* Replace spaces with 0 before casting, as leading spaces are allowed */ |
|
69 | - $this->epoch = (float) str_replace(' ', '0', substr($line1, 18, 14)); |
|
70 | - |
|
71 | - /* Now, convert the epoch time into year, day |
|
15 | + public $header; /* Header line of TLE file */ |
|
16 | + public $line1; /* Line 1 of TLE */ |
|
17 | + public $line2; /* Line 2 of TLE */ |
|
18 | + public $epoch; /*!< Epoch Time in NORAD TLE format YYDDD.FFFFFFFF */ |
|
19 | + public $epoch_year; /*!< Epoch: year */ |
|
20 | + public $epoch_day; /*!< Epoch: day of year */ |
|
21 | + public $epoch_fod; /*!< Epoch: Fraction of day. */ |
|
22 | + public $xndt2o; /*!< 1. time derivative of mean motion */ |
|
23 | + public $xndd6o; /*!< 2. time derivative of mean motion */ |
|
24 | + public $bstar; /*!< Bstar drag coefficient. */ |
|
25 | + public $xincl; /*!< Inclination */ |
|
26 | + public $xnodeo; /*!< R.A.A.N. */ |
|
27 | + public $eo; /*!< Eccentricity */ |
|
28 | + public $omegao; /*!< argument of perigee */ |
|
29 | + public $xmo; /*!< mean anomaly */ |
|
30 | + public $xno; /*!< mean motion */ |
|
31 | + |
|
32 | + public $catnr; /*!< Catalogue Number. */ |
|
33 | + public $elset; /*!< Element Set number. */ |
|
34 | + public $revnum; /*!< Revolution Number at epoch. */ |
|
35 | + |
|
36 | + public $sat_name; /*!< Satellite name string. */ |
|
37 | + public $idesg; /*!< International Designator. */ |
|
38 | + public $status; /*!< Operational status. */ |
|
39 | + |
|
40 | + /* values needed for squint calculations */ |
|
41 | + public $xincl1; |
|
42 | + public $xnodeo1; |
|
43 | + public $omegao1; |
|
44 | + |
|
45 | + |
|
46 | + /* Converts the strings in a raw two-line element set */ |
|
47 | + /* to their intended numerical values. No processing */ |
|
48 | + /* of these values is done, e.g. from deg to rads etc. */ |
|
49 | + /* This is done in the select_ephemeris() function. */ |
|
50 | + public function __construct($header, $line1, $line2) |
|
51 | + { |
|
52 | + if (!$this->Good_Elements($line1, $line2)) { |
|
53 | + throw new Predict_Exception('Invalid TLE contents'); |
|
54 | + } |
|
55 | + |
|
56 | + $this->header = $header; |
|
57 | + $this->line1 = $line1; |
|
58 | + $this->line2 = $line2; |
|
59 | + |
|
60 | + /** Decode Card 1 **/ |
|
61 | + /* Satellite's catalogue number */ |
|
62 | + $this->catnr = (int) substr($line1, 2, 5); |
|
63 | + |
|
64 | + /* International Designator for satellite */ |
|
65 | + $this->idesg = substr($line1, 9, 8); |
|
66 | + |
|
67 | + /* Epoch time; this is the complete, unconverted epoch. */ |
|
68 | + /* Replace spaces with 0 before casting, as leading spaces are allowed */ |
|
69 | + $this->epoch = (float) str_replace(' ', '0', substr($line1, 18, 14)); |
|
70 | + |
|
71 | + /* Now, convert the epoch time into year, day |
|
72 | 72 | and fraction of day, according to: |
73 | 73 | |
74 | 74 | YYDDD.FFFFFFFF |
75 | 75 | */ |
76 | 76 | |
77 | - // Adjust for 2 digit year through 2056 |
|
78 | - $this->epoch_year = (int) substr($line1, 18, 2); |
|
79 | - if ($this->epoch_year > 56) { |
|
80 | - $this->epoch_year = $this->epoch_year + 1900; |
|
81 | - } else { |
|
82 | - $this->epoch_year = $this->epoch_year + 2000; |
|
83 | - } |
|
77 | + // Adjust for 2 digit year through 2056 |
|
78 | + $this->epoch_year = (int) substr($line1, 18, 2); |
|
79 | + if ($this->epoch_year > 56) { |
|
80 | + $this->epoch_year = $this->epoch_year + 1900; |
|
81 | + } else { |
|
82 | + $this->epoch_year = $this->epoch_year + 2000; |
|
83 | + } |
|
84 | 84 | |
85 | - /* Epoch day */ |
|
86 | - $this->epoch_day = (int) substr($line1, 20, 3); |
|
85 | + /* Epoch day */ |
|
86 | + $this->epoch_day = (int) substr($line1, 20, 3); |
|
87 | 87 | |
88 | - /* Epoch fraction of day */ |
|
89 | - $this->epoch_fod = (float) substr($line1, 23, 9); |
|
88 | + /* Epoch fraction of day */ |
|
89 | + $this->epoch_fod = (float) substr($line1, 23, 9); |
|
90 | 90 | |
91 | 91 | |
92 | - /* Satellite's First Time Derivative */ |
|
93 | - $this->xndt2o = (float) substr($line1, 33, 10); |
|
92 | + /* Satellite's First Time Derivative */ |
|
93 | + $this->xndt2o = (float) substr($line1, 33, 10); |
|
94 | 94 | |
95 | - /* Satellite's Second Time Derivative */ |
|
96 | - $this->xndd6o = (float) (substr($line1, 44, 1) . '.' . substr($line1, 45, 5) . 'E' . substr($line1, 50, 2)); |
|
95 | + /* Satellite's Second Time Derivative */ |
|
96 | + $this->xndd6o = (float) (substr($line1, 44, 1) . '.' . substr($line1, 45, 5) . 'E' . substr($line1, 50, 2)); |
|
97 | 97 | |
98 | - /* Satellite's bstar drag term |
|
98 | + /* Satellite's bstar drag term |
|
99 | 99 | FIXME: How about buff[0] ???? |
100 | 100 | */ |
101 | - $this->bstar = (float) (substr($line1, 53, 1) . '.' . substr($line1, 54, 5) . 'E' . substr($line1, 59, 2)); |
|
101 | + $this->bstar = (float) (substr($line1, 53, 1) . '.' . substr($line1, 54, 5) . 'E' . substr($line1, 59, 2)); |
|
102 | 102 | |
103 | - /* Element Number */ |
|
104 | - $this->elset = (int) substr($line1, 64, 4); |
|
103 | + /* Element Number */ |
|
104 | + $this->elset = (int) substr($line1, 64, 4); |
|
105 | 105 | |
106 | - /** Decode Card 2 **/ |
|
107 | - /* Satellite's Orbital Inclination (degrees) */ |
|
108 | - $this->xincl = (float) substr($line2, 8, 8); |
|
106 | + /** Decode Card 2 **/ |
|
107 | + /* Satellite's Orbital Inclination (degrees) */ |
|
108 | + $this->xincl = (float) substr($line2, 8, 8); |
|
109 | 109 | |
110 | - /* Satellite's RAAN (degrees) */ |
|
111 | - $this->xnodeo = (float) substr($line2, 17, 8); |
|
110 | + /* Satellite's RAAN (degrees) */ |
|
111 | + $this->xnodeo = (float) substr($line2, 17, 8); |
|
112 | 112 | |
113 | - /* Satellite's Orbital Eccentricity */ |
|
114 | - $this->eo = (float) ('.' . substr($line2, 26, 7)); |
|
113 | + /* Satellite's Orbital Eccentricity */ |
|
114 | + $this->eo = (float) ('.' . substr($line2, 26, 7)); |
|
115 | 115 | |
116 | - /* Satellite's Argument of Perigee (degrees) */ |
|
117 | - $this->omegao = (float) substr($line2, 34, 8); |
|
116 | + /* Satellite's Argument of Perigee (degrees) */ |
|
117 | + $this->omegao = (float) substr($line2, 34, 8); |
|
118 | 118 | |
119 | - /* Satellite's Mean Anomaly of Orbit (degrees) */ |
|
120 | - $this->xmo = (float) substr($line2, 43, 8); |
|
119 | + /* Satellite's Mean Anomaly of Orbit (degrees) */ |
|
120 | + $this->xmo = (float) substr($line2, 43, 8); |
|
121 | 121 | |
122 | - /* Satellite's Mean Motion (rev/day) */ |
|
123 | - $this->xno = (float) substr($line2, 52, 11); |
|
122 | + /* Satellite's Mean Motion (rev/day) */ |
|
123 | + $this->xno = (float) substr($line2, 52, 11); |
|
124 | 124 | |
125 | - /* Satellite's Revolution number at epoch */ |
|
126 | - $this->revnum = (float) substr($line2, 63, 5); |
|
127 | - } |
|
125 | + /* Satellite's Revolution number at epoch */ |
|
126 | + $this->revnum = (float) substr($line2, 63, 5); |
|
127 | + } |
|
128 | 128 | |
129 | - /* Calculates the checksum mod 10 of a line from a TLE set and */ |
|
130 | - /* returns true if it compares with checksum in column 68, else false.*/ |
|
131 | - /* tle_set is a character string holding the two lines read */ |
|
132 | - /* from a text file containing NASA format Keplerian elements. */ |
|
133 | - /* NOTE!!! The stuff about two lines is not quite true. |
|
129 | + /* Calculates the checksum mod 10 of a line from a TLE set and */ |
|
130 | + /* returns true if it compares with checksum in column 68, else false.*/ |
|
131 | + /* tle_set is a character string holding the two lines read */ |
|
132 | + /* from a text file containing NASA format Keplerian elements. */ |
|
133 | + /* NOTE!!! The stuff about two lines is not quite true. |
|
134 | 134 | The function assumes that tle_set[0] is the begining |
135 | 135 | of the line and that there are 68 elements - see the consumer |
136 | 136 | */ |
137 | - public function Checksum_Good($tle_set) |
|
138 | - { |
|
139 | - if (strlen($tle_set) < 69) { |
|
140 | - return false; |
|
141 | - } |
|
142 | - |
|
143 | - $checksum = 0; |
|
144 | - |
|
145 | - for ($i = 0; $i < 68; $i++) { |
|
146 | - if (($tle_set[$i] >= '0') && ($tle_set[$i] <= '9')) { |
|
147 | - $value = $tle_set[$i] - '0'; |
|
148 | - } else if ($tle_set[$i] == '-' ) { |
|
149 | - $value = 1; |
|
150 | - } else { |
|
151 | - $value = 0; |
|
152 | - } |
|
153 | - |
|
154 | - $checksum += $value; |
|
155 | - } |
|
156 | - |
|
157 | - $checksum %= 10; |
|
158 | - $check_digit = $tle_set[68] - '0'; |
|
159 | - |
|
160 | - return $checksum == $check_digit; |
|
161 | - } |
|
162 | - |
|
163 | - /* Carries out various checks on a TLE set to verify its validity */ |
|
164 | - /* $line1 is the first line of the TLE, $line2 is the second line */ |
|
165 | - /* from a text file containing NASA format Keplerian elements. */ |
|
166 | - public function Good_Elements($line1, $line2) |
|
167 | - { |
|
168 | - /* Verify checksum of both lines of a TLE set */ |
|
169 | - if (!$this->Checksum_Good($line1) || !$this->Checksum_Good($line2)) { |
|
170 | - return false; |
|
171 | - } |
|
172 | - |
|
173 | - /* Check the line number of each line */ |
|
174 | - if (($line1[0] != '1') || ($line2[0] != '2')) { |
|
175 | - return false; |
|
176 | - } |
|
177 | - |
|
178 | - /* Verify that Satellite Number is same in both lines */ |
|
179 | - if (strncmp($line1[2], $line2[2], 5) != 0) { |
|
180 | - return false; |
|
181 | - } |
|
182 | - |
|
183 | - /* Check that various elements are in the right place */ |
|
184 | - if (($line1[23] != '.') || |
|
185 | - ($line1[34] != '.') || |
|
186 | - ($line2[11] != '.') || |
|
187 | - ($line2[20] != '.') || |
|
188 | - ($line2[37] != '.') || |
|
189 | - ($line2[46] != '.') || |
|
190 | - ($line2[54] != '.') || |
|
191 | - (strncmp(substr($line1, 61), ' 0 ', 3) != 0)) { |
|
192 | - |
|
193 | - return false; |
|
194 | - } |
|
195 | - |
|
196 | - return true; |
|
197 | - } |
|
198 | - |
|
199 | - /** |
|
200 | - * A function to allow checksum creation of a line. This is driven by |
|
201 | - * the fact that some TLEs from SpaceTrack are missing checksum numbers. |
|
202 | - * You can use this to create a checksum for a line, but you should |
|
203 | - * probably have confidence that the TLE data itself is good. YMMV. |
|
204 | - * |
|
205 | - * @throws Predict_Exception if the line is not exactly 68 chars |
|
206 | - * @return string |
|
207 | - */ |
|
208 | - static public function createChecksum($line) |
|
209 | - { |
|
210 | - if (strlen($line) != 68) { |
|
211 | - throw Predict_Exception('Invalid line, needs to e 68 chars'); |
|
212 | - } |
|
213 | - |
|
214 | - $checksum = 0; |
|
215 | - |
|
216 | - for ($i = 0; $i < 68; $i++) { |
|
217 | - if (($line[$i] >= '0') && ($line[$i] <= '9')) { |
|
218 | - $value = (int) $line[$i]; |
|
219 | - } else if ($line[$i] == '-' ) { |
|
220 | - $value = 1; |
|
221 | - } else { |
|
222 | - $value = 0; |
|
223 | - } |
|
224 | - |
|
225 | - $checksum += $value; |
|
226 | - } |
|
227 | - |
|
228 | - $checksum %= 10; |
|
229 | - |
|
230 | - return $checksum; |
|
231 | - } |
|
137 | + public function Checksum_Good($tle_set) |
|
138 | + { |
|
139 | + if (strlen($tle_set) < 69) { |
|
140 | + return false; |
|
141 | + } |
|
142 | + |
|
143 | + $checksum = 0; |
|
144 | + |
|
145 | + for ($i = 0; $i < 68; $i++) { |
|
146 | + if (($tle_set[$i] >= '0') && ($tle_set[$i] <= '9')) { |
|
147 | + $value = $tle_set[$i] - '0'; |
|
148 | + } else if ($tle_set[$i] == '-' ) { |
|
149 | + $value = 1; |
|
150 | + } else { |
|
151 | + $value = 0; |
|
152 | + } |
|
153 | + |
|
154 | + $checksum += $value; |
|
155 | + } |
|
156 | + |
|
157 | + $checksum %= 10; |
|
158 | + $check_digit = $tle_set[68] - '0'; |
|
159 | + |
|
160 | + return $checksum == $check_digit; |
|
161 | + } |
|
162 | + |
|
163 | + /* Carries out various checks on a TLE set to verify its validity */ |
|
164 | + /* $line1 is the first line of the TLE, $line2 is the second line */ |
|
165 | + /* from a text file containing NASA format Keplerian elements. */ |
|
166 | + public function Good_Elements($line1, $line2) |
|
167 | + { |
|
168 | + /* Verify checksum of both lines of a TLE set */ |
|
169 | + if (!$this->Checksum_Good($line1) || !$this->Checksum_Good($line2)) { |
|
170 | + return false; |
|
171 | + } |
|
172 | + |
|
173 | + /* Check the line number of each line */ |
|
174 | + if (($line1[0] != '1') || ($line2[0] != '2')) { |
|
175 | + return false; |
|
176 | + } |
|
177 | + |
|
178 | + /* Verify that Satellite Number is same in both lines */ |
|
179 | + if (strncmp($line1[2], $line2[2], 5) != 0) { |
|
180 | + return false; |
|
181 | + } |
|
182 | + |
|
183 | + /* Check that various elements are in the right place */ |
|
184 | + if (($line1[23] != '.') || |
|
185 | + ($line1[34] != '.') || |
|
186 | + ($line2[11] != '.') || |
|
187 | + ($line2[20] != '.') || |
|
188 | + ($line2[37] != '.') || |
|
189 | + ($line2[46] != '.') || |
|
190 | + ($line2[54] != '.') || |
|
191 | + (strncmp(substr($line1, 61), ' 0 ', 3) != 0)) { |
|
192 | + |
|
193 | + return false; |
|
194 | + } |
|
195 | + |
|
196 | + return true; |
|
197 | + } |
|
198 | + |
|
199 | + /** |
|
200 | + * A function to allow checksum creation of a line. This is driven by |
|
201 | + * the fact that some TLEs from SpaceTrack are missing checksum numbers. |
|
202 | + * You can use this to create a checksum for a line, but you should |
|
203 | + * probably have confidence that the TLE data itself is good. YMMV. |
|
204 | + * |
|
205 | + * @throws Predict_Exception if the line is not exactly 68 chars |
|
206 | + * @return string |
|
207 | + */ |
|
208 | + static public function createChecksum($line) |
|
209 | + { |
|
210 | + if (strlen($line) != 68) { |
|
211 | + throw Predict_Exception('Invalid line, needs to e 68 chars'); |
|
212 | + } |
|
213 | + |
|
214 | + $checksum = 0; |
|
215 | + |
|
216 | + for ($i = 0; $i < 68; $i++) { |
|
217 | + if (($line[$i] >= '0') && ($line[$i] <= '9')) { |
|
218 | + $value = (int) $line[$i]; |
|
219 | + } else if ($line[$i] == '-' ) { |
|
220 | + $value = 1; |
|
221 | + } else { |
|
222 | + $value = 0; |
|
223 | + } |
|
224 | + |
|
225 | + $checksum += $value; |
|
226 | + } |
|
227 | + |
|
228 | + $checksum %= 10; |
|
229 | + |
|
230 | + return $checksum; |
|
231 | + } |
|
232 | 232 | } |
@@ -12,30 +12,30 @@ discard block |
||
12 | 12 | */ |
13 | 13 | class Predict_TLE |
14 | 14 | { |
15 | - public $header; /* Header line of TLE file */ |
|
16 | - public $line1; /* Line 1 of TLE */ |
|
17 | - public $line2; /* Line 2 of TLE */ |
|
18 | - public $epoch; /*!< Epoch Time in NORAD TLE format YYDDD.FFFFFFFF */ |
|
15 | + public $header; /* Header line of TLE file */ |
|
16 | + public $line1; /* Line 1 of TLE */ |
|
17 | + public $line2; /* Line 2 of TLE */ |
|
18 | + public $epoch; /*!< Epoch Time in NORAD TLE format YYDDD.FFFFFFFF */ |
|
19 | 19 | public $epoch_year; /*!< Epoch: year */ |
20 | - public $epoch_day; /*!< Epoch: day of year */ |
|
21 | - public $epoch_fod; /*!< Epoch: Fraction of day. */ |
|
22 | - public $xndt2o; /*!< 1. time derivative of mean motion */ |
|
23 | - public $xndd6o; /*!< 2. time derivative of mean motion */ |
|
24 | - public $bstar; /*!< Bstar drag coefficient. */ |
|
25 | - public $xincl; /*!< Inclination */ |
|
26 | - public $xnodeo; /*!< R.A.A.N. */ |
|
27 | - public $eo; /*!< Eccentricity */ |
|
28 | - public $omegao; /*!< argument of perigee */ |
|
29 | - public $xmo; /*!< mean anomaly */ |
|
30 | - public $xno; /*!< mean motion */ |
|
31 | - |
|
32 | - public $catnr; /*!< Catalogue Number. */ |
|
33 | - public $elset; /*!< Element Set number. */ |
|
34 | - public $revnum; /*!< Revolution Number at epoch. */ |
|
35 | - |
|
36 | - public $sat_name; /*!< Satellite name string. */ |
|
37 | - public $idesg; /*!< International Designator. */ |
|
38 | - public $status; /*!< Operational status. */ |
|
20 | + public $epoch_day; /*!< Epoch: day of year */ |
|
21 | + public $epoch_fod; /*!< Epoch: Fraction of day. */ |
|
22 | + public $xndt2o; /*!< 1. time derivative of mean motion */ |
|
23 | + public $xndd6o; /*!< 2. time derivative of mean motion */ |
|
24 | + public $bstar; /*!< Bstar drag coefficient. */ |
|
25 | + public $xincl; /*!< Inclination */ |
|
26 | + public $xnodeo; /*!< R.A.A.N. */ |
|
27 | + public $eo; /*!< Eccentricity */ |
|
28 | + public $omegao; /*!< argument of perigee */ |
|
29 | + public $xmo; /*!< mean anomaly */ |
|
30 | + public $xno; /*!< mean motion */ |
|
31 | + |
|
32 | + public $catnr; /*!< Catalogue Number. */ |
|
33 | + public $elset; /*!< Element Set number. */ |
|
34 | + public $revnum; /*!< Revolution Number at epoch. */ |
|
35 | + |
|
36 | + public $sat_name; /*!< Satellite name string. */ |
|
37 | + public $idesg; /*!< International Designator. */ |
|
38 | + public $status; /*!< Operational status. */ |
|
39 | 39 | |
40 | 40 | /* values needed for squint calculations */ |
41 | 41 | public $xincl1; |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | $this->xndt2o = (float) substr($line1, 33, 10); |
94 | 94 | |
95 | 95 | /* Satellite's Second Time Derivative */ |
96 | - $this->xndd6o = (float) (substr($line1, 44, 1) . '.' . substr($line1, 45, 5) . 'E' . substr($line1, 50, 2)); |
|
96 | + $this->xndd6o = (float) (substr($line1, 44, 1).'.'.substr($line1, 45, 5).'E'.substr($line1, 50, 2)); |
|
97 | 97 | |
98 | 98 | /* Satellite's bstar drag term |
99 | 99 | FIXME: How about buff[0] ???? |
100 | 100 | */ |
101 | - $this->bstar = (float) (substr($line1, 53, 1) . '.' . substr($line1, 54, 5) . 'E' . substr($line1, 59, 2)); |
|
101 | + $this->bstar = (float) (substr($line1, 53, 1).'.'.substr($line1, 54, 5).'E'.substr($line1, 59, 2)); |
|
102 | 102 | |
103 | 103 | /* Element Number */ |
104 | 104 | $this->elset = (int) substr($line1, 64, 4); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $this->xnodeo = (float) substr($line2, 17, 8); |
112 | 112 | |
113 | 113 | /* Satellite's Orbital Eccentricity */ |
114 | - $this->eo = (float) ('.' . substr($line2, 26, 7)); |
|
114 | + $this->eo = (float) ('.'.substr($line2, 26, 7)); |
|
115 | 115 | |
116 | 116 | /* Satellite's Argument of Perigee (degrees) */ |
117 | 117 | $this->omegao = (float) substr($line2, 34, 8); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | for ($i = 0; $i < 68; $i++) { |
146 | 146 | if (($tle_set[$i] >= '0') && ($tle_set[$i] <= '9')) { |
147 | 147 | $value = $tle_set[$i] - '0'; |
148 | - } else if ($tle_set[$i] == '-' ) { |
|
148 | + } else if ($tle_set[$i] == '-') { |
|
149 | 149 | $value = 1; |
150 | 150 | } else { |
151 | 151 | $value = 0; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | for ($i = 0; $i < 68; $i++) { |
217 | 217 | if (($line[$i] >= '0') && ($line[$i] <= '9')) { |
218 | 218 | $value = (int) $line[$i]; |
219 | - } else if ($line[$i] == '-' ) { |
|
219 | + } else if ($line[$i] == '-') { |
|
220 | 220 | $value = 1; |
221 | 221 | } else { |
222 | 222 | $value = 0; |
@@ -6,8 +6,8 @@ |
||
6 | 6 | */ |
7 | 7 | class Predict_Geodetic |
8 | 8 | { |
9 | - public $lat; /*!< Lattitude [rad] */ |
|
10 | - public $lon; /*!< Longitude [rad] */ |
|
11 | - public $alt; /*!< Altitude [km] */ |
|
12 | - public $theta; |
|
9 | + public $lat; /*!< Lattitude [rad] */ |
|
10 | + public $lon; /*!< Longitude [rad] */ |
|
11 | + public $alt; /*!< Altitude [km] */ |
|
12 | + public $theta; |
|
13 | 13 | } |
@@ -8,32 +8,32 @@ |
||
8 | 8 | */ |
9 | 9 | class Predict_SGSDPStatic |
10 | 10 | { |
11 | - public $aodp; |
|
12 | - public $aycof; |
|
13 | - public $c1; |
|
14 | - public $c4; |
|
15 | - public $c5; |
|
16 | - public $cosio; |
|
17 | - public $d2; |
|
18 | - public $d3; |
|
19 | - public $d4; |
|
20 | - public $delmo; |
|
21 | - public $omgcof; |
|
22 | - public $eta; |
|
23 | - public $omgdot; |
|
24 | - public $sinio; |
|
25 | - public $xnodp; |
|
26 | - public $sinmo; |
|
27 | - public $t2cof; |
|
28 | - public $t3cof; |
|
29 | - public $t4cof; |
|
30 | - public $t5cof; |
|
31 | - public $x1mth2; |
|
32 | - public $x3thm1; |
|
33 | - public $x7thm1; |
|
34 | - public $xmcof; |
|
35 | - public $xmdot; |
|
36 | - public $xnodcf; |
|
37 | - public $xnodot; |
|
38 | - public $xlcof; |
|
11 | + public $aodp; |
|
12 | + public $aycof; |
|
13 | + public $c1; |
|
14 | + public $c4; |
|
15 | + public $c5; |
|
16 | + public $cosio; |
|
17 | + public $d2; |
|
18 | + public $d3; |
|
19 | + public $d4; |
|
20 | + public $delmo; |
|
21 | + public $omgcof; |
|
22 | + public $eta; |
|
23 | + public $omgdot; |
|
24 | + public $sinio; |
|
25 | + public $xnodp; |
|
26 | + public $sinmo; |
|
27 | + public $t2cof; |
|
28 | + public $t3cof; |
|
29 | + public $t4cof; |
|
30 | + public $t5cof; |
|
31 | + public $x1mth2; |
|
32 | + public $x3thm1; |
|
33 | + public $x7thm1; |
|
34 | + public $xmcof; |
|
35 | + public $xmdot; |
|
36 | + public $xnodcf; |
|
37 | + public $xnodot; |
|
38 | + public $xlcof; |
|
39 | 39 | } |
@@ -7,14 +7,14 @@ |
||
7 | 7 | */ |
8 | 8 | class Predict_QTH |
9 | 9 | { |
10 | - public $name; /*!< Name, eg. callsign. */ |
|
11 | - public $loc; /*!< Location, eg City, Country. */ |
|
12 | - public $desc; /*!< Short description. */ |
|
13 | - public $lat; /*!< Latitude in dec. deg. North. */ |
|
14 | - public $lon; /*!< Longitude in dec. deg. East. */ |
|
15 | - public $alt; /*!< Altitude above sea level in meters. */ |
|
16 | - public $qra; /*!< QRA locator */ |
|
17 | - public $wx; /*!< Weather station code (4 chars). */ |
|
10 | + public $name; /*!< Name, eg. callsign. */ |
|
11 | + public $loc; /*!< Location, eg City, Country. */ |
|
12 | + public $desc; /*!< Short description. */ |
|
13 | + public $lat; /*!< Latitude in dec. deg. North. */ |
|
14 | + public $lon; /*!< Longitude in dec. deg. East. */ |
|
15 | + public $alt; /*!< Altitude above sea level in meters. */ |
|
16 | + public $qra; /*!< QRA locator */ |
|
17 | + public $wx; /*!< Weather station code (4 chars). */ |
|
18 | 18 | |
19 | - public $data; /*!< Raw data from cfg file. */ |
|
19 | + public $data; /*!< Raw data from cfg file. */ |
|
20 | 20 | } |
@@ -7,14 +7,14 @@ |
||
7 | 7 | */ |
8 | 8 | class Predict_QTH |
9 | 9 | { |
10 | - public $name; /*!< Name, eg. callsign. */ |
|
11 | - public $loc; /*!< Location, eg City, Country. */ |
|
12 | - public $desc; /*!< Short description. */ |
|
13 | - public $lat; /*!< Latitude in dec. deg. North. */ |
|
14 | - public $lon; /*!< Longitude in dec. deg. East. */ |
|
15 | - public $alt; /*!< Altitude above sea level in meters. */ |
|
16 | - public $qra; /*!< QRA locator */ |
|
17 | - public $wx; /*!< Weather station code (4 chars). */ |
|
10 | + public $name; /*!< Name, eg. callsign. */ |
|
11 | + public $loc; /*!< Location, eg City, Country. */ |
|
12 | + public $desc; /*!< Short description. */ |
|
13 | + public $lat; /*!< Latitude in dec. deg. North. */ |
|
14 | + public $lon; /*!< Longitude in dec. deg. East. */ |
|
15 | + public $alt; /*!< Altitude above sea level in meters. */ |
|
16 | + public $qra; /*!< QRA locator */ |
|
17 | + public $wx; /*!< Weather station code (4 chars). */ |
|
18 | 18 | |
19 | - public $data; /*!< Raw data from cfg file. */ |
|
19 | + public $data; /*!< Raw data from cfg file. */ |
|
20 | 20 | } |
@@ -6,8 +6,8 @@ |
||
6 | 6 | */ |
7 | 7 | class Predict_Vector |
8 | 8 | { |
9 | - public $x = 0; |
|
10 | - public $y = 0; |
|
11 | - public $z = 0; |
|
12 | - public $w = 0; |
|
9 | + public $x = 0; |
|
10 | + public $y = 0; |
|
11 | + public $z = 0; |
|
12 | + public $w = 0; |
|
13 | 13 | } |
@@ -23,8 +23,11 @@ discard block |
||
23 | 23 | echo $e->getMessage(); |
24 | 24 | } |
25 | 25 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
26 | - if (isset($result[0])) return $result[0]; |
|
27 | - else return array(); |
|
26 | + if (isset($result[0])) { |
|
27 | + return $result[0]; |
|
28 | + } else { |
|
29 | + return array(); |
|
30 | + } |
|
28 | 31 | } |
29 | 32 | public function get_tle_types() { |
30 | 33 | $query = 'SELECT DISTINCT tle_type FROM tle ORDER BY tle_type'; |
@@ -35,8 +38,11 @@ discard block |
||
35 | 38 | echo $e->getMessage(); |
36 | 39 | } |
37 | 40 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
38 | - if (isset($result[0])) return $result; |
|
39 | - else return array(); |
|
41 | + if (isset($result[0])) { |
|
42 | + return $result; |
|
43 | + } else { |
|
44 | + return array(); |
|
45 | + } |
|
40 | 46 | } |
41 | 47 | public function get_tle_names() { |
42 | 48 | $query = 'SELECT DISTINCT tle_name, tle_type FROM tle'; |
@@ -47,8 +53,11 @@ discard block |
||
47 | 53 | echo $e->getMessage(); |
48 | 54 | } |
49 | 55 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
50 | - if (isset($result[0])) return $result; |
|
51 | - else return array(); |
|
56 | + if (isset($result[0])) { |
|
57 | + return $result; |
|
58 | + } else { |
|
59 | + return array(); |
|
60 | + } |
|
52 | 61 | } |
53 | 62 | public function get_tle_names_type($type) { |
54 | 63 | $query = 'SELECT tle_name, tle_type FROM tle WHERE tle_type = :type ORDER BY tle_name'; |
@@ -59,8 +68,11 @@ discard block |
||
59 | 68 | echo $e->getMessage(); |
60 | 69 | } |
61 | 70 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
62 | - if (isset($result[0])) return $result; |
|
63 | - else return array(); |
|
71 | + if (isset($result[0])) { |
|
72 | + return $result; |
|
73 | + } else { |
|
74 | + return array(); |
|
75 | + } |
|
64 | 76 | } |
65 | 77 | |
66 | 78 | public function position_all($timestamp_begin = '',$timestamp_end = '',$second = 10) { |
@@ -95,7 +107,9 @@ discard block |
||
95 | 107 | $sat = new Predict_Sat($tle); |
96 | 108 | $predict = new Predict(); |
97 | 109 | //if ($timestamp == '') $now = Predict_Time::get_current_daynum(); |
98 | - if ($timestamp_begin == '') $timestamp_begin = time(); |
|
110 | + if ($timestamp_begin == '') { |
|
111 | + $timestamp_begin = time(); |
|
112 | + } |
|
99 | 113 | if ($timestamp_end == '') { |
100 | 114 | $now = Predict_Time::unix2daynum($timestamp_begin); |
101 | 115 | //echo $now; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | try { |
20 | 20 | $sth = $this->db->prepare($query); |
21 | 21 | $sth->execute(array(':name' => $name)); |
22 | - } catch(PDOException $e) { |
|
22 | + } catch (PDOException $e) { |
|
23 | 23 | echo $e->getMessage(); |
24 | 24 | } |
25 | 25 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | try { |
32 | 32 | $sth = $this->db->prepare($query); |
33 | 33 | $sth->execute(); |
34 | - } catch(PDOException $e) { |
|
34 | + } catch (PDOException $e) { |
|
35 | 35 | echo $e->getMessage(); |
36 | 36 | } |
37 | 37 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | try { |
44 | 44 | $sth = $this->db->prepare($query); |
45 | 45 | $sth->execute(); |
46 | - } catch(PDOException $e) { |
|
46 | + } catch (PDOException $e) { |
|
47 | 47 | echo $e->getMessage(); |
48 | 48 | } |
49 | 49 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | try { |
56 | 56 | $sth = $this->db->prepare($query); |
57 | 57 | $sth->execute(array(':type' => $type)); |
58 | - } catch(PDOException $e) { |
|
58 | + } catch (PDOException $e) { |
|
59 | 59 | echo $e->getMessage(); |
60 | 60 | } |
61 | 61 | $result = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -63,27 +63,27 @@ discard block |
||
63 | 63 | else return array(); |
64 | 64 | } |
65 | 65 | |
66 | - public function position_all($timestamp_begin = '',$timestamp_end = '',$second = 10) { |
|
66 | + public function position_all($timestamp_begin = '', $timestamp_end = '', $second = 10) { |
|
67 | 67 | $all_sat = $this->get_tle_names(); |
68 | 68 | $result = array(); |
69 | 69 | foreach ($all_sat as $sat) { |
70 | - $position = $this->position($sat['tle_name'],$timestamp_begin,$timestamp_end,$second); |
|
71 | - $result = array_merge($position,$result); |
|
70 | + $position = $this->position($sat['tle_name'], $timestamp_begin, $timestamp_end, $second); |
|
71 | + $result = array_merge($position, $result); |
|
72 | 72 | } |
73 | 73 | return $result; |
74 | 74 | } |
75 | 75 | |
76 | - public function position_all_type($type,$timestamp_begin = '',$timestamp_end = '',$second = 10) { |
|
76 | + public function position_all_type($type, $timestamp_begin = '', $timestamp_end = '', $second = 10) { |
|
77 | 77 | $all_sat = $this->get_tle_names_type($type); |
78 | 78 | $result = array(); |
79 | 79 | foreach ($all_sat as $sat) { |
80 | - $position = $this->position($sat['tle_name'],$timestamp_begin,$timestamp_end,$second); |
|
81 | - $result = array_merge($position,$result); |
|
80 | + $position = $this->position($sat['tle_name'], $timestamp_begin, $timestamp_end, $second); |
|
81 | + $result = array_merge($position, $result); |
|
82 | 82 | } |
83 | 83 | return $result; |
84 | 84 | } |
85 | 85 | |
86 | - public function position($name,$timestamp_begin = '',$timestamp_end = '',$second = 10) { |
|
86 | + public function position($name, $timestamp_begin = '', $timestamp_end = '', $second = 10) { |
|
87 | 87 | $qth = new Predict_QTH(); |
88 | 88 | $qth->lat = floatval(37.790252); |
89 | 89 | $qth->lon = floatval(-122.419968); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $tle_file = $this->get_tle($name); |
92 | 92 | //print_r($tle_file); |
93 | 93 | $type = $tle_file['tle_type']; |
94 | - $tle = new Predict_TLE($tle_file['tle_name'],$tle_file['tle_tle1'],$tle_file['tle_tle2']); |
|
94 | + $tle = new Predict_TLE($tle_file['tle_name'], $tle_file['tle_tle1'], $tle_file['tle_tle2']); |
|
95 | 95 | $sat = new Predict_Sat($tle); |
96 | 96 | $predict = new Predict(); |
97 | 97 | //if ($timestamp == '') $now = Predict_Time::get_current_daynum(); |
@@ -99,16 +99,16 @@ discard block |
||
99 | 99 | if ($timestamp_end == '') { |
100 | 100 | $now = Predict_Time::unix2daynum($timestamp_begin); |
101 | 101 | //echo $now; |
102 | - $predict->predict_calc($sat,$qth,$now); |
|
103 | - return array('name' => $name, 'latitude' => $sat->ssplat,'longitude' => $sat->ssplon, 'altitude' => $sat->alt,'speed' => $sat->velo*60*60,'timestamp' => $timestamp_begin,'type' => $type); |
|
102 | + $predict->predict_calc($sat, $qth, $now); |
|
103 | + return array('name' => $name, 'latitude' => $sat->ssplat, 'longitude' => $sat->ssplon, 'altitude' => $sat->alt, 'speed' => $sat->velo*60*60, 'timestamp' => $timestamp_begin, 'type' => $type); |
|
104 | 104 | } else { |
105 | 105 | $result = array(); |
106 | - for ($timestamp = $timestamp_begin; $timestamp <= $timestamp_end; $timestamp=$timestamp+$second) { |
|
106 | + for ($timestamp = $timestamp_begin; $timestamp <= $timestamp_end; $timestamp = $timestamp + $second) { |
|
107 | 107 | //echo $timestamp."\n"; |
108 | 108 | $now = Predict_Time::unix2daynum($timestamp); |
109 | 109 | //echo $now; |
110 | - $predict->predict_calc($sat,$qth,$now); |
|
111 | - $result[] = array('name' => $name,'latitude' => $sat->ssplat,'longitude' => $sat->ssplon, 'altitude' => $sat->alt,'speed' => $sat->velo*60*60,'timestamp' => $timestamp,'type' => $type); |
|
110 | + $predict->predict_calc($sat, $qth, $now); |
|
111 | + $result[] = array('name' => $name, 'latitude' => $sat->ssplat, 'longitude' => $sat->ssplon, 'altitude' => $sat->alt, 'speed' => $sat->velo*60*60, 'timestamp' => $timestamp, 'type' => $type); |
|
112 | 112 | } |
113 | 113 | return $result; |
114 | 114 | } |
@@ -1,48 +1,48 @@ |
||
1 | 1 | #!/usr/bin/php |
2 | 2 | <?php |
3 | - require_once('../require/settings.php'); |
|
4 | - if ($globalInstalled) { |
|
5 | - echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | - exit; |
|
7 | - } |
|
8 | - require('class.update_db.php'); |
|
9 | - echo "Populate all tables...\n"; |
|
10 | - update_db::update_all(); |
|
11 | - echo "\nInstall waypoints...(VERY slow!)"; |
|
12 | - update_db::update_waypoints(); |
|
13 | - echo "Done !\n"; |
|
14 | - echo "Install airspace..."; |
|
15 | - update_db::update_airspace(); |
|
16 | - echo "Done !\n"; |
|
17 | - echo "Install countries..."; |
|
18 | - update_db::update_countries(); |
|
19 | - echo "Done !\n"; |
|
20 | - if (isset($globalOwner) && $globalOwner) { |
|
3 | + require_once('../require/settings.php'); |
|
4 | + if ($globalInstalled) { |
|
5 | + echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | + exit; |
|
7 | + } |
|
8 | + require('class.update_db.php'); |
|
9 | + echo "Populate all tables...\n"; |
|
10 | + update_db::update_all(); |
|
11 | + echo "\nInstall waypoints...(VERY slow!)"; |
|
12 | + update_db::update_waypoints(); |
|
13 | + echo "Done !\n"; |
|
14 | + echo "Install airspace..."; |
|
15 | + update_db::update_airspace(); |
|
16 | + echo "Done !\n"; |
|
17 | + echo "Install countries..."; |
|
18 | + update_db::update_countries(); |
|
19 | + echo "Done !\n"; |
|
20 | + if (isset($globalOwner) && $globalOwner) { |
|
21 | 21 | echo "Install private owners..."; |
22 | 22 | update_db::update_owner(); |
23 | - echo "Done !\n"; |
|
24 | - } |
|
25 | - /* |
|
23 | + echo "Done !\n"; |
|
24 | + } |
|
25 | + /* |
|
26 | 26 | if (isset($globalIVAO) && $globalIVAO) { |
27 | 27 | echo "Install IVAO airlines and logos..."; |
28 | 28 | update_db::update_IVAO(); |
29 | 29 | echo "Done !\n"; |
30 | 30 | } |
31 | 31 | */ |
32 | - if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
32 | + if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
33 | 33 | echo "Install NOTAM from notaminfo.com..."; |
34 | - update_db:update_notam(); |
|
35 | - echo "Done !\n"; |
|
36 | - } |
|
37 | - if (isset($globalMap3D) && $globalMap3D) { |
|
34 | + update_db:update_notam(); |
|
35 | + echo "Done !\n"; |
|
36 | + } |
|
37 | + if (isset($globalMap3D) && $globalMap3D) { |
|
38 | 38 | echo "Install 3D models..."; |
39 | 39 | update_db::update_models(); |
40 | 40 | echo "Done !\n"; |
41 | 41 | if (isset($globalMapSatellites) && $globalMapSatellites) { |
42 | - echo "Install Space 3D models..."; |
|
43 | - update_db::update_space_models(); |
|
44 | - echo "Done !\n"; |
|
45 | - } |
|
46 | - } |
|
42 | + echo "Install Space 3D models..."; |
|
43 | + update_db::update_space_models(); |
|
44 | + echo "Done !\n"; |
|
45 | + } |
|
46 | + } |
|
47 | 47 | |
48 | 48 | ?> |
49 | 49 | \ No newline at end of file |