kopia lustrzana https://github.com/cyoung/stratux
add horizontal GPS precision to the "GPS solution" row on the status page
rodzic
eebf4be15c
commit
ee6ca139af
|
@ -707,7 +707,7 @@ func cpuTempMonitor() {
|
|||
|
||||
func updateStatus() {
|
||||
if mySituation.Quality == 2 {
|
||||
globalStatus.GPS_solution = "GPS + SBAS (WAAS / EGNOS)"
|
||||
globalStatus.GPS_solution = "GPS + SBAS (WAAS)"
|
||||
} else if mySituation.Quality == 1 {
|
||||
globalStatus.GPS_solution = "3D GPS"
|
||||
} else if mySituation.Quality == 6 {
|
||||
|
@ -735,6 +735,7 @@ func updateStatus() {
|
|||
globalStatus.GPS_satellites_locked = mySituation.Satellites
|
||||
globalStatus.GPS_satellites_seen = mySituation.SatellitesSeen
|
||||
globalStatus.GPS_satellites_tracked = mySituation.SatellitesTracked
|
||||
globalStatus.GPS_position_accuracy = mySituation.Accuracy
|
||||
|
||||
// Update Uptime value
|
||||
globalStatus.Uptime = int64(stratuxClock.Milliseconds)
|
||||
|
@ -973,6 +974,7 @@ type status struct {
|
|||
GPS_satellites_locked uint16
|
||||
GPS_satellites_seen uint16
|
||||
GPS_satellites_tracked uint16
|
||||
GPS_position_accuracy float32
|
||||
GPS_connected bool
|
||||
GPS_solution string
|
||||
RY835AI_connected bool
|
||||
|
|
|
@ -53,6 +53,7 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) {
|
|||
$scope.GPS_satellites_tracked = status.GPS_satellites_tracked;
|
||||
$scope.GPS_satellites_seen = status.GPS_satellites_seen;
|
||||
$scope.GPS_solution = status.GPS_solution;
|
||||
$scope.GPS_position_accuracy = String(status.GPS_solution ? ", " + status.GPS_position_accuracy.toFixed(1) : "");
|
||||
$scope.RY835AI_connected = status.RY835AI_connected;
|
||||
var tempClock = new Date(Date.parse(status.Clock));
|
||||
var clockString = tempClock.toUTCString();
|
||||
|
@ -66,7 +67,7 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) {
|
|||
$scope.visible_errors = true;
|
||||
$scope.Errors = status.Errors;
|
||||
}
|
||||
|
||||
|
||||
var uptime = status.Uptime;
|
||||
if (uptime != undefined) {
|
||||
var up_d = parseInt((uptime/1000) / 86400),
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</div>
|
||||
<div class="row" ng-class="{'section_invisible': !visible_gps}">
|
||||
<label class="col-xs-6">GPS solution:</label>
|
||||
<span class="col-xs-6">{{GPS_solution}}</span>
|
||||
<span class="col-xs-6">{{GPS_solution}}{{GPS_position_accuracy}}</span>
|
||||
</div>
|
||||
<div class="row" ng-class="{'section_invisible': !visible_gps}">
|
||||
<label class="col-xs-6">GPS satellites:</label>
|
||||
|
|
Ładowanie…
Reference in New Issue