|
@@ -59,11 +59,11 @@ discard block |
|
|
block discarded – undo |
|
59
|
59
|
$s3 = sin($bank/2); |
|
60
|
60
|
$c1c2 = $c1*$c2; |
|
61
|
61
|
$s1s2 = $s1*$s2; |
|
62
|
|
- $w =$c1c2*$c3 - $s1s2*$s3; |
|
63
|
|
- $x =$c1c2*$s3 + $s1s2*$c3; |
|
64
|
|
- $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
65
|
|
- $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
66
|
|
- return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
|
62
|
+ $w = $c1c2*$c3 - $s1s2*$s3; |
|
|
63
|
+ $x = $c1c2*$s3 + $s1s2*$c3; |
|
|
64
|
+ $y = $s1*$c2*$c3 + $c1*$s2*$s3; |
|
|
65
|
+ $z = $c1*$s2*$c3 - $s1*$c2*$s3; |
|
|
66
|
+ return array('x' => $x, 'y' => $y, 'z' => $z, 'w' => $w); |
|
67
|
67
|
// return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
|
68
|
68
|
|
|
69
|
69
|
} |
|
@@ -84,17 +84,17 @@ discard block |
|
|
block discarded – undo |
|
84
|
84
|
$min = false; |
|
85
|
85
|
$allhistory = false; |
|
86
|
86
|
$filter['source'] = array(); |
|
87
|
|
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
88
|
|
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
89
|
|
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
90
|
|
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
91
|
|
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
92
|
|
-if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
93
|
|
-if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
94
|
|
-if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
95
|
|
-if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
96
|
|
-if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
97
|
|
-if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
|
87
|
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
|
88
|
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
|
89
|
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
|
90
|
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
|
91
|
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
|
92
|
+if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
|
93
|
+if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING); |
|
|
94
|
+if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
|
95
|
+if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
|
96
|
+if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
|
97
|
+if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
98
|
98
|
/* |
|
99
|
99
|
if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
|
100
|
100
|
$min = true; |
|
@@ -141,12 +141,12 @@ discard block |
|
|
block discarded – undo |
|
141
|
141
|
$from_archive = true; |
|
142
|
142
|
// $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
|
143
|
143
|
// $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
|
144
|
|
- $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
145
|
|
- $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
146
|
|
- $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
147
|
|
- $begindate = date('Y-m-d H:i:s',$begindate); |
|
148
|
|
- $enddate = date('Y-m-d H:i:s',$enddate); |
|
149
|
|
- $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
|
|
144
|
+ $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
|
145
|
+ $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
|
146
|
+ $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
|
147
|
+ $begindate = date('Y-m-d H:i:s', $begindate); |
|
|
148
|
+ $enddate = date('Y-m-d H:i:s', $enddate); |
|
|
149
|
+ $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate, $enddate, $filter); |
|
150
|
150
|
} elseif (isset($_COOKIE['archive']) && isset($_COOKIE['archive_begin']) && isset($_COOKIE['archive_end']) && isset($_COOKIE['archive_speed'])) { |
|
151
|
151
|
$from_archive = true; |
|
152
|
152
|
// $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
|
@@ -162,48 +162,48 @@ discard block |
|
|
block discarded – undo |
|
162
|
162
|
} |
|
163
|
163
|
$enddate = $_COOKIE['archive_end']; |
|
164
|
164
|
$enddateinitial = $_COOKIE['archive_end']; |
|
165
|
|
- $archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT); |
|
166
|
|
- $begindate = date('Y-m-d H:i:s',$begindate); |
|
167
|
|
- $enddate = date('Y-m-d H:i:s',$enddate); |
|
|
165
|
+ $archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT); |
|
|
166
|
+ $begindate = date('Y-m-d H:i:s', $begindate); |
|
|
167
|
+ $enddate = date('Y-m-d H:i:s', $enddate); |
|
168
|
168
|
//echo 'Begin : '.$begindate.' - End : '.$enddate."\n"; |
|
169
|
|
- $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
|
169
|
+ $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
170
|
170
|
} elseif ($tracker) { |
|
171
|
171
|
$coord = array(); |
|
172
|
172
|
if (isset($_GET['coord']) && $_GET['coord'] != '') { |
|
173
|
|
- $coord = explode(',',$_GET['coord']); |
|
174
|
|
- if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
|
173
|
+ $coord = explode(',', $_GET['coord']); |
|
|
174
|
+ if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
175
|
175
|
&& $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
176
|
176
|
$coord = array(); |
|
177
|
177
|
} |
|
178
|
178
|
} |
|
179
|
|
- $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true); |
|
|
179
|
+ $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true); |
|
180
|
180
|
} elseif ($marine) { |
|
181
|
181
|
$coord = array(); |
|
182
|
182
|
if (isset($_GET['coord']) && $_GET['coord'] != '') { |
|
183
|
|
- $coord = explode(',',$_GET['coord']); |
|
184
|
|
- if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
|
183
|
+ $coord = explode(',', $_GET['coord']); |
|
|
184
|
+ if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
185
|
185
|
&& $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
186
|
186
|
$coord = array(); |
|
187
|
187
|
} |
|
188
|
188
|
} |
|
189
|
|
- $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true); |
|
|
189
|
+ $spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true); |
|
190
|
190
|
} else { |
|
191
|
191
|
$coord = array(); |
|
192
|
192
|
if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
|
193
|
|
- $coord = explode(',',$_GET['coord']); |
|
194
|
|
- if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
|
193
|
+ $coord = explode(',', $_GET['coord']); |
|
|
194
|
+ if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
195
|
195
|
&& $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
196
|
196
|
$coord = array(); |
|
197
|
197
|
} |
|
198
|
198
|
} |
|
199
|
199
|
$previous_filter = $filter; |
|
200
|
200
|
if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) { |
|
201
|
|
- $filter = array_merge($filter,array('id' => $_COOKIE['MapTrack'])); |
|
202
|
|
- $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
|
201
|
+ $filter = array_merge($filter, array('id' => $_COOKIE['MapTrack'])); |
|
|
202
|
+ $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
203
|
203
|
} elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && !empty($coord)) { |
|
204
|
|
- $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true,$_COOKIE['MapTrack']); |
|
|
204
|
+ $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true, $_COOKIE['MapTrack']); |
|
205
|
205
|
} elseif (!isset($_COOKIE['singlemodel']) || $_COOKIE['singlemodel'] == 'false') { |
|
206
|
|
- $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
|
206
|
+ $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
207
|
207
|
} else { |
|
208
|
208
|
$spotter_array = array(); |
|
209
|
209
|
} |
|
@@ -212,7 +212,7 @@ discard block |
|
|
block discarded – undo |
|
212
|
212
|
//print_r($spotter_array); |
|
213
|
213
|
if (!empty($spotter_array) && isset($coord)) { |
|
214
|
214
|
if (isset($_GET['archive'])) { |
|
215
|
|
- $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
|
215
|
+ $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
216
|
216
|
} elseif ($tracker) { |
|
217
|
217
|
$flightcnt = $TrackerLive->getLiveTrackerCount($filter); |
|
218
|
218
|
} elseif ($marine) { |
|
@@ -223,17 +223,17 @@ discard block |
|
|
block discarded – undo |
|
223
|
223
|
if ($flightcnt == '') $flightcnt = 0; |
|
224
|
224
|
} else $flightcnt = 0; |
|
225
|
225
|
|
|
226
|
|
-$sqltime = round(microtime(true)-$begintime,2); |
|
|
226
|
+$sqltime = round(microtime(true) - $begintime, 2); |
|
227
|
227
|
$minitime = time(); |
|
228
|
228
|
$minitracktime_begin = time(); |
|
229
|
229
|
$minitracktime = $minitracktime_begin; |
|
230
|
230
|
$maxitime = 0; |
|
231
|
|
-$lastupdate = filter_input(INPUT_GET,'update',FILTER_SANITIZE_NUMBER_INT); |
|
|
231
|
+$lastupdate = filter_input(INPUT_GET, 'update', FILTER_SANITIZE_NUMBER_INT); |
|
232
|
232
|
$modelsdb = array(); |
|
233
|
233
|
if (file_exists(dirname(__FILE__).'/models/modelsdb')) { |
|
234
|
|
- if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) { |
|
235
|
|
- while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
236
|
|
- if (isset($row[1]) ){ |
|
|
234
|
+ if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) { |
|
|
235
|
+ while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
|
236
|
+ if (isset($row[1])) { |
|
237
|
237
|
$model = $row[0]; |
|
238
|
238
|
$modelsdb[$model] = $row[1]; |
|
239
|
239
|
} |
|
@@ -243,9 +243,9 @@ discard block |
|
|
block discarded – undo |
|
243
|
243
|
} |
|
244
|
244
|
$modelsdb2 = array(); |
|
245
|
245
|
if (file_exists(dirname(__FILE__).'/models/gltf2/modelsdb')) { |
|
246
|
|
- if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb','r')) !== FALSE) { |
|
247
|
|
- while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
248
|
|
- if (isset($row[1]) ){ |
|
|
246
|
+ if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb', 'r')) !== FALSE) { |
|
|
247
|
+ while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
|
248
|
+ if (isset($row[1])) { |
|
249
|
249
|
$model = $row[0]; |
|
250
|
250
|
$glb = $row[1]; |
|
251
|
251
|
if (isset($row[2])) { |
|
@@ -291,7 +291,7 @@ discard block |
|
|
block discarded – undo |
|
291
|
291
|
if (!empty($spotter_array) && is_array($spotter_array)) |
|
292
|
292
|
{ |
|
293
|
293
|
$nblatlong = 0; |
|
294
|
|
- foreach($spotter_array as $spotter_item) |
|
|
294
|
+ foreach ($spotter_array as $spotter_item) |
|
295
|
295
|
{ |
|
296
|
296
|
$j++; |
|
297
|
297
|
//if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
|
@@ -333,9 +333,9 @@ discard block |
|
|
block discarded – undo |
|
333
|
333
|
$output .= '"lastupdate": "'.$lastupdate.'",'; |
|
334
|
334
|
if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
335
|
335
|
if ($tracker) { |
|
336
|
|
- $output.= '"type": "tracker"'; |
|
|
336
|
+ $output .= '"type": "tracker"'; |
|
337
|
337
|
} elseif ($marine) { |
|
338
|
|
- $output.= '"type": "marine"'; |
|
|
338
|
+ $output .= '"type": "marine"'; |
|
339
|
339
|
} else { |
|
340
|
340
|
if ($one3dmodel === false && isset($globalMap3DLiveries) && $globalMap3DLiveries) { |
|
341
|
341
|
$aircraft_icao = $spotter_item['aircraft_icao']; |
|
@@ -349,14 +349,14 @@ discard block |
|
|
block discarded – undo |
|
349
|
349
|
if (isset($airline_icao)) { |
|
350
|
350
|
$imagefile = $aircraft_icao.'-'.$airline_icao.'.png'; |
|
351
|
351
|
if (file_exists(dirname(__FILE__).'/models/gltf2/liveries/'.$imagefile)) { |
|
352
|
|
- $output.= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
|
352
|
+ $output .= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
353
|
353
|
} |
|
354
|
354
|
} |
|
355
|
355
|
} |
|
356
|
|
- if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
|
356
|
+ if ($ident != '') $output .= '"ident": "'.$ident.'",'; |
|
357
|
357
|
} |
|
358
|
|
- $output.= '"gltf2": %gltf2%,'; |
|
359
|
|
- $output.= '"type": "flight"'; |
|
|
358
|
+ $output .= '"gltf2": %gltf2%,'; |
|
|
359
|
+ $output .= '"type": "flight"'; |
|
360
|
360
|
} |
|
361
|
361
|
$output .= '},'; |
|
362
|
362
|
|
|
@@ -727,8 +727,8 @@ discard block |
|
|
block discarded – undo |
|
727
|
727
|
$output .= '},'; |
|
728
|
728
|
} |
|
729
|
729
|
} |
|
730
|
|
- if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
731
|
|
- else $output = str_replace('%onground%','false',$output); |
|
|
730
|
+ if (isset($onground) && $onground) $output = str_replace('%onground%', 'true', $output); |
|
|
731
|
+ else $output = str_replace('%onground%', 'false', $output); |
|
732
|
732
|
|
|
733
|
733
|
// $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
|
734
|
734
|
//$output .= '"heightReference": "'.$heightrelative.'",'; |
|
@@ -744,7 +744,7 @@ discard block |
|
|
block discarded – undo |
|
744
|
744
|
if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
745
|
745
|
if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
|
746
|
746
|
if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
747
|
|
- $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
|
747
|
+ $output .= '"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
748
|
748
|
$output .= $spotter_item['longitude'].', '; |
|
749
|
749
|
$output .= $spotter_item['latitude']; |
|
750
|
750
|
$prevlong = $spotter_item['longitude']; |
|
@@ -772,8 +772,8 @@ discard block |
|
|
block discarded – undo |
|
772
|
772
|
//$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
|
773
|
773
|
//$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
|
774
|
774
|
} else { |
|
775
|
|
- $nblatlong = $nblatlong+1; |
|
776
|
|
- $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
|
775
|
+ $nblatlong = $nblatlong + 1; |
|
|
776
|
+ $output .= ',"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
777
|
777
|
if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
778
|
778
|
if ($spotter_item['ground_speed'] == 0) { |
|
779
|
779
|
$output .= $prevlong.', '; |
|
@@ -814,26 +814,26 @@ discard block |
|
|
block discarded – undo |
|
814
|
814
|
$output .= ']'; |
|
815
|
815
|
if (isset($globalArchive) && $globalArchive === TRUE) { |
|
816
|
816
|
if (isset($begindateinitial)) { |
|
817
|
|
- $output = str_replace('%minitime%',date("c",$begindateinitial),$output); |
|
818
|
|
- } elseif ((time()-$globalLiveInterval) > $minitime) { |
|
819
|
|
- if (time()-$globalLiveInterval > $maxitime) { |
|
820
|
|
- $output = str_replace('%minitime%',date("c",$maxitime),$output); |
|
|
817
|
+ $output = str_replace('%minitime%', date("c", $begindateinitial), $output); |
|
|
818
|
+ } elseif ((time() - $globalLiveInterval) > $minitime) { |
|
|
819
|
+ if (time() - $globalLiveInterval > $maxitime) { |
|
|
820
|
+ $output = str_replace('%minitime%', date("c", $maxitime), $output); |
|
821
|
821
|
} else { |
|
822
|
|
- $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
|
822
|
+ $output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output); |
|
823
|
823
|
} |
|
824
|
824
|
} |
|
825
|
|
- else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
|
825
|
+ else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
826
|
826
|
} elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
827
|
|
- $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
|
|
827
|
+ $output = str_replace('%minitime%', date("c", $minitracktime), $output); |
|
828
|
828
|
} else { |
|
829
|
|
- $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
|
829
|
+ $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
830
|
830
|
} |
|
831
|
831
|
if (isset($enddateinitial)) { |
|
832
|
|
- $output = str_replace('%maxitime%',date("c",$enddateinitial),$output); |
|
|
832
|
+ $output = str_replace('%maxitime%', date("c", $enddateinitial), $output); |
|
833
|
833
|
} else { |
|
834
|
|
- $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
|
|
834
|
+ $output = str_replace('%maxitime%', date("c", $maxitime), $output); |
|
835
|
835
|
} |
|
836
|
|
-if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
837
|
|
-else $output = str_replace('%gltf2%','false',$output); |
|
|
836
|
+if ($gltf2) $output = str_replace('%gltf2%', 'true', $output); |
|
|
837
|
+else $output = str_replace('%gltf2%', 'false', $output); |
|
838
|
838
|
print $output; |
|
839
|
839
|
?> |