kopia lustrzana https://github.com/cyoung/stratux
Added UAT statistics to the status page
rodzic
a951ea9afb
commit
2f2c3d27a3
|
@ -767,6 +767,19 @@ func registerADSBTextMessageReceived(msg string) {
|
||||||
|
|
||||||
var wm WeatherMessage
|
var wm WeatherMessage
|
||||||
|
|
||||||
|
if (x[0] == "METAR") || (x[0] == "SPECI") {
|
||||||
|
globalStatus.UAT_METAR_total++
|
||||||
|
}
|
||||||
|
if x[0] == "TAF" {
|
||||||
|
globalStatus.UAT_TAF_total++
|
||||||
|
}
|
||||||
|
if x[0] == "WINDS" {
|
||||||
|
globalStatus.UAT_TAF_total++
|
||||||
|
}
|
||||||
|
if x[0] == "PIREP" {
|
||||||
|
globalStatus.UAT_PIREP_total++
|
||||||
|
}
|
||||||
|
|
||||||
wm.Type = x[0]
|
wm.Type = x[0]
|
||||||
wm.Location = x[1]
|
wm.Location = x[1]
|
||||||
wm.Time = x[2]
|
wm.Time = x[2]
|
||||||
|
@ -865,6 +878,7 @@ func parseInput(buf string) ([]byte, uint16) {
|
||||||
// Get all of the "product ids".
|
// Get all of the "product ids".
|
||||||
for _, f := range uatMsg.Frames {
|
for _, f := range uatMsg.Frames {
|
||||||
thisMsg.Products = append(thisMsg.Products, f.Product_id)
|
thisMsg.Products = append(thisMsg.Products, f.Product_id)
|
||||||
|
UpdateUATStats(f.Product_id)
|
||||||
}
|
}
|
||||||
// Get all of the text reports.
|
// Get all of the text reports.
|
||||||
textReports, _ := uatMsg.GetTextReports()
|
textReports, _ := uatMsg.GetTextReports()
|
||||||
|
@ -999,6 +1013,14 @@ type status struct {
|
||||||
NetworkDataMessagesSentNonqueueableLastSec uint64
|
NetworkDataMessagesSentNonqueueableLastSec uint64
|
||||||
NetworkDataBytesSentLastSec uint64
|
NetworkDataBytesSentLastSec uint64
|
||||||
NetworkDataBytesSentNonqueueableLastSec uint64
|
NetworkDataBytesSentNonqueueableLastSec uint64
|
||||||
|
UAT_METAR_total uint32
|
||||||
|
UAT_TAF_total uint32
|
||||||
|
UAT_NEXRAD_total uint32
|
||||||
|
UAT_SIGMET_total uint32
|
||||||
|
UAT_PIREP_total uint32
|
||||||
|
UAT_NOTAM_total uint32
|
||||||
|
UAT_OTHER_total uint32
|
||||||
|
|
||||||
Errors []string
|
Errors []string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,13 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) {
|
||||||
$scope.GPS_solution = status.GPS_solution;
|
$scope.GPS_solution = status.GPS_solution;
|
||||||
$scope.GPS_position_accuracy = String(status.GPS_solution ? ", " + status.GPS_position_accuracy.toFixed(1) : "");
|
$scope.GPS_position_accuracy = String(status.GPS_solution ? ", " + status.GPS_position_accuracy.toFixed(1) : "");
|
||||||
$scope.RY835AI_connected = status.RY835AI_connected;
|
$scope.RY835AI_connected = status.RY835AI_connected;
|
||||||
|
$scope.UAT_METAR_total = status.UAT_METAR_total;
|
||||||
|
$scope.UAT_TAF_total = status.UAT_TAF_total;
|
||||||
|
$scope.UAT_NEXRAD_total = status.UAT_NEXRAD_total;
|
||||||
|
$scope.UAT_SIGMET_total = status.UAT_SIGMET_total;
|
||||||
|
$scope.UAT_PIREP_total = status.UAT_PIREP_total;
|
||||||
|
$scope.UAT_NOTAM_total = status.UAT_NOTAM_total;
|
||||||
|
$scope.UAT_OTHER_total = status.UAT_OTHER_total;
|
||||||
// Errors array.
|
// Errors array.
|
||||||
if (status.Errors.length > 0) {
|
if (status.Errors.length > 0) {
|
||||||
$scope.visible_errors = true;
|
$scope.visible_errors = true;
|
||||||
|
|
|
@ -89,7 +89,38 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row"><span class="col-xs-1"> </span></div>
|
<div class="row"><span class="col-xs-1"> </span></div>
|
||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
|
<div class="row" ng-class="{'section_invisible': !visible_uat}">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<span><strong>UAT Statistics</strong></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" ng-class="{'section_invisible': !visible_uat}">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<span align="center" class="col-xs-2">METARS</span>
|
||||||
|
<span align="center" class="col-xs-1">TAFS</span>
|
||||||
|
<span align="center" class="col-xs-2">NEXRAD</span>
|
||||||
|
<span align="center" class="col-xs-1">PIREP</span>
|
||||||
|
<span align="center" class="col-xs-2">SIGMET</span>
|
||||||
|
<span align="center" class="col-xs-2">NOTAMS</span>
|
||||||
|
<span align="center" class="col-xs-2">Other</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" ng-class="{'section_invisible': !visible_uat}">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<span align="center" class="col-xs-2">{{UAT_METAR_total}}</span>
|
||||||
|
<span align="center" class="col-xs-1">{{UAT_TAF_total}}</span>
|
||||||
|
<span align="center" class="col-xs-2">{{UAT_NEXRAD_total}}</span>
|
||||||
|
<span align="center" class="col-xs-1">{{UAT_PIREP_total}}</span>
|
||||||
|
<span align="center" class="col-xs-2">{{UAT_SIGMET_total}}</span>
|
||||||
|
<span align="center" class="col-xs-2">{{UAT_NOTAM_total}}</span>
|
||||||
|
<span align="center" class="col-xs-2">{{UAT_OTHER_total}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row" ng-class="{'section_invisible': !visible_uat}">
|
||||||
|
<div class="separator"></div>
|
||||||
|
<div class="row"><span class="col-xs-1"> </span></div>
|
||||||
|
<div class="separator"></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-4 label_adj">
|
<div class="col-sm-4 label_adj">
|
||||||
<span class="col-xs-5"><strong>Uptime:</strong></span>
|
<span class="col-xs-5"><strong>Uptime:</strong></span>
|
||||||
|
|
Ładowanie…
Reference in New Issue