chore: release v0.25.9
This commit is contained in:
@@ -195,10 +195,7 @@ func (m *Manager) Lookup(ctx context.Context, callsign string) (Result, error) {
|
||||
// operator was looking the call up for, and it came back empty while
|
||||
// the same lookup without the suffix answered perfectly.
|
||||
if !saysNothingAboutLocation(call) {
|
||||
r.Country, r.Continent = "", ""
|
||||
r.CQZ, r.ITUZ, r.DXCC = 0, 0, 0
|
||||
r.Lat, r.Lon = 0, 0
|
||||
r.Grid, r.State, r.County = "", "", ""
|
||||
clearHomeLocation(&r)
|
||||
}
|
||||
fillFromDXCC(&r, dxcc) // entity/zones/lat-lon from the FULL (slashed) call
|
||||
normalizeNames(&r)
|
||||
@@ -378,6 +375,17 @@ func titleCase(s string) string {
|
||||
// the DXCC number since QRZ's value is wrong and we don't have an entity
|
||||
// → DXCC# table yet.
|
||||
// Returns true if any field was filled.
|
||||
// clearHomeLocation drops the fields that say WHERE a callbook record's operator
|
||||
// lives, and keeps the ones that say WHO they are — name, address, QSL route.
|
||||
// A portable operator's cards still go to the home address, so that address is
|
||||
// not wrong; their county is.
|
||||
func clearHomeLocation(r *Result) {
|
||||
r.Country, r.Continent = "", ""
|
||||
r.CQZ, r.ITUZ, r.DXCC = 0, 0, 0
|
||||
r.Lat, r.Lon = 0, 0
|
||||
r.Grid, r.State, r.County = "", "", ""
|
||||
}
|
||||
|
||||
func fillFromDXCC(r *Result, dxcc DXCCResolver) bool {
|
||||
if dxcc == nil {
|
||||
return false
|
||||
@@ -387,6 +395,33 @@ func fillFromDXCC(r *Result, dxcc DXCCResolver) bool {
|
||||
return false
|
||||
}
|
||||
filled := false
|
||||
|
||||
// A subdivision belongs to an ENTITY, so a record describing one entity has
|
||||
// nothing to say about a station operating from another.
|
||||
//
|
||||
// TI8/W2RE came back as a Costa Rica contact in Dutchess County, New York, on
|
||||
// square FN31 — W2RE's home details, from a QRZ page that carries the home
|
||||
// mailing address as most portable pages do. CNTY is *defined* as a US
|
||||
// county, so that is not a cosmetic slip: it is a US county award credit
|
||||
// recorded against a Costa Rica QSO, and a distance and beam heading computed
|
||||
// from a square 3,600 km from where the station actually is.
|
||||
//
|
||||
// The home-call fallback above already clears these, but it only runs when NO
|
||||
// provider had the slashed form. An operator with a page for their portable
|
||||
// call never reached it. Cleared here instead, where the operating entity is
|
||||
// known — which also heals rows already in the cache, since every cache hit
|
||||
// comes back through here.
|
||||
//
|
||||
// Same-entity portables (F4BPO/P, W2RE/2) are untouched: the entities match,
|
||||
// and there the home details ARE where the operator is.
|
||||
if dxccNum != 0 && strings.ContainsRune(r.Callsign, '/') && !saysNothingAboutLocation(r.Callsign) {
|
||||
if home := homeCall(r.Callsign); home != "" && home != r.Callsign {
|
||||
if homeNum, _, _, _, _, _, _, homeOK := dxcc.Resolve(home); homeOK && homeNum != 0 && homeNum != dxccNum {
|
||||
clearHomeLocation(r)
|
||||
filled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
if country != "" {
|
||||
r.Country = country
|
||||
filled = true
|
||||
|
||||
Reference in New Issue
Block a user