Night Calculation Tool for CSV Logbook Files


Well-known member
Jul 21, 2003
If anyone is interested in trying this out, feel free to download.

Note: It's a BETA right now, so please report any bugs and I'll post the newest builds as things get worked out. Please check any calculations for your area against a known source. It works well for my logbook, but I haven't had a chance to extensively test against other hemispheres or non-US countries much.

Here's the basic requirements:

- .NET Framework 1.1 (available free from the MS Windows Update)
- CSV file for calculations (can export from LBP)

In order for a night calculation to occur, the program needs takeoff and landing date and times, and DEP and ARR airports. It will process landings based on the FARs for night currency (one hour before and after sunrise/sunset) and process night time for FARs based on night time (civil twilight). You can always ammend the data in the program once it's done its thing too.

Essentially, you open the program and then browse to your CSV file. If it's not obvious, the program will ask you for the column in your file that holds the appropriate fields.

You then process the night time with a single click. You will see popups that ask you the time zones of the airports. It only asks once per airport then saves that information. I would like to know if anyone runs into problems with the airport ID. The program uses the available airport info from the US Governement so it may be limited for non-US airports.

You can then save this data as a new CSV. There's no way to import back into LBP without duplicating the entries yet. If this works out, I'll try working with the LBP team for that.

Anyway, feel free to try it out, and post here if you have any questions or problems.



  • Night
    586.2 KB · Views: 230
Last edited:
Hey GNS2005

Thanks for putting this program together, but unfortunately I can confirm that it doesn't work for those of us that have none US airports in our logbook. The program just hangs when I try it with my log. Is there any chance we can add our own airport codes along with lat/long position. This way it could work for none US airports as well.

User updatable interface.

Hi Geir,

Thank you for the input. I will certainly make this the next step in the program and will post a new build that will ask you for the information for airports not contained in the internal database as soon as I can. I will make it so it will pop-up a wizard if it doesn't recognize an airport, or you will be able to do a database text file of your own if you know you have many airports to input.

New Build with better user input capabilities.

Here's a new build with the following changes. Thanks to Geir for bringing up the user input idea. I was able to speed up the code a lot and reorganize due to the changes I made here and it improves it a bunch.
  • User editable XML file stores all user airports as the information is entered. This allows either direct edit of the file, or allows you to use the program's wizard to add your airports as needed. It also speeds up the processing and even allows you to have a file that has all of the airports in your logbook, just for fun.
  • Time zones include military and civilian and even 1/2 zones.
  • If an airport isn't recognized by the internal airport database, the wizard allows you to input lat/lon, time zone data and it's stored in the user file.
  • Progress bar.
The down side of the quicker calculations is the the GUI is less responsive during processing, but you don't have to wait as long for the processes to finish. Please write back with any input. I'm anxious to see how it works for everyone!

Last edited:
Time zones and APDL


I like the program but have a question on the way it is handling time zones.

APDL stores all times in what it calls logbook time. Logbook time is local time in relation to what time zone you have selected in the setup. APDL converts to local or zulu time depending on what is requested. Ths means that a 2 hour flight leaving centeral time and going to Easten stored in logbook time would look like 0600 - 0800. In local time would be 0600 - 0900.

When APDL syncs to LBP it is importing this logbook time. So when you run the night calculation tool it is running off of this 0600 - 0800 info.

Is the night calculation tool taking this into account with the time zone settings or is this generating wrong night times?

Hi gcraft,

Mine only takes the actual time in the CSV file or LBP database file, so whatever is stored in there is what the program uses as local time. It's built to convert based on local time at each airport since that's what my airline gives me for my flight time so there might be a discrepancy if you're times are not in local time on each logbook line.

I convert departure, arrival, and night for each to GMT prior to making the calculations using the user inputted time zone info.

I have found a few bugs in my program and I am in the process of updating it now. One of the major bugs was a checking routine used to catch timezone errors. I've also converted to .NET 2.0. In doing so I ended up removing most of the LBP connectivity, so it's back to a CSV only program. I'll update that as soon as I can though.

If you're interested in the newest Beta build, let me know and I'll upload it here. I hope that helps, and thanks for checking out the program.

Thanks for the quick answer. The problem I am running into is with APDL and the way it stores times. These times are imported into LBP and then used by your Night Calculation Tool.

It is possible to set APDL to store and export times in GMT. This would solve the problem if there was an option to use GMT times in the Night Calculation Tool.

Would you please consider this request as it would be a big help for all APDL/LBP users.

We'll definitely consider this. I think it would be great if all of the pieces of software talked to each other, or even saved information in the same format. As I continue with this program, I'll add APDL support. Thanks for the information and the suggestion!
Thanks gcraft. m4j2t...sorry for the tardy response.

Please feel free to post any problems you might find here. I am going to be posting a newer version of this program sometime at the beginning of the year and I'd like to incorporate any changes at this time, so don't hesitate to tell me what I did wrong.

Thanks again.