diff --git a/static/scripts/cubes.js b/static/scripts/cubes.js index 46d7494..27c8179 100644 --- a/static/scripts/cubes.js +++ b/static/scripts/cubes.js @@ -1,5 +1,5 @@ -var width = 600; -var height = 500; +var width = document.getElementById("viewport").offsetWidth +var height = 300; var renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setSize(width, height); @@ -29,14 +29,14 @@ var cube2 = new THREE.Mesh(cubeGeometry2, cubeMaterial2); scene.add(cube); scene.add(cube2); -var camera = new THREE.PerspectiveCamera(45, width / height, 0.1, 10000); -camera.position.y = 160; -camera.position.z = 400; +var camera = new THREE.PerspectiveCamera(45, width / height, 0.1, 6000); +camera.position.y = 100; +camera.position.z = 240; camera.lookAt(cube.position); scene.add(camera); -var skyboxGeometry = new THREE.CubeGeometry(10000, 10000, 10000); +var skyboxGeometry = new THREE.CubeGeometry(5000, 5000, 5000); var skyboxMaterial = new THREE.MeshBasicMaterial({ color: 0x232323, side: THREE.BackSide }); var skybox = new THREE.Mesh(skyboxGeometry, skyboxMaterial); diff --git a/static/scripts/websocket.js b/static/scripts/websocket.js index 33d5200..5868447 100644 --- a/static/scripts/websocket.js +++ b/static/scripts/websocket.js @@ -40,7 +40,7 @@ window.addEventListener("load", function(evt) { try{ if(!(dat.SOURCE_TCP.Orientation[0] === 0) && !(dat.SOURCE_TCP.Orientation[1] === 0) && !(dat.SOURCE_TCP.Orientation[2] === 0)){ // document.getElementById("gyroscopeTCP").style.transform = `rotateX(${(dat.SOURCE_TCP.Orientation[0])%360}deg) rotateY(${(dat.SOURCE_TCP.Orientation[1])%360}deg) rotateZ(0deg)` - document.getElementById("gyroscopeTCP").style.transform = `rotateY(0deg) rotateX(${(-dat.SOURCE_TCP.Orientation[0])}deg) rotateZ(${(dat.SOURCE_TCP.Orientation[1])}deg) ` + // document.getElementById("gyroscopeTCP").style.transform = `rotateY(0deg) rotateX(${(-dat.SOURCE_TCP.Orientation[0])}deg) rotateZ(${(dat.SOURCE_TCP.Orientation[1])}deg) ` // document.getElementById("gyroscopeTCP").style.transform = `rotateX(${(dat.SOURCE_TCP.Orientation[0])%360}deg) rotateZ(${(dat.SOURCE_TCP.Orientation[1])%360}deg) rotateY(${(dat.SOURCE_TCP.Orientation[2])%360}deg)` // console.log(dat.SOURCE_TCP.Orientation) renderTCP(dat.SOURCE_TCP.Orientation[0]*Math.PI/180,-dat.SOURCE_TCP.Orientation[1]*Math.PI/180,dat.SOURCE_TCP.Orientation[2]*Math.PI/180) @@ -66,7 +66,7 @@ window.addEventListener("load", function(evt) { try{ if(!(dat.SOURCE_SERIAL.Orientation[0] === 0) && /*!(dat.SOURCE_SERIAL.Orientation[1] === 0) &&*/ !(dat.SOURCE_SERIAL.Orientation[2] === 0)){ - document.getElementById("gyroscopeSERIAL").style.transform = `rotateX(${dat.SOURCE_SERIAL.Orientation[0]}deg) rotateY(${dat.SOURCE_SERIAL.Orientation[1]}deg) rotateZ(0deg)` + // document.getElementById("gyroscopeSERIAL").style.transform = `rotateX(${dat.SOURCE_SERIAL.Orientation[0]}deg) rotateY(${dat.SOURCE_SERIAL.Orientation[1]}deg) rotateZ(0deg)` // document.getElementById("gyroscopeSERIAL").style.transform = `rotateX(${dat.SOURCE_SERIAL.Orientation[0]}deg) rotateY(${dat.SOURCE_SERIAL.Orientation[1]}deg) rotateZ(${dat.SOURCE_SERIAL.Orientation[2]}deg)` renderSerial(dat.SOURCE_SERIAL.Orientation[0]*Math.PI/180,dat.SOURCE_SERIAL.Orientation[1]*Math.PI/180,-dat.SOURCE_SERIAL.Orientation[2]*Math.PI/180) } diff --git a/static/style.css b/static/style.css index 36dbe89..763548d 100644 --- a/static/style.css +++ b/static/style.css @@ -28,9 +28,39 @@ body { margin: 0; padding: 0; } body{margin:0; padding:0; font-size:13px; font-family:Georgia, "Times New Roman", Times, serif; color:#919191; background-color:#232323;} .float-child { - width: 45%; + width: 50%; float: left; - padding: 10px; +} + +.sceneMap { + width: 200px; + height: 50vh; + border: 0px solid #CCC; + /*margin: 20px;*/ + perspective: 400px; +} + + +.sceneMap, #map { + width: 100%; +} + +.right-col { + display: flex; + flex-flow: wrap; + width: 34%; +} +.left-col { + display: flex; + flex-flow: wrap; + width: calc(66% - 20px); + padding-right: 20px; + +} + +.compass-container { + display: flex; + flex-flow: wrap; } .outer { @@ -38,6 +68,7 @@ body{margin:0; padding:0; font-size:13px; font-family:Georgia, "Times New Roman" width: 300px; height: 200px; margin: 20px; + margin-bottom: 50px; } canvas { @@ -88,13 +119,29 @@ canvas { position: relative; width: 200px; height: 200px; - margin: 20px; + /*margin: 20px;*/ } #compass1 { position: relative; width: 200px; height: 200px; - margin: 20px; + /*margin: 20px;*/ +} + +.accuracy-container { + display: flex; + flex-flow: wrap; + margin: 20px 0; +} + +.accuracy-values { + margin: 28px 20px 0 20px; +} + +.led-container { + display: flex; + flex-flow: column; + margin: 20px 0; } #bezel { @@ -289,14 +336,6 @@ canvas { } } -.sceneMap { - width: 200px; - height: 200px; - border: 0px solid #CCC; - margin: 20px; - perspective: 400px; -} - .scene { width: 200px; height: 200px; @@ -312,6 +351,11 @@ canvas { border-radius: 50%; } +.lamps { + display: flex; + flex-flow: row; +} + .lampinner{ width: 40px; height: 40px; @@ -420,3 +464,8 @@ label { margin-right: 10px; } -webkit-transition: opacity .15s ease-in-out; transition: opacity .15s ease-in-out; } + +#viewport { + width: 100%; + height: 360px; +} diff --git a/templates/index.html b/templates/index.html index 86e296f..9d8c1cb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,14 +3,14 @@ - + - + - - + + @@ -36,22 +36,24 @@
-
- - - - +
+ + + + -
+

.

-
-
-
+
+
+

Legende

Ublox
@@ -59,86 +61,16 @@
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
- - - -
-


Manuelle Kalibrierung

- - - -
-
- -
-

Smartphone

-
-
back
-
front
-
right
-
left
-
top
-
bottom
-
-
-
-

Ublox

-
-
back
-
front
-
right
-
left
-
top
-
bottom
-
-
-
- -
-
-
+
+
+
+
@@ -148,44 +80,98 @@

188

250

-

-
-
-
- -
-
-
-
-
- N - O - S - W -
-
+
+ +
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- N - O - S - W -
-
+
+ +
+
+ +
+
+
+
+ +
+
+
+
-
+
+
+
+ +
+
+
+
+
+ N + O + S + W +
+
+
+
+
+
+
+
+
+
+ N + O + S + W +
+
+
+
+
+
+
+
+ + + +
+


Manuelle Kalibrierung

+ + + +
+
+ + +