Fenix double airport (again?)

Hi,

I think it was already an issue with the last cycle, but I get an error in the Fenix logs with the new cycle:

4/16/2026 7:43:40 PM Error processing database C:\ProgramData\Fenix\Navdata\nd.db3: SQLite Error 19: ‘UNIQUE constraint failed: Airports.ICAO’.

This error will Fenix install the default cycle.

Regards

Thomas

Hi Thomas,
I can confirm the double airport - it is CA69. What I don´t understand is why none of our filters (including a unique-constraint filter in our source database) or the validation tools we implemented since the last cycle have reacted. Will check why this happens again …

Checked again our main source database:

I will recreate the Fenix database now and let you know when it´s done…

Sorry for that, and thanks for the hint
Richard

No problem. As a developer myself such things happen more often than one would like. :wink:

Thomas

I have identified the issue:

There are two airports: one A69 and one CA69. A69 is a Canadian one, CA69 a US one.

Most add-ons (at least in the past) couldn´t handle 3-letter airport codes; therefore, we convert them to international 4-letter codes.

C = when the airport is in Canada
K = when the airport is in the USA

So, in this case, the CA69 still exists, but in the US. So, I add the C to the A69 (because it´s a Canadian 3-letter airport) and voila - we have the double airports. That happens not during the import phase in the database - it´s in the export module…

So far, so good - issue found but not fixed. I must think about how to handle this properly to avoid such duplicate records in the future. Standby please …

Cheers,
Richard

Ok, fixed too (and hopefully forever) :slight_smile:

A little bit of deep dive coding - this should solve the double airports:

        HashSet<string> duplicateIds = new(
            pa_data
                .GroupBy(pad => pad.AirportIdentifier.ArincVal)
                .Where(g => g.Count() > 1)
                .Select(g => g.Key)
        );

        pa_data.RemoveAll(pad =>
            duplicateIds.Contains(pad.AirportIdentifier.ArincVal) &&
            pad.RecordType != STANDARD_RECORD);

:slight_smile:

I´m currently creating the Fenix dataset and will upload the new file ASAP. Keep you informed when it is done…

Cheers,
Richard

Revision 2 is online now …

Please update the Fenix A320 via the Navigraph Hub and try it again. It should work now… Sorry for the issue again, but I think I have fixed it.

Thanks und einen schönen Abend,
Richard

Fixed as expected!

Thx for the quick fix und dir auch einen schönen restlichen Abend

Thomas