ADSB enrichment

This commit is contained in:
2026-06-25 11:13:47 -04:00
parent f2afc09fac
commit 1b65a8619c

View File

@@ -46,7 +46,7 @@ async function importAircraftDb() {
const insert = db.prepare(`INSERT OR REPLACE INTO aircraft(icao, reg, type_code, flags, desc) VALUES (?,?,?,?,?)`);
const run = db.transaction((rows) => {
for(const [icao, a] of Object.entries(rows)) {
insert.run(icao.toUpperCase().padStart(6, '0'), reg || null, type_code || null, flags || null, desc || null);
insert.run(icao.toUpperCase().padStart(6, '0'), a.r || null, a.t || null, a.f || null, a.desc || null);
total++;
}
});