Merge branch 'develop' into cubes
This commit is contained in:
commit
f5e3efa635
@ -1,7 +1,6 @@
|
||||
|
||||
let allAccSerial = []
|
||||
let allSerialCoords = []
|
||||
let allTcpCoords = []
|
||||
|
||||
var ctx = document.getElementById('accChart').getContext('2d');
|
||||
var accChart = new Chart(ctx, {
|
||||
@ -89,9 +88,6 @@ function addDistances(tcpDataList, serialDataList){
|
||||
distances.push(distance)
|
||||
}
|
||||
|
||||
console.log("tcp coords: " + tcpCoords)
|
||||
console.log("distances: " + distances)
|
||||
|
||||
accChart.data.labels = tcpTimes
|
||||
accChart.data.datasets[0].data = serialHAccs
|
||||
accChart.data.datasets[1].data = distances
|
||||
|
||||
@ -42,3 +42,8 @@ function addTCPAccuracy(hacc, vacc){
|
||||
barChart.data.datasets[1].data = [hacc, vacc];
|
||||
barChart.update();
|
||||
}
|
||||
//Farbe der Lampen ändern
|
||||
// AN: document.getElementById("greenlamp").style.backgroundColor = 'rgba(0, 230, 64, 1)'
|
||||
// AUS: document.getElementById("greenlamp").style.backgroundColor = 'rgba(0, 100, 0, 1)'
|
||||
// AN: document.getElementById("redlamp").style.backgroundColor = 'rgba(242, 38, 19, 1)'
|
||||
// AUS: document.getElementById("redlamp").style.backgroundColor = 'rgba(139, 0, 0, 1)'
|
||||
|
||||
@ -7,13 +7,6 @@ function composeTimestamp(servertime){
|
||||
return composed;
|
||||
}
|
||||
|
||||
function calculateDistSerialTCP(coordsSerial, coordsTCP) {
|
||||
let long = Math.abs(coordsSerial[0] - coordsTCP[0])
|
||||
let lat = Math.abs(coordsSerial[1] - coordsTCP[1])
|
||||
let squareDist = Math.pow(long, 2) + Math.pow(lat, 2)
|
||||
return (Math.sqrt(squareDist))
|
||||
}
|
||||
|
||||
function findBestTimeMatch(num, arr) {
|
||||
var mid;
|
||||
var lo = 0;
|
||||
@ -55,7 +48,6 @@ function findSerialDataIndex(tcpdataList, serialdataList) {
|
||||
indexes.push(index)
|
||||
}
|
||||
})
|
||||
console.log("indexes: " + indexes)
|
||||
}
|
||||
|
||||
window.addEventListener("load", function(evt) {
|
||||
@ -100,7 +92,7 @@ window.addEventListener("load", function(evt) {
|
||||
console.log(r.data.Data)
|
||||
console.log(r.data)
|
||||
// if('SOURCE_TCP' in r.data.Data && r.data.Data.SOURCE_TCP.length > 0 && 'SOURCE_SERIAL' in r.data.Data && r.data.Data.SOURCE_SERIAL.length > 0){
|
||||
// findSerialDataIndex(r.data.Data.SOURCE_TCP, r.data.Data.SOURCE_SERIAL)
|
||||
findSerialDataIndex(r.data.Data.SOURCE_TCP, r.data.Data.SOURCE_SERIAL)
|
||||
// addDistances(r.data.Data.SOURCE_TCP, r.data.Data.SOURCE_SERIAL)
|
||||
// }
|
||||
if ('SOURCE_TCP' in r.data.Data && r.data.Data.SOURCE_TCP.length > 0) {
|
||||
|
||||
@ -87,26 +87,6 @@ window.addEventListener("load", function(evt) {
|
||||
// console.log("no serial data")
|
||||
}
|
||||
|
||||
try{
|
||||
if(!(dat.SOURCE_TCP.Position[1] === 0) && !(dat.SOURCE_SERIAL.Position[1] === 0)){
|
||||
document.getElementById("diffLong").innerHTML = "Differenz long: " + Math.abs(dat.SOURCE_TCP.Position[1] - dat.SOURCE_SERIAL.Position[1])
|
||||
}
|
||||
if(!(dat.SOURCE_TCP.Position[0] === 0) && !(dat.SOURCE_SERIAL.Position[0] === 0)){
|
||||
document.getElementById("diffLat").innerHTML = "Differenz lat: " + Math.abs(dat.SOURCE_TCP.Position[0] - dat.SOURCE_SERIAL.Position[0])
|
||||
}
|
||||
}
|
||||
catch{
|
||||
console.log("no data to compare")
|
||||
}
|
||||
|
||||
try{
|
||||
if(!(dat.SOURCE_SERIAL.Position[2] === 0)){
|
||||
addSerialAltData(dat.SOURCE_SERIAL.Position[2])
|
||||
}
|
||||
}
|
||||
catch{
|
||||
console.log("no altitude data")
|
||||
}
|
||||
try{
|
||||
if(!(dat.SOURCE_SERIAL.HAcc === 0) && !(dat.SOURCE_SERIAL.VAcc === 0)){
|
||||
addSerialAccuracy(dat.SOURCE_SERIAL.HAcc, dat.SOURCE_SERIAL.VAcc)
|
||||
@ -259,6 +239,9 @@ window.addEventListener("load", function(evt) {
|
||||
};
|
||||
|
||||
document.getElementById("replaystarten").onclick = function(evt) {
|
||||
emptyTCP.features[0].geometry.coordinates = []
|
||||
emptySERIAL.features[0].geometry.coordinates = []
|
||||
|
||||
let sel = document.getElementById("meas")
|
||||
console.log(trackings[sel.selectedIndex].UUID)
|
||||
fetch(`http://localhost:3011/trackings/${trackings[sel.selectedIndex].UUID}?replay=true`, { method: 'GET'}).then(results => {
|
||||
|
||||
@ -305,6 +305,22 @@ canvas {
|
||||
perspective: 400px;
|
||||
}
|
||||
|
||||
.lamp {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: gray;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.lampinner{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
position: relative;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.cube {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
|
||||
@ -41,8 +41,6 @@
|
||||
<label id="TCPlat" style= "font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Smartphone lat: </label>
|
||||
<label id="SERIALlong" style= "font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Ublox long: </label>
|
||||
<label id="SERIALlat" style= "font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Ublox lat: </label>
|
||||
<label id="diffLong" style= "font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Differenz long: </label>
|
||||
<label id="diffLat" style= "font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Differenz lat: </label>
|
||||
</td>
|
||||
<td valign="top" width="100%">
|
||||
<div id="output"><p>.</p></div>
|
||||
@ -67,17 +65,35 @@
|
||||
</div>
|
||||
<div class="float container">
|
||||
<div class="float-child">
|
||||
<div class="container" style="width: 200px; height: 50px">
|
||||
<div class="container" style="width: 150px; height: 50px">
|
||||
<label id="serialHAcc" style= "color: rgba(214, 69, 65, 1); font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Ublox HAcc: </label><br>
|
||||
<label id="serialVAcc" style= "color: rgba(214, 69, 65, 1); font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Ublox VAcc: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-child">
|
||||
<div class="container" style="width: 200px; height: 50px">
|
||||
<div class="container" style="width: 150px; height: 50px">
|
||||
<label id="tcpHAcc" style= "color: rgba(30, 139, 195, 1); font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Smartphone HAcc: </label><br>
|
||||
<label id="tcpVAcc" style= "color: rgba(30, 139, 195, 1); font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Smartphone VAcc: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-child">
|
||||
<div class="float container">
|
||||
<div class="float-child">
|
||||
<div class="container" style="width: 350px; height: 50px">
|
||||
<div class="lamp">
|
||||
<div class="lampinner" id="greenlamp" style="background-color: darkgreen"></div>
|
||||
</div>
|
||||
<label style="position: relative; bottom: 40px; left: 70px; color: white; font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Dist. Ublox-Smartphone (m) <= Genauigkeit Ublox (m). </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-child">
|
||||
<div class="container" style="width: 350px; height: 50px">
|
||||
<div class="lamp">
|
||||
<div class="lampinner" id="redlamp" style="background-color: #8b0000"></div>
|
||||
</div>
|
||||
<label style="position: relative; bottom: 40px; left: 70px; color: white; font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Dist. Ublox-Smartphone (m) > Genauigkeit Ublox (m). </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -143,7 +159,7 @@
|
||||
<div id="NS" class="quad"></div>
|
||||
<div id="WE" class="quad"></div>
|
||||
<span id="N" class="dir">N</span>
|
||||
<span id="E" class="dir">E</span>
|
||||
<span id="E" class="dir">O</span>
|
||||
<span id="S" class="dir">S</span>
|
||||
<span id="W" class="dir">W</span>
|
||||
<div id="needle"></div>
|
||||
@ -159,7 +175,7 @@
|
||||
<div id="NSTCP" class="quad"></div>
|
||||
<div id="WETCP" class="quad"></div>
|
||||
<span id="NTCP" class="dir">N</span>
|
||||
<span id="ETCP" class="dir">E</span>
|
||||
<span id="ETCP" class="dir">O</span>
|
||||
<span id="STCP" class="dir">S</span>
|
||||
<span id="WTCP" class="dir">W</span>
|
||||
<div id="needleTCP"></div>
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
<script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
|
||||
<script src="static/scripts/mapFull.js"></script>
|
||||
<script src="static/scripts/chartFull.js"></script>
|
||||
<script src="static/scripts/speedChart.js"></script>
|
||||
<script src="static/scripts/accChart.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user