|
@@ -20,17 +20,17 @@ discard block |
|
|
block discarded – undo |
|
20
|
20
|
|
|
21
|
21
|
$spotter_array = array(); |
|
22
|
22
|
if (isset($_COOKIE['sattypes']) && $_COOKIE['sattypes'] != '') { |
|
23
|
|
- $sattypes = explode(',',$_COOKIE['sattypes']); |
|
|
23
|
+ $sattypes = explode(',', $_COOKIE['sattypes']); |
|
24
|
24
|
foreach ($sattypes as $sattype) { |
|
25
|
|
- $spotter_array = array_merge($Satellite->position_all_type($sattype,$timeb-$globalLiveInterval,$timeb),$spotter_array); |
|
|
25
|
+ $spotter_array = array_merge($Satellite->position_all_type($sattype, $timeb - $globalLiveInterval, $timeb), $spotter_array); |
|
26
|
26
|
} |
|
27
|
27
|
} |
|
28
|
28
|
if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) { |
|
29
|
|
- $spotter_array = array_merge($Satellite->position('ISS (ZARYA)',time()-$globalLiveInterval,time()),$spotter_array); |
|
30
|
|
- $spotter_array = array_merge($Satellite->position('TIANGONG 1',time()-$globalLiveInterval,time()),$spotter_array); |
|
31
|
|
- $spotter_array = array_merge($Satellite->position('TIANGONG-2',time()-$globalLiveInterval,time()),$spotter_array); |
|
|
29
|
+ $spotter_array = array_merge($Satellite->position('ISS (ZARYA)', time() - $globalLiveInterval, time()), $spotter_array); |
|
|
30
|
+ $spotter_array = array_merge($Satellite->position('TIANGONG 1', time() - $globalLiveInterval, time()), $spotter_array); |
|
|
31
|
+ $spotter_array = array_merge($Satellite->position('TIANGONG-2', time() - $globalLiveInterval, time()), $spotter_array); |
|
32
|
32
|
} |
|
33
|
|
-$spotter_array = array_unique($spotter_array,SORT_REGULAR); |
|
|
33
|
+$spotter_array = array_unique($spotter_array, SORT_REGULAR); |
|
34
|
34
|
/* |
|
35
|
35
|
$modelsdb = array(); |
|
36
|
36
|
if (file_exists('models/space/space_modelsdb')) { |
|
@@ -54,14 +54,14 @@ discard block |
|
|
block discarded – undo |
|
54
|
54
|
// $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "LOOP_STOP","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
55
|
55
|
|
|
56
|
56
|
// $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
57
|
|
-$output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
|
57
|
+$output .= ',"clock": {"currentTime" : "'.date("c", time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
58
|
58
|
//$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
59
|
59
|
|
|
60
|
60
|
// $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
61
|
61
|
$output .= '},'; |
|
62
|
62
|
if (!empty($spotter_array) && is_array($spotter_array)) |
|
63
|
63
|
{ |
|
64
|
|
- foreach($spotter_array as $spotter_item) |
|
|
64
|
+ foreach ($spotter_array as $spotter_item) |
|
65
|
65
|
{ |
|
66
|
66
|
$j++; |
|
67
|
67
|
date_default_timezone_set('UTC'); |
|
@@ -115,23 +115,23 @@ discard block |
|
|
block discarded – undo |
|
115
|
115
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubiesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
116
|
116
|
} elseif ($spotter_item['name'] == 'TERRA') { |
|
117
|
117
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/terra.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
118
|
|
- } elseif (strpos($spotter_item['name'],'O3B') !== false) { |
|
|
118
|
+ } elseif (strpos($spotter_item['name'], 'O3B') !== false) { |
|
119
|
119
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/o3b.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
120
|
|
- } elseif (strpos($spotter_item['name'],'GLOBALSTAR') !== false) { |
|
|
120
|
+ } elseif (strpos($spotter_item['name'], 'GLOBALSTAR') !== false) { |
|
121
|
121
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/globalstar.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
122
|
|
- } elseif (strpos($spotter_item['name'],'GPS') !== false) { |
|
|
122
|
+ } elseif (strpos($spotter_item['name'], 'GPS') !== false) { |
|
123
|
123
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/gps.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
124
|
|
- } elseif (strpos($spotter_item['name'],'GENESIS') !== false) { |
|
|
124
|
+ } elseif (strpos($spotter_item['name'], 'GENESIS') !== false) { |
|
125
|
125
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/genesis.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
126
|
|
- } elseif (strpos($spotter_item['name'],'OSCAR 7') !== false) { |
|
|
126
|
+ } elseif (strpos($spotter_item['name'], 'OSCAR 7') !== false) { |
|
127
|
127
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/oscar7.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
128
|
|
- } elseif (strpos($spotter_item['name'],'FLOCK') !== false) { |
|
|
128
|
+ } elseif (strpos($spotter_item['name'], 'FLOCK') !== false) { |
|
129
|
129
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
130
|
|
- } elseif (strpos($spotter_item['name'],'PLEIADES') !== false) { |
|
|
130
|
+ } elseif (strpos($spotter_item['name'], 'PLEIADES') !== false) { |
|
131
|
131
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/pleiades.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
132
|
|
- } elseif (strpos($spotter_item['name'],'DUCHIFAT') !== false) { |
|
|
132
|
+ } elseif (strpos($spotter_item['name'], 'DUCHIFAT') !== false) { |
|
133
|
133
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/duchifat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
134
|
|
- } elseif (strpos($spotter_item['name'],'FORMOSAT-2') !== false) { |
|
|
134
|
+ } elseif (strpos($spotter_item['name'], 'FORMOSAT-2') !== false) { |
|
135
|
135
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/formosat2.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
136
|
136
|
} elseif ($spotter_item['type'] == 'iridium') { |
|
137
|
137
|
$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/iridium.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
|
@@ -153,14 +153,14 @@ discard block |
|
|
block discarded – undo |
|
153
|
153
|
// $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
|
154
|
154
|
$output .= '"interpolationAlgorithm":"HERMITE","interpolationDegree":3,'; |
|
155
|
155
|
$output .= '"cartographicDegrees": ['; |
|
156
|
|
- $output .= '"'.date("c",$spotter_item['timestamp']).'", '; |
|
|
156
|
+ $output .= '"'.date("c", $spotter_item['timestamp']).'", '; |
|
157
|
157
|
$output .= $spotter_item['longitude'].', '; |
|
158
|
158
|
$output .= $spotter_item['latitude'].', '; |
|
159
|
159
|
$output .= $spotter_item['altitude']*1000; |
|
160
|
160
|
$orientation = '"orientation" : { '; |
|
161
|
161
|
$orientation .= '"unitQuaternion": ['; |
|
162
|
162
|
} else { |
|
163
|
|
- $output .= ',"'.date("c",$spotter_item['timestamp']).'", '; |
|
|
163
|
+ $output .= ',"'.date("c", $spotter_item['timestamp']).'", '; |
|
164
|
164
|
$output .= $spotter_item['longitude'].', '; |
|
165
|
165
|
$output .= $spotter_item['latitude'].', '; |
|
166
|
166
|
$output .= $spotter_item['altitude']*1000; |