todirbg / kln90b

kln90b gps for x-plane 11
6 stars 2 forks source link

Nav DB expiry date computed incorrectly #13

Closed JDeeth closed 3 months ago

JDeeth commented 4 months ago

The script extracts the AIRAC cycle from Custom Data/earth_nav.dat, and stores it in Custom Data/KLN90B_Navdata/airports.txt as a date. This is then used to find the expiry date of the nav DB.

If earth_nav.dat has AIRAC cycle 2402:

I
1200 Version - data cycle 2402, build 20240211, metadata NavXP1200. Copyright (c) 2023 Navigraph, Datasource Jeppesen

this becomes an expiry date of 01 Feb 2024 in airports.txt:

X|2402|XXXXX01FEB/24|XXXXXXXXXXXXXXXXXX

by converting 2402 into year (20)24, month 02.

However, AIRAC 2402 is the 2nd data cycle that starts in 2024. It became current on 22 Feb 2024 and will expire 28 days later on 21 Mar 2024 when 2403 becomes active: https://www.nm.eurocontrol.int/RAD/common/airac_dates.html It's just a coincidence it applies in February.

I think the fix will be around line 1138 - computing an expiry date from the AIRAC duty cycle number and recording this in airports.txt. I'll see what I can figure out...