Show telemetry data in the groundstation

pull/1988/head
Pawel Spychalski (DzikuVx) 6 months ago
parent 6db05efefb
commit 542a307338

@ -5609,5 +5609,32 @@
},
"gsDeactivated": {
"message": "Ground station mode deactivated"
},
"gsTelemetry": {
"message": "Telemetry"
},
"gsTelemetryLatitude": {
"message": "Latitude"
},
"gsTelemetryLongitude": {
"message": "Longitude"
},
"gsTelemetryAltitude": {
"message": "Altitude"
},
"gsTelemetryAltitudeShort": {
"message": "Alt"
},
"gsTelemetryVoltageShort": {
"message": "Vbat"
},
"gsTelemetrySats": {
"message": "Sats"
},
"gsTelemetryFix": {
"message": "Fix"
},
"gsTelemetrySpeed": {
"message": "Speed"
}
}

@ -118,7 +118,7 @@ helper.groundstation = (function () {
let telemetry = helper.ltmDecoder.get();
if (telemetry.gpsFix) {
if (telemetry.gpsFix && telemetry.gpsFix > 1) {
let lat = telemetry.latitude / 10000000;
let lon = telemetry.longitude / 10000000;
@ -165,8 +165,29 @@ helper.groundstation = (function () {
privateScope.cursorPosition.setCoordinates(position);
//Update orientation of cursor
privateScope.cursorStyle.getImage().setRotation((telemetry.heading / 360.0) * 6.28318);
//Update text
privateScope.$viewport.find("#gs-telemetry-latitude").html(lat);
privateScope.$viewport.find("#gs-telemetry-longitude").html(lon);
}
privateScope.$viewport.find("#gs-telemetry-altitude").html(telemetry.altitude / 100.0 + 'm');
privateScope.$viewport.find("#gs-telemetry-voltage").html(telemetry.voltage / 100.0 + 'V');
privateScope.$viewport.find("#gs-telemetry-sats").html(telemetry.gpsSats);
privateScope.$viewport.find("#gs-telemetry-speed").html(telemetry.groundSpeed * 100 + 'm/s');
let fixText = '';
if (telemetry.gpsFix == 3) {
fixText = '3D';
} else if (telemetry.gpsFix == 2) {
fixText = '2D';
} else {
fixText = 'No fix';
}
privateScope.$viewport.find("#gs-telemetry-fix").html(fixText);
};
return publicScope;

@ -175,6 +175,46 @@
<div class="wrapper"></div>
</div>
<div id="view-groundstation" style="display: none;">
<div id="groundstation-telemetry">
<h2 class="groundstation-telemetry__header" data-i18n="gsTelemetry"></h2>
<div class="groundstation-telemetry__row groundstation-telemetry__row--big">
<label for="gs-telemetry-voltage" class="groundstation-telemetry__label" data-i18n="gsTelemetryVoltageShort"></label>
<div class="groundstation-telemetry__value" id="gs-telemetry-voltage">-</div>
</div>
<div class="groundstation-telemetry__row groundstation-telemetry__row--big">
<label for="gs-telemetry-altitude" class="groundstation-telemetry__label" data-i18n="gsTelemetryAltitudeShort"></label>
<div class="groundstation-telemetry__value" id="gs-telemetry-altitude">-</div>
</div>
<div class="groundstation-telemetry__row groundstation-telemetry__row--big">
<label for="gs-telemetry-speed" class="groundstation-telemetry__label" data-i18n="gsTelemetrySpeed"></label>
<div class="groundstation-telemetry__value" id="gs-telemetry-speed">-</div>
</div>
<div class="groundstation-telemetry__row">
<label for="gs-telemetry-latitude" class="groundstation-telemetry__label" data-i18n="gsTelemetryLatitude"></label>
<div class="groundstation-telemetry__value" id="gs-telemetry-latitude">-</div>
</div>
<div class="groundstation-telemetry__row">
<label class="groundstation-telemetry__label" for="gs-telemetry-longitude" data-i18n="gsTelemetryLongitude"></label>
<div class="groundstation-telemetry__value" id="gs-telemetry-longitude">-</div>
</div>
<div class="groundstation-telemetry__row">
<label class="groundstation-telemetry__label" for="gs-telemetry-longitude" data-i18n="gsTelemetrySats"></label>
<div class="groundstation-telemetry__value" id="gs-telemetry-sats">-</div>
</div>
<div class="groundstation-telemetry__row">
<label class="groundstation-telemetry__label" for="gs-telemetry-longitude" data-i18n="gsTelemetryFix"></label>
<div class="groundstation-telemetry__value" id="gs-telemetry-fix">-</div>
</div>
</div>
<div id="groundstation-map"></div>
</div>
<div class="tab_container">

@ -2,9 +2,36 @@
background-color: #2e2e2e;
width: 100%;
height: 100%;
display: flex;
}
#groundstation-map {
width: 100%;
height: 100%;
}
#groundstation-telemetry {
width: 20%;
color: #ddd;
}
.groundstation-telemetry__header {
margin: 1em;
text-align: center;
}
.groundstation-telemetry__row {
display: flex;
justify-content: space-between;
margin: 1em;
font-size: 1.1em;
}
.groundstation-telemetry__row--big {
font-size: 2.2em;
}
.groundstation-telemetry__label {
color: #aaa;
font-weight: bold;
}
Loading…
Cancel
Save