Skip to content

Commit

Permalink
Gofmt. Typo fix. Comment change.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyoung committed Apr 21, 2017
1 parent 1934d85 commit 7d7c2ab
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions main/gps.go
Expand Up @@ -33,7 +33,7 @@ const (
SAT_TYPE_UNKNOWN = 0 // default type
SAT_TYPE_GPS = 1 // GPxxx; NMEA IDs 1-32
SAT_TYPE_GLONASS = 2 // GLxxx; NMEA IDs 65-88
SAT_TYPE_GALILEO = 3 // GAxxx; NMEA IDs
SAT_TYPE_GALILEO = 3 // GAxxx; NMEA IDs
SAT_TYPE_BEIDOU = 4 // GBxxx; NMEA IDs 201-235
SAT_TYPE_SBAS = 10 // NMEA IDs 33-54
)
Expand Down Expand Up @@ -254,7 +254,7 @@ func initGPSSerial() bool {
} else {
// Byte order for UBX configuration is little endian.

// Set 10 Hz update to make gpsattitude more responsive for ublox7/8.
// Set 10 Hz update to make gpsattitude more responsive for ublox7.
updatespeed := []byte{0x64, 0x00, 0x01, 0x00, 0x01, 0x00} // 10 Hz

// Set navigation settings.
Expand Down Expand Up @@ -288,7 +288,7 @@ func initGPSSerial() bool {
//log.Printf("UBX8 device detected on USB, or GPS serial connection in use. Attempting GLONASS and Galelio configuration.\n")
glonass = []byte{0x06, 0x08, 0x0E, 0x00, 0x01, 0x00, 0x01, 0x01} // this enables GLONASS with 8-14 tracking channels
galileo = []byte{0x02, 0x04, 0x08, 0x00, 0x01, 0x00, 0x01, 0x01} // this enables Galileo with 4-8 tracking channels
updatespeed = []byte{0x06, 0x00, 0xF4, 0x01, 0x01, 0x00} // Nav speed 2Hz
updatespeed = []byte{0x06, 0x00, 0xF4, 0x01, 0x01, 0x00} // Nav speed 2Hz
}
cfgGnss = append(cfgGnss, gps...)
cfgGnss = append(cfgGnss, sbas...)
Expand All @@ -301,7 +301,7 @@ func initGPSSerial() bool {
// SBAS configuration for ublox 6 and higher
p.Write(makeUBXCFG(0x06, 0x16, 8, []byte{0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}))
//Navigation Rate 10Hz for <= UBX7 2Hz for UBX8
p.Write(makeUBXCFG(0x06, 0x08, 6, upatespeed))
p.Write(makeUBXCFG(0x06, 0x08, 6, updatespeed))

// Message output configuration: UBX,00 (position) on each calculated fix; UBX,03 (satellite info) every 5th fix,
// UBX,04 (timing) every 10th, GGA (NMEA position) every 5th. All other NMEA messages disabled.
Expand Down Expand Up @@ -1151,8 +1151,8 @@ func processNMEALine(l string) (sentenceUsed bool) {
sv -= 87 // subtract 87 to convert to NMEA from PRN.
} else if sv > 210 {
svType = SAT_TYPE_GALILEO
svStr = fmt.Sprintf("E%d", sv-210)
} else { //TODO: Galileo
svStr = fmt.Sprintf("E%d", sv-210)
} else { //TODO: Galileo
svType = SAT_TYPE_UNKNOWN
svStr = fmt.Sprintf("U%d", sv)
}
Expand Down Expand Up @@ -1624,7 +1624,7 @@ func processNMEALine(l string) (sentenceUsed bool) {
svType = SAT_TYPE_GALILEO
svStr = fmt.Sprintf("E%d", sv-210) // subtract 300 to convert from NMEA to PRN
svGalileo = true
} else {
} else {
svType = SAT_TYPE_UNKNOWN
svStr = fmt.Sprintf("U%d", sv)
}
Expand Down Expand Up @@ -1692,7 +1692,7 @@ func processNMEALine(l string) (sentenceUsed bool) {

}

if (x[0] == "GPGSV") || (x[0] == "GLGSV") || (x[0] == "GAGSV"){ // GPS + SBAS or GLONASS or Galileo satellites in view message.
if (x[0] == "GPGSV") || (x[0] == "GLGSV") || (x[0] == "GAGSV") { // GPS + SBAS or GLONASS or Galileo satellites in view message.
if len(x) < 4 {
return false
}
Expand Down Expand Up @@ -1751,7 +1751,7 @@ func processNMEALine(l string) (sentenceUsed bool) {
} else if sv < 210 { // Galileo
svType = SAT_TYPE_GALILEO
svStr = fmt.Sprintf("E%d", sv-210) // subtract 300 to convert from NMEA to PRN
} else {
} else {
svType = SAT_TYPE_UNKNOWN
svStr = fmt.Sprintf("U%d", sv)
}
Expand Down

0 comments on commit 7d7c2ab

Please sign in to comment.