up
This commit is contained in:
@@ -284,6 +284,12 @@ var adifPromoted = stringSet(
|
||||
"my_street", "my_city", "my_postal_code", "my_rig", "my_antenna",
|
||||
// Misc
|
||||
"tx_pwr", "comment", "notes",
|
||||
// ADIF 3.1.7 additional promoted fields
|
||||
"sig", "sig_info", "my_sig", "my_sig_info", "wwff_ref", "my_wwff_ref",
|
||||
"distance", "rx_pwr", "a_index", "k_index", "sfi",
|
||||
"skcc", "fists", "ten_ten", "contacted_op", "eq_call", "pfx", "my_name", "class",
|
||||
"darc_dok", "my_darc_dok", "region", "silent_key", "swl", "qso_complete", "qso_random",
|
||||
"credit_granted", "credit_submitted", "my_arrl_sect", "my_vucc_grids",
|
||||
)
|
||||
|
||||
func stringSet(items ...string) map[string]struct{} {
|
||||
@@ -482,6 +488,48 @@ func recordToQSO(rec Record) (qso.QSO, bool) {
|
||||
q.Comment = rec["comment"]
|
||||
q.Notes = rec["notes"]
|
||||
|
||||
// ADIF 3.1.7 additional promoted fields
|
||||
q.SIG = rec["sig"]
|
||||
q.SIGInfo = rec["sig_info"]
|
||||
q.MySIG = rec["my_sig"]
|
||||
q.MySIGInfo = rec["my_sig_info"]
|
||||
q.WWFFRef = strings.ToUpper(rec["wwff_ref"])
|
||||
q.MyWWFFRef = strings.ToUpper(rec["my_wwff_ref"])
|
||||
if v, ok := parseFloat(rec["distance"]); ok {
|
||||
q.Distance = &v
|
||||
}
|
||||
if v, ok := parseFloat(rec["rx_pwr"]); ok {
|
||||
q.RXPower = &v
|
||||
}
|
||||
if v, ok := parseFloat(rec["a_index"]); ok {
|
||||
q.AIndex = &v
|
||||
}
|
||||
if v, ok := parseFloat(rec["k_index"]); ok {
|
||||
q.KIndex = &v
|
||||
}
|
||||
if v, ok := parseFloat(rec["sfi"]); ok {
|
||||
q.SFI = &v
|
||||
}
|
||||
q.SKCC = rec["skcc"]
|
||||
q.FISTS = rec["fists"]
|
||||
q.TenTen = rec["ten_ten"]
|
||||
q.ContactedOp = strings.ToUpper(rec["contacted_op"])
|
||||
q.EqCall = strings.ToUpper(rec["eq_call"])
|
||||
q.PFX = strings.ToUpper(rec["pfx"])
|
||||
q.MyName = rec["my_name"]
|
||||
q.Class = rec["class"]
|
||||
q.DarcDOK = rec["darc_dok"]
|
||||
q.MyDarcDOK = rec["my_darc_dok"]
|
||||
q.Region = rec["region"]
|
||||
q.SilentKey = strings.ToUpper(rec["silent_key"])
|
||||
q.SWL = strings.ToUpper(rec["swl"])
|
||||
q.QSOComplete = rec["qso_complete"]
|
||||
q.QSORandom = strings.ToUpper(rec["qso_random"])
|
||||
q.CreditGranted = rec["credit_granted"]
|
||||
q.CreditSubmitted = rec["credit_submitted"]
|
||||
q.MyARRLSect = strings.ToUpper(rec["my_arrl_sect"])
|
||||
q.MyVUCCGrids = strings.ToUpper(rec["my_vucc_grids"])
|
||||
|
||||
// Everything else lands in extras (uppercased ADIF names).
|
||||
var extras map[string]string
|
||||
for k, v := range rec {
|
||||
|
||||
Reference in New Issue
Block a user