|
|
@ -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, |
|
|
|