better match dxcc
This commit is contained in:
54
spot.go
54
spot.go
@ -144,6 +144,11 @@ func (spot *TelnetSpot) GetBand() {
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
case strings.HasPrefix(spot.Frequency, "5."):
|
||||
spot.Band = "60M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
case strings.HasPrefix(spot.Frequency, "7"):
|
||||
spot.Band = "40M"
|
||||
if spot.Mode == "SSB" {
|
||||
@ -181,6 +186,11 @@ func (spot *TelnetSpot) GetBand() {
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
case strings.HasPrefix(spot.Frequency, "50"):
|
||||
spot.Band = "6M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
default:
|
||||
spot.Band = "N/A"
|
||||
}
|
||||
@ -198,9 +208,35 @@ func (spot *TelnetSpot) GuessMode() {
|
||||
if freqInt >= 1800 && freqInt <= 1840 {
|
||||
spot.Mode = "CW"
|
||||
}
|
||||
if freqInt >= 1840 && freqInt <= 1840 {
|
||||
if freqInt >= 1840 && freqInt <= 1844 {
|
||||
spot.Mode = "FT8"
|
||||
}
|
||||
case "80M":
|
||||
if freqInt >= 3500 && freqInt < 3568 {
|
||||
spot.Mode = "CW"
|
||||
}
|
||||
if freqInt >= 3568 && freqInt < 3573 {
|
||||
spot.Mode = "FT4"
|
||||
}
|
||||
if freqInt >= 3573 && freqInt < 3580 {
|
||||
spot.Mode = "FT8"
|
||||
}
|
||||
if freqInt >= 3580 && freqInt < 3600 {
|
||||
spot.Mode = "CW"
|
||||
}
|
||||
if freqInt >= 3600 && freqInt <= 3800 {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
case "60M":
|
||||
if freqInt >= 5351.5 && freqInt < 5354 {
|
||||
spot.Mode = "CW"
|
||||
}
|
||||
if freqInt >= 5354 && freqInt < 5366 {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
if freqInt >= 5366 && freqInt <= 5266.5 {
|
||||
spot.Mode = "FT8"
|
||||
}
|
||||
case "40M":
|
||||
if freqInt >= 7000 && freqInt < 7045.5 {
|
||||
spot.Mode = "CW"
|
||||
@ -311,6 +347,22 @@ func (spot *TelnetSpot) GuessMode() {
|
||||
if freqInt >= 29000 && freqInt <= 29700 {
|
||||
spot.Mode = "FM"
|
||||
}
|
||||
case "6M":
|
||||
if freqInt >= 50000 && freqInt < 50100 {
|
||||
spot.Mode = "CW"
|
||||
}
|
||||
if freqInt >= 50100 && freqInt < 50313 {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
if freqInt >= 50313 && freqInt < 50320 {
|
||||
spot.Mode = "FT8"
|
||||
}
|
||||
if freqInt >= 50320 && freqInt < 50400 {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
if freqInt >= 50400 && freqInt < +52000 {
|
||||
spot.Mode = "FM"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user