Rename SatelliteNMEA to Prn, reflecting actual usage.

pull/538/head
Jason McNew 2016-12-02 13:05:57 +00:00
rodzic 2721beeab8
commit b0050365af
3 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -40,7 +40,7 @@ const (
)
type SatelliteInfo struct {
SatelliteNMEA uint8 // NMEA ID of the satellite. 1-32 is GPS, 33-54 is SBAS, 65-88 is Glonass.
Prn uint8 // PRN ID of the satellite. 1-32 is GPS, 65-88 is Glonass, 120-138 is SBAS
SatelliteID string // Formatted code indicating source and PRN code. e.g. S138==WAAS satellite 138, G2==GPS satellites 2
Elevation int16 // Angle above local horizon, -xx to +90
Azimuth int16 // Bearing (degrees true), 0-359
@ -716,7 +716,7 @@ func processNMEALine(l string) (sentenceUsed bool) {
//log.Printf("UBX,03: Satellite %s already seen. Retrieving from 'Satellites'.\n", svStr) // DEBUG
} else { // this satellite isn't in the Satellites data structure
thisSatellite.SatelliteID = svStr
thisSatellite.SatelliteNMEA = uint8(sv)
thisSatellite.Prn = uint8(sv)
thisSatellite.Type = uint8(svType)
//log.Printf("UBX,03: Creating new satellite %s\n", svStr) // DEBUG
}
@ -1125,7 +1125,7 @@ func processNMEALine(l string) (sentenceUsed bool) {
//log.Printf("Satellite %s already seen. Retrieving from 'Satellites'.\n", svStr)
} else { // this satellite isn't in the Satellites data structure, so create it
thisSatellite.SatelliteID = svStr
thisSatellite.SatelliteNMEA = uint8(sv)
thisSatellite.Prn = uint8(sv)
thisSatellite.Type = uint8(svType)
//log.Printf("Creating new satellite %s from GSA message\n", svStr) // DEBUG
}
@ -1250,7 +1250,7 @@ func processNMEALine(l string) (sentenceUsed bool) {
//log.Printf("Satellite %s already seen. Retrieving from 'Satellites'.\n", svStr) // DEBUG
} else { // this satellite isn't in the Satellites data structure, so create it new
thisSatellite.SatelliteID = svStr
thisSatellite.SatelliteNMEA = uint8(sv)
thisSatellite.Prn = uint8(sv)
thisSatellite.Type = uint8(svType)
//log.Printf("Creating new satellite %s\n", svStr) // DEBUG
}

Wyświetl plik

@ -63,16 +63,16 @@
<div class="panel-body towers-page">
<div class="row">
<span class="col-xs-3"><strong>Satellite</strong></span>
<!--<span class="col-xs-2 text-right"><strong>NMEA Code</strong></span>-->
<!--<span class="col-xs-2 text-right"><strong>PRN Code</strong></span>-->
<span class="col-xs-3 text-right"><strong>Elevation</strong></span>
<span class="col-xs-3 text-right"><strong>Azimuth</strong></span>
<span class="col-xs-3 text-right"><strong>Signal</strong></span>
</div>
<div class="row" ng-repeat="satellite in data_list | orderBy: 'SatelliteNMEA'">
<div class="row" ng-repeat="satellite in data_list | orderBy: 'Prn'">
<div class="separator"></div>
<span class="col-xs-3">{{satellite.SatelliteID}}<span ng-show="satellite.InSolution">&nbsp;&#x2705;</span></span>
<!--<span class="col-xs-2 text-right">{{satellite.SatelliteNMEA}}</span>-->
<!--<span class="col-xs-2 text-right">{{satellite.Prn}}</span>-->
<span class="col-xs-3 text-right">{{satellite.Elevation < -5 ? "---" : satellite.Elevation}}&deg;</span>
<span class="col-xs-3 text-right">{{satellite.Azimuth < 0 ? "---" : satellite.Azimuth}}&deg;</span>
<span class="col-xs-3 text-right">{{satellite.Signal < 1 ? "---" : satellite.Signal}}<span style="font-size:50%">&nbsp;dB-Hz</span></span>

Wyświetl plik

@ -129,7 +129,7 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
};
function setSatellite(obj, new_satellite) {
new_satellite.SatelliteNMEA = obj.SatelliteNMEA;
new_satellite.Prn = obj.Prn;
new_satellite.SatelliteID = obj.SatelliteID; // Formatted code indicating source and PRN code. e.g. S138==WAAS satellite 138, G2==GPS satellites 2
new_satellite.Elevation = obj.Elevation; // Angle above local horizon, -xx to +90
new_satellite.Azimuth = obj.Azimuth; // Bearing (degrees true), 0-359