-
Notifications
You must be signed in to change notification settings - Fork 21
E. Export Basetation to csv for \db\ direcotory
Al Kissack edited this page Jul 19, 2025
·
3 revisions
This is the script I use to extract the relevant data from my basestation-like mySQL databse. I then use the output to generate the contents of the /db/ directory (https://github.com/alkissack/Dump1090-OpenLayers3-html/wiki/F.-%5Cdb%5C):
SELECT ModeS, IFNULL(Registration,''), IFNULL(ICAOTypeCode,''), IFNULL(Type,''), IFNULL(ModeSCountry,''), IFNULL(UserBool1,''), IFNULL(UserString1,''), IFNULL(UserString2,''), IFNULL(UserString3,''), IFNULL(UserInt1,'') ,IFNULL(OperatorFlagCode,'')
FROM Aircraft
INTO OUTFILE '/tmp/data1.csv'
FIELDS ENCLOSED BY '"' TERMINATED BY ',' ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
References, eg: "ref: AK1C" refer to comments in the code that can be searched for to locate the specific changes