Browse Source

fix timestamp logging

master
Sebastian Denz 4 years ago
parent
commit
97886041a8
  1. 2
      .gitignore
  2. 16
      shared/wsjtx/wsjtx.go

2
.gitignore

@ -1,2 +1,2 @@
import/
.swp
*.swp

16
shared/wsjtx/wsjtx.go

@ -35,6 +35,18 @@ type Result struct {
Rx int
}
var blackList = map[string]bool {
"73": true,
"RR73;": true,
"GL": true,
"TNX": true,
"<...>": true,
"QSO": true,
"QSY": true,
"TIME": true,
"TIMESYNC": true,
}
func GetBand(freq float64) (string){
band := "unknown"
if (freq>1 && freq<2) {
@ -122,7 +134,7 @@ func ScanLine(line string) (Result, bool) {
}
// ignore 'TNX QSO GL 73' etc.
if result.Call == "73" || result.Call == "<...>" || result.Call == "QSO" || result.Call == "QSY" {
if blackList[result.Call] {
log.WithFields(log.Fields{"line":line,"callsign":result.Call}).Trace("skipping callsign")
return *result, false
}
@ -153,7 +165,7 @@ func ScanLine(line string) (Result, bool) {
"dxcc":result.Ent.DXCC,
"continent":result.Ent.Continent,
"band":result.Band,
"time":result.Timestamp.String(),
"sendtime":result.Timestamp,
"mode":result.Mode,
"geohash":result.GeoHash,
"rx":result.Rx,