|
@@ -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}$~'))); |
|
@@ -156,46 +156,46 @@ discard block |
|
|
block discarded – undo |
|
156
|
156
|
$begindate = $_COOKIE['archive_begin']; |
|
157
|
157
|
$enddate = $_COOKIE['archive_end']; |
|
158
|
158
|
|
|
159
|
|
- $archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT); |
|
160
|
|
- $begindate = date('Y-m-d H:i:s',$begindate); |
|
161
|
|
- $enddate = date('Y-m-d H:i:s',$enddate); |
|
|
159
|
+ $archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT); |
|
|
160
|
+ $begindate = date('Y-m-d H:i:s', $begindate); |
|
|
161
|
+ $enddate = date('Y-m-d H:i:s', $enddate); |
|
162
|
162
|
// echo 'Begin : '.$begindate.' - End : '.$enddate."\n"; |
|
163
|
|
- $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
|
163
|
+ $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
164
|
164
|
} elseif ($tracker) { |
|
165
|
165
|
$coord = array(); |
|
166
|
166
|
if (isset($_GET['coord']) && $_GET['coord'] != '') { |
|
167
|
|
- $coord = explode(',',$_GET['coord']); |
|
168
|
|
- 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) |
|
|
167
|
+ $coord = explode(',', $_GET['coord']); |
|
|
168
|
+ 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) |
|
169
|
169
|
&& $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)) { |
|
170
|
170
|
$coord = array(); |
|
171
|
171
|
} |
|
172
|
172
|
} |
|
173
|
|
- $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true); |
|
|
173
|
+ $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true); |
|
174
|
174
|
} elseif ($marine) { |
|
175
|
175
|
$coord = array(); |
|
176
|
176
|
if (isset($_GET['coord']) && $_GET['coord'] != '') { |
|
177
|
|
- $coord = explode(',',$_GET['coord']); |
|
178
|
|
- 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) |
|
|
177
|
+ $coord = explode(',', $_GET['coord']); |
|
|
178
|
+ 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) |
|
179
|
179
|
&& $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)) { |
|
180
|
180
|
$coord = array(); |
|
181
|
181
|
} |
|
182
|
182
|
} |
|
183
|
|
- $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true); |
|
|
183
|
+ $spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true); |
|
184
|
184
|
} else { |
|
185
|
185
|
$coord = array(); |
|
186
|
186
|
if (isset($_GET['coord']) && $_GET['coord'] != '') { |
|
187
|
|
- $coord = explode(',',$_GET['coord']); |
|
188
|
|
- 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) |
|
|
187
|
+ $coord = explode(',', $_GET['coord']); |
|
|
188
|
+ 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) |
|
189
|
189
|
&& $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)) { |
|
190
|
190
|
$coord = array(); |
|
191
|
191
|
} |
|
192
|
192
|
} |
|
193
|
|
- $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
|
193
|
+ $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
194
|
194
|
} |
|
195
|
195
|
//print_r($spotter_array); |
|
196
|
196
|
if (!empty($spotter_array) && isset($coord)) { |
|
197
|
197
|
if (isset($_GET['archive'])) { |
|
198
|
|
- $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
|
198
|
+ $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
199
|
199
|
} elseif ($tracker) { |
|
200
|
200
|
$flightcnt = $TrackerLive->getLiveTrackerCount($filter); |
|
201
|
201
|
} elseif ($marine) { |
|
@@ -206,15 +206,15 @@ discard block |
|
|
block discarded – undo |
|
206
|
206
|
if ($flightcnt == '') $flightcnt = 0; |
|
207
|
207
|
} else $flightcnt = 0; |
|
208
|
208
|
|
|
209
|
|
-$sqltime = round(microtime(true)-$begintime,2); |
|
|
209
|
+$sqltime = round(microtime(true) - $begintime, 2); |
|
210
|
210
|
$minitime = time(); |
|
211
|
211
|
$maxitime = 0; |
|
212
|
|
-$lastupdate = filter_input(INPUT_GET,'update',FILTER_SANITIZE_NUMBER_INT); |
|
|
212
|
+$lastupdate = filter_input(INPUT_GET, 'update', FILTER_SANITIZE_NUMBER_INT); |
|
213
|
213
|
$modelsdb = array(); |
|
214
|
214
|
if (file_exists(dirname(__FILE__).'/models/modelsdb')) { |
|
215
|
|
- if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) { |
|
216
|
|
- while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
217
|
|
- if (isset($row[1]) ){ |
|
|
215
|
+ if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) { |
|
|
216
|
+ while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
|
217
|
+ if (isset($row[1])) { |
|
218
|
218
|
$model = $row[0]; |
|
219
|
219
|
$modelsdb[$model] = $row[1]; |
|
220
|
220
|
} |
|
@@ -224,9 +224,9 @@ discard block |
|
|
block discarded – undo |
|
224
|
224
|
} |
|
225
|
225
|
$modelsdb2 = array(); |
|
226
|
226
|
if (file_exists(dirname(__FILE__).'/models/gltf2/modelsdb')) { |
|
227
|
|
- if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb','r')) !== FALSE) { |
|
228
|
|
- while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
229
|
|
- if (isset($row[1]) ){ |
|
|
227
|
+ if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb', 'r')) !== FALSE) { |
|
|
228
|
+ while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
|
229
|
+ if (isset($row[1])) { |
|
230
|
230
|
$model = $row[0]; |
|
231
|
231
|
$modelsdb2[$model] = $row[1]; |
|
232
|
232
|
} |
|
@@ -264,7 +264,7 @@ discard block |
|
|
block discarded – undo |
|
264
|
264
|
if (!empty($spotter_array) && is_array($spotter_array)) |
|
265
|
265
|
{ |
|
266
|
266
|
$nblatlong = 0; |
|
267
|
|
- foreach($spotter_array as $spotter_item) |
|
|
267
|
+ foreach ($spotter_array as $spotter_item) |
|
268
|
268
|
{ |
|
269
|
269
|
$j++; |
|
270
|
270
|
//if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
|
@@ -306,9 +306,9 @@ discard block |
|
|
block discarded – undo |
|
306
|
306
|
$output .= '"lastupdate": "'.$lastupdate.'",'; |
|
307
|
307
|
if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
308
|
308
|
if ($tracker) { |
|
309
|
|
- $output.= '"type": "tracker"'; |
|
|
309
|
+ $output .= '"type": "tracker"'; |
|
310
|
310
|
} elseif ($marine) { |
|
311
|
|
- $output.= '"type": "marine"'; |
|
|
311
|
+ $output .= '"type": "marine"'; |
|
312
|
312
|
} else { |
|
313
|
313
|
if ($one3dmodel === false && isset($globalMap3DLiveries) && $globalMap3DLiveries) { |
|
314
|
314
|
$aircraft_icao = $spotter_item['aircraft_icao']; |
|
@@ -322,14 +322,14 @@ discard block |
|
|
block discarded – undo |
|
322
|
322
|
if (isset($airline_icao)) { |
|
323
|
323
|
$imagefile = $aircraft_icao.'-'.$airline_icao.'.png'; |
|
324
|
324
|
if (file_exists(dirname(__FILE__).'/models/gltf2/liveries/'.$imagefile)) { |
|
325
|
|
- $output.= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
|
325
|
+ $output .= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
326
|
326
|
} |
|
327
|
327
|
} |
|
328
|
328
|
} |
|
329
|
|
- if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
|
329
|
+ if ($ident != '') $output .= '"ident": "'.$ident.'",'; |
|
330
|
330
|
} |
|
331
|
|
- $output.= '"gltf2": %gltf2%,'; |
|
332
|
|
- $output.= '"type": "flight"'; |
|
|
331
|
+ $output .= '"gltf2": %gltf2%,'; |
|
|
332
|
+ $output .= '"type": "flight"'; |
|
333
|
333
|
} |
|
334
|
334
|
$output .= '},'; |
|
335
|
335
|
|
|
@@ -682,8 +682,8 @@ discard block |
|
|
block discarded – undo |
|
682
|
682
|
$output .= '},'; |
|
683
|
683
|
} |
|
684
|
684
|
} |
|
685
|
|
- if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
686
|
|
- else $output = str_replace('%onground%','false',$output); |
|
|
685
|
+ if (isset($onground) && $onground) $output = str_replace('%onground%', 'true', $output); |
|
|
686
|
+ else $output = str_replace('%onground%', 'false', $output); |
|
687
|
687
|
|
|
688
|
688
|
// $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
|
689
|
689
|
//$output .= '"heightReference": "'.$heightrelative.'",'; |
|
@@ -698,7 +698,7 @@ discard block |
|
|
block discarded – undo |
|
698
|
698
|
$output .= '"cartographicDegrees": ['; |
|
699
|
699
|
if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
700
|
700
|
if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
701
|
|
- $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
|
701
|
+ $output .= '"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
702
|
702
|
$output .= $spotter_item['longitude'].', '; |
|
703
|
703
|
$output .= $spotter_item['latitude']; |
|
704
|
704
|
$prevlong = $spotter_item['longitude']; |
|
@@ -726,8 +726,8 @@ discard block |
|
|
block discarded – undo |
|
726
|
726
|
//$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
|
727
|
727
|
//$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
|
728
|
728
|
} else { |
|
729
|
|
- $nblatlong = $nblatlong+1; |
|
730
|
|
- $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
|
729
|
+ $nblatlong = $nblatlong + 1; |
|
|
730
|
+ $output .= ',"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
731
|
731
|
if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
732
|
732
|
if ($spotter_item['ground_speed'] == 0) { |
|
733
|
733
|
$output .= $prevlong.', '; |
|
@@ -767,17 +767,17 @@ discard block |
|
|
block discarded – undo |
|
767
|
767
|
} |
|
768
|
768
|
$output .= ']'; |
|
769
|
769
|
if (isset($globalArchive) && $globalArchive === TRUE) { |
|
770
|
|
- if ((time()-$globalLiveInterval) > $minitime) { |
|
771
|
|
- if (time()-$globalLiveInterval > $maxitime) { |
|
772
|
|
- $output = str_replace('%minitime%',date("c",$maxitime),$output); |
|
|
770
|
+ if ((time() - $globalLiveInterval) > $minitime) { |
|
|
771
|
+ if (time() - $globalLiveInterval > $maxitime) { |
|
|
772
|
+ $output = str_replace('%minitime%', date("c", $maxitime), $output); |
|
773
|
773
|
} else { |
|
774
|
|
- $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
|
774
|
+ $output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output); |
|
775
|
775
|
} |
|
776
|
776
|
} |
|
777
|
|
- else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
778
|
|
-} else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
779
|
|
-$output = str_replace('%maxitime%',date("c",$maxitime),$output); |
|
780
|
|
-if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
781
|
|
-else $output = str_replace('%gltf2%','false',$output); |
|
|
777
|
+ else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
|
778
|
+} else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
|
779
|
+$output = str_replace('%maxitime%', date("c", $maxitime), $output); |
|
|
780
|
+if ($gltf2) $output = str_replace('%gltf2%', 'true', $output); |
|
|
781
|
+else $output = str_replace('%gltf2%', 'false', $output); |
|
782
|
782
|
print $output; |
|
783
|
783
|
?> |