Web UI shows -- and inf when GPS values missing.

pull/610/head
Eric Westphal 2017-05-20 21:58:51 -04:00
rodzic d69e195489
commit 51d7530208
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -116,7 +116,13 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
$scope.SolutionText = solutionText;
$scope.gps_horizontal_accuracy = situation.GPSHorizontalAccuracy.toFixed(1);
if ($scope.gps_horizontal_accuracy > 99999) {
$scope.gps_horizontal_accuracy = "\u221e";
}
$scope.gps_vertical_accuracy = (situation.GPSVerticalAccuracy*3.2808).toFixed(1); // accuracy is in meters, need to display in ft
if ($scope.gps_vertical_accuracy > 99999) {
$scope.gps_vertical_accuracy = "\u221e";
}
// NACp should be an integer value in the range of 0 .. 11
@ -130,6 +136,14 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
$scope.gps_track = situation.GPSTrueCourse.toFixed(1);
$scope.gps_speed = situation.GPSGroundSpeed.toFixed(1);
$scope.gps_vert_speed = situation.GPSVerticalSpeed.toFixed(1);
if ($scope.gps_lat == 0 && $scope.gps_lon == 0) {
$scope.gps_lat = "--";
$scope.gps_lon = "--";
$scope.gps_alt = "--";
$scope.gps_track = "--";
$scope.gps_speed = "--";
$scope.gps_vert_speed = "--";
}
// "LastGroundTrackTime":"0001-01-01T00:00:00Z"