feat(db): fill in the distances nothing ever recorded
The published page derives a distance as it renders, which fixed the empty column there but not the cause: the field is empty in the database, so it goes out empty in every ADIF export and leaves the same gap in whoever imports it. BackfillDistances computes it from the two locators for QSOs that have both. Only where it is EMPTY: a stored distance came from the log that recorded the contact, which knew the real positions, and two four-character squares are a worse answer that must not overwrite a better one. Whole kilometres, for the same reason the published column is. In the Database panel rather than beside the county backfill, which lives under US Counties: this one touches the whole logbook, whatever country the QSOs are in.
This commit is contained in:
Vendored
+2
@@ -88,6 +88,8 @@ export function AwardRefsForQSOs(arg1:Array<number>):Promise<Record<number, Reco
|
||||
|
||||
export function AwardsFolder():Promise<string>;
|
||||
|
||||
export function BackfillDistances():Promise<main.BackfillDistancesResult>;
|
||||
|
||||
export function BackfillUSCounties():Promise<main.BackfillUSCountiesResult>;
|
||||
|
||||
export function BandSlotQSOs(arg1:string,arg2:number,arg3:string,arg4:string):Promise<Array<qso.QSO>>;
|
||||
|
||||
@@ -118,6 +118,10 @@ export function AwardsFolder() {
|
||||
return window['go']['main']['App']['AwardsFolder']();
|
||||
}
|
||||
|
||||
export function BackfillDistances() {
|
||||
return window['go']['main']['App']['BackfillDistances']();
|
||||
}
|
||||
|
||||
export function BackfillUSCounties() {
|
||||
return window['go']['main']['App']['BackfillUSCounties']();
|
||||
}
|
||||
|
||||
@@ -1931,6 +1931,22 @@ export namespace main {
|
||||
this.to = source["to"];
|
||||
}
|
||||
}
|
||||
export class BackfillDistancesResult {
|
||||
scanned: number;
|
||||
filled: number;
|
||||
no_grid: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new BackfillDistancesResult(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.scanned = source["scanned"];
|
||||
this.filled = source["filled"];
|
||||
this.no_grid = source["no_grid"];
|
||||
}
|
||||
}
|
||||
export class BackfillUSCountiesResult {
|
||||
scanned: number;
|
||||
county: number;
|
||||
|
||||
Reference in New Issue
Block a user