cleanup and remove unused/unneeded parts
parent
4ed498bbe7
commit
d7bb3b1f7e
|
@ -2,10 +2,7 @@
|
|||
<script src="https://cesiumjs.org/releases/1.57/Build/Cesium/Cesium.js"></script>
|
||||
<link href="https://cesiumjs.org/releases/1.57/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<style>
|
||||
#overlay {
|
||||
position: absolute;
|
||||
|
@ -16,28 +13,15 @@
|
|||
font-family: monospace;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="cesiumContainer" style="width: 100%; height:100%"></div>
|
||||
<div id="overlay"><div><span id="credit"></span></div></div>
|
||||
<input type="checkbox" id="online" value="Online" onclick="update()">Online Stations?<br>
|
||||
<input type="checkbox" id="offline" value="Offline" onclick="update()">Offline Stations?<br>
|
||||
<input type="checkbox" id="testing" value="Testing" onclick="update()">Testing Stations?<br>
|
||||
<button onclick="toggle()">Toggle Speed Controls</button>
|
||||
<script>
|
||||
|
||||
var timeElement = document.getElementById("credit");
|
||||
var timeNode = document.createTextNode("");
|
||||
timeElement.appendChild(timeNode)
|
||||
|
||||
timeNode.nodeValue = "SpaceCruft! SatNOGS"
|
||||
|
||||
|
||||
Online = Cesium.CzmlDataSource.load("/czml")
|
||||
Offline = Cesium.CzmlDataSource.load("/czmloff")
|
||||
Testing = Cesium.CzmlDataSource.load("/czmltest")
|
||||
document.getElementById("online").checked = true;
|
||||
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwYmEwOTc5YS01N2I3LTRhYmQtOGE0MS1lNTkyMWU2ZmM3YWUiLCJpZCI6Njg1OCwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU0NzU5ODkxOX0.p4alNyuyt_Eufuo8xX_SB6HKHuSixBTxgiVpD6UGI3Y';
|
||||
var viewer = new Cesium.Viewer('cesiumContainer',{shadows:true,timeline:false,vrButton:false,homeButton:false,animation:true,baseLayerPicker:false,navigationInstructionsInitiallyVisible:false,navigationHelpButton:false,imageryProvider :new Cesium.MapboxImageryProvider({
|
||||
mapId: 'mapbox.streets',
|
||||
|
@ -47,48 +31,24 @@
|
|||
viewer.scene.globe.shadows=Cesium.ShadowMode.CAST_ONLY
|
||||
viewer.scene.globe.enableLighting = true
|
||||
viewer.dataSources.add(Online)
|
||||
var now = new Cesium.JulianDate();
|
||||
viewer.clock.currentTime = now;
|
||||
viewer.clock.shouldAnimate = true
|
||||
|
||||
|
||||
const download = async () => {
|
||||
Online = await Cesium.CzmlDataSource.load("/czml")
|
||||
Offline = await Cesium.CzmlDataSource.load("/czmloff")
|
||||
Testing = await Cesium.CzmlDataSource.load("/czmltest")
|
||||
}
|
||||
|
||||
|
||||
setInterval(function(){
|
||||
|
||||
download()
|
||||
update()
|
||||
|
||||
}, 1000*60*15);
|
||||
|
||||
|
||||
function update(){
|
||||
viewer.dataSources.removeAll()
|
||||
if(document.getElementById("online").checked == true){
|
||||
viewer.dataSources.add(Online)
|
||||
}
|
||||
if(document.getElementById("offline").checked == true){
|
||||
viewer.dataSources.add(Offline)
|
||||
}
|
||||
if(document.getElementById("testing").checked == true){
|
||||
viewer.dataSources.add(Testing)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function toggle(){
|
||||
viewer.animation.container.hidden = !viewer.animation.container.hidden;
|
||||
|
||||
}
|
||||
|
||||
viewer._bottomContainer.innerText = ""
|
||||
|
||||
</script>
|
||||
|
||||
Visual work licensed <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC by SA 4.0</a>.
|
||||
<a href="https://gitlab.com/chibill/satnogsmap/tree/master">Source Code</a> by William Gaylord KD9KCK is AGPL.
|
||||
This is a <A HREF="https://spacecruft.org/spacecruft/satnogsmap">SpaceCruft Fork</A>.
|
||||
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This visual work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a> <a href="https://gitlab.com/chibill/satnogsmap/tree/master"> Source Code</a> is licensed under the AGPL license. Produced by William Gaylord KD9KCK. <A HREF="https://spacecruft.org/spacecruft/satnogsmap">SpaceCruft Fork</A>.
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
<head>
|
||||
<script src="https://cesiumjs.org/releases/1.53/Build/Cesium/Cesium.js"></script>
|
||||
<link href="https://cesiumjs.org/releases/1.53/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<style>
|
||||
#overlay {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
top: 30px;
|
||||
background-color: rgba(0, 0, 0, 1);
|
||||
color: white;
|
||||
font-family: monospace;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="cesiumContainer" style="width: 100%; height:100%"></div>
|
||||
<div id="overlay"><div><span id="credit"></span></div></div>
|
||||
<input type="checkbox" id="online" value="Online" onclick="update()">Online Stations?<br>
|
||||
<input type="checkbox" id="offline" value="Offline" onclick="update()">Offline Stations?<br>
|
||||
<input type="checkbox" id="testing" value="Testing" onclick="update()">Testing Stations?<br>
|
||||
<button onclick="toggle()">Toggle Speed Controls</button>
|
||||
<script>
|
||||
var timeElement = document.getElementById("credit");
|
||||
var timeNode = document.createTextNode("");
|
||||
timeElement.appendChild(timeNode)
|
||||
|
||||
timeNode.nodeValue = "SpaceCruft! SatNOGS"
|
||||
|
||||
|
||||
Online = Cesium.CzmlDataSource.load("/czml")
|
||||
Offline = Cesium.CzmlDataSource.load("/czmloff")
|
||||
Testing = Cesium.CzmlDataSource.load("/czmltest")
|
||||
document.getElementById("online").checked = true;
|
||||
|
||||
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwYmEwOTc5YS01N2I3LTRhYmQtOGE0MS1lNTkyMWU2ZmM3YWUiLCJpZCI6Njg1OCwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU0NzU5ODkxOX0.p4alNyuyt_Eufuo8xX_SB6HKHuSixBTxgiVpD6UGI3Y';
|
||||
var viewer = new Cesium.Viewer('cesiumContainer',{shadows:true,timeline:false,vrButton:false,homeButton:false,animation:true,baseLayerPicker:false,navigationInstructionsInitiallyVisible:false,navigationHelpButton:false,imageryProvider :new Cesium.MapboxImageryProvider({
|
||||
mapId: 'mapbox.streets',
|
||||
accessToken: 'pk.eyJ1IjoiY2hpYmlsbCIsImEiOiJjanZ6bmZjenEwMjdzM3luMXMxd3FzenMwIn0.RF4gf01lBWmUiXZFZwUcbA'
|
||||
})});
|
||||
viewer.terrainProvider = Cesium.createWorldTerrain();
|
||||
viewer.scene.globe.shadows=Cesium.ShadowMode.CAST_ONLY
|
||||
viewer.scene.globe.enableLighting = true
|
||||
viewer.dataSources.add(Online)
|
||||
viewer.dataSources.add(Testing)
|
||||
var now = new Cesium.JulianDate();
|
||||
viewer.clock.currentTime = now;
|
||||
viewer.clock.shouldAnimate = true
|
||||
toggle()
|
||||
update()
|
||||
temp = 0
|
||||
viewer.camera.zoomIn(1000000*4)
|
||||
|
||||
function icrf(scene, time) {
|
||||
if (scene.mode !== Cesium.SceneMode.SCENE3D) {
|
||||
return;
|
||||
}
|
||||
t = Object()
|
||||
t.dayNumber = time.dayNumber
|
||||
t.secondsOfDay = temp
|
||||
|
||||
icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(t);
|
||||
if (Cesium.defined(icrfToFixed)) {
|
||||
var camera = viewer.camera;
|
||||
var offset = Cesium.Cartesian3.clone(camera.position);
|
||||
var transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed);
|
||||
camera.lookAtTransform(transform, offset);
|
||||
}
|
||||
|
||||
temp+={{speed}}
|
||||
if (temp > 86400){
|
||||
temp = 0
|
||||
}
|
||||
}
|
||||
|
||||
viewer.scene.postUpdate.addEventListener(icrf);
|
||||
|
||||
const download = async () => {
|
||||
Online = await Cesium.CzmlDataSource.load("/czml")
|
||||
Offline = await Cesium.CzmlDataSource.load("/czmloff")
|
||||
Testing = await Cesium.CzmlDataSource.load("/czmltest")
|
||||
}
|
||||
|
||||
|
||||
setInterval(function(){
|
||||
|
||||
download()
|
||||
update()
|
||||
|
||||
}, 1000*60*30);
|
||||
|
||||
|
||||
|
||||
function update(){
|
||||
viewer.dataSources.removeAll()
|
||||
if(document.getElementById("online").checked == true){
|
||||
viewer.dataSources.add(Online)
|
||||
}
|
||||
if(document.getElementById("offline").checked == true){
|
||||
viewer.dataSources.add(Offline)
|
||||
}
|
||||
if(document.getElementById("testing").checked == true){
|
||||
viewer.dataSources.add(Testing)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function toggle(){
|
||||
viewer.animation.container.hidden = !viewer.animation.container.hidden;
|
||||
|
||||
}
|
||||
|
||||
viewer._bottomContainer.innerText = ""
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This visual work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a> <a href="https://gitlab.com/chibill/satnogsmap/tree/master">Source Code</a> is licensed under the AGPL license. Produced by William Gaylord KD9KCK. <A HREF="https://spacecruft.org/spacecruft/satnogsmap">SpaceCruft Fork</A>.
|
Loading…
Reference in New Issue