Translating ForeFlight logbook to MyFlightBook or Garmin Pilot logbooks

mcdewey

Line Up and Wait
PoA Supporter
Joined
Jan 14, 2013
Messages
660
Location
Annapolis
Display Name
Mike
Home Airfield
W29
Hi Folks,

I've been evaluating MyFlightBook (MFB) and Garmin Pilot (GP) logbooks. I have 772 flights in my ForeFlight (FF) logbook so obviously I'm not moving them by hand. I've been using Gemini LLM (AI) to help me come up with directions to translate logbook formats from FF into a form that MFB or GP will ingest without error. Obviously, there are some things that don't convert or map and some screwy formats on both sides, but I've gotten most of my FF logbook converted. It's also biased towards the type of flying I do, which is GA pilot (PPL, Instrument, CPL) for recreation

The biggest magic happens once I've got the translate instructions cleaned up how I want them. I feed them into Gemini and ask it to create a Python program to do the conversion. Then I run the program, then import the resulting CSV into my destination logbook. I'd rather not put up the Python program here, because I would be leery of running someone else's code on my computer, but using Gemini, ChatGPT, or one of the other LLMs, you should be able to create a program (in any language you want!!) and run it yourself. This is totally software developer nerd territory.

Here are the LLM prompts I use and attach the Translator CSV file to the prompt:
​
"Here are some translator instructions in a CSV file to convert a ForeFlight CSV logbook (ff_log.csv) to a MyFlightBook CSV logbook file (mfb_log.csv). Please create a Python program to do the mappings and transformations. Do not give me all of your thinking process. Just provide the Python program and a short summary."​
​
"Here are some translator instructions in a CSV file to convert a ForeFlight CSV logbook (ff_log.csv) to a Garmin Pilot CSV logbook file (gp_log.csv). Please create a Python program to do the mappings and transformations. Do not give me all of your thinking process. Just provide the Python program and a short summary."​

Note that you have to edit the FF CSV export file and remove everything above the flights header. I don't see how to import all your aircraft into GP and MFB figures it out for you from just your flight log.

So as a help to others doing the same thing, here are my translate instructions in CSV form (attached with a txt extension for forum software). So the steps are:
1. Change the extension to csv.
2. Open the translation file with pretty much any spreadsheet program to make it more readable. (Or use a text editor if you enjoy reading raw CSV)
3. Review it, and modify it if necessary,
4. Save as a CSV file
5. Feed it into your LLM using the prompts above. You might have to modify the prompt based on your LLM's peculiarities.
6. Copy the program into a text editor (or IDE) and save with the appropriate extension for your language (.py for Python, etc.)
7. Run using the command line or inside your developer environment to create a CSV file in the proper format.
8. Using the MFB or GP import web pages, import the new CSV file.

If anyone wants to create a website that contains the translator program that makes this much easier, feel free.

Hope this isn't too complicated, but it's easier and less error prone than trying to edit the export log files by hand.
 

Attachments

It seems like you're doing a whole lot of unnecessary work. MyFlightBook has a FAQ on importing from Foreflight (and other EFBs), and it claims "minimal manipulation" of the data is required.

When I originally started using MFB, I imported from my own Excel spreadsheet, and it did indeed take "minimal manipulation". There was no need to use AI (which didn't exist yet anyway) or write Python scripts. That all seems like overkill for something that logbooks try to build in. After all, they want to make it easy for you to switch.
 
It seems like you're doing a whole lot of unnecessary work. MyFlightBook has a FAQ on importing from Foreflight (and other EFBs), and it claims "minimal manipulation" of the data is required.

When I originally started using MFB, I imported from my own Excel spreadsheet, and it did indeed take "minimal manipulation". There was no need to use AI (which didn't exist yet anyway) or write Python scripts. That all seems like overkill for something that logbooks try to build in. After all, they want to make it easy for you to switch.
My experience was different in some ways but with a similar result. I had been running my own eLog since DOS when I moved to MFB. What was different is that it was very early in MFB’s life and there were no EFB logbooks. Heck, there were no EFBs. ForeFlight Mobile didn’t exist yet and its logbook didn’t appear until 10 years later. So there was no template. And I was working from my own design, not a published known. Eric helped with a few suggestions. No major problem.

With all the guidance now, I can’t imagine needing a python scriot to go from one known, established format to another.

OTOH, a question I saw elsewhere got me curious about using ChatGPT to convert a paper logbook. Results were interesting and funky, and converting handwriting definitely a huge issue, but I think with a couple of go-arounds, it might even be workable to at least get an editable dataset.
 
It seems like you're doing a whole lot of unnecessary work. MyFlightBook has a FAQ on importing from Foreflight (and other EFBs), and it claims "minimal manipulation" of the data is required.

When I originally started using MFB, I imported from my own Excel spreadsheet, and it did indeed take "minimal manipulation". There was no need to use AI (which didn't exist yet anyway) or write Python scripts. That all seems like overkill for something that logbooks try to build in. After all, they want to make it easy for you to switch.
I tried importing directly into GP or MFB. Gave all sorts of errors.
 
I tried importing directly into GP or MFB. Gave all sorts of errors.

@EricBe offers a guide on how to do it. There may be a little bit of massaging of the data, but it should be pretty minor. I remember having to adjust some of my self-named column headings but not much else.

Did you follow the guide he has on the page?

 
Hi Folks,

I've been evaluating MyFlightBook (MFB) and Garmin Pilot (GP) logbooks. I have 772 flights in my ForeFlight (FF) logbook so obviously I'm not moving them by hand. I've been using Gemini LLM (AI) to help me come up with directions to translate logbook formats from FF into a form that MFB or GP will ingest without error. Obviously, there are some things that don't convert or map and some screwy formats on both sides, but I've gotten most of my FF logbook converted. It's also biased towards the type of flying I do, which is GA pilot (PPL, Instrument, CPL) for recreation

The biggest magic happens once I've got the translate instructions cleaned up how I want them. I feed them into Gemini and ask it to create a Python program to do the conversion. Then I run the program, then import the resulting CSV into my destination logbook. I'd rather not put up the Python program here, because I would be leery of running someone else's code on my computer, but using Gemini, ChatGPT, or one of the other LLMs, you should be able to create a program (in any language you want!!) and run it yourself. This is totally software developer nerd territory.

Here are the LLM prompts I use and attach the Translator CSV file to the prompt:
​
"Here are some translator instructions in a CSV file to convert a ForeFlight CSV logbook (ff_log.csv) to a MyFlightBook CSV logbook file (mfb_log.csv). Please create a Python program to do the mappings and transformations. Do not give me all of your thinking process. Just provide the Python program and a short summary."​
​
"Here are some translator instructions in a CSV file to convert a ForeFlight CSV logbook (ff_log.csv) to a Garmin Pilot CSV logbook file (gp_log.csv). Please create a Python program to do the mappings and transformations. Do not give me all of your thinking process. Just provide the Python program and a short summary."​
...
I think you did a lot more work than necessary. MyFlightbook knows how to read a FF export as-is. The issue isn't in the format, it's in the data mapping. Specifically, the main issues are:
a) If you have custom columns, you do need to map them if you want to preserve the data. FF lets you define an arbitrary column and happily just hosts it without any understanding of that column. I've found that I've yet to encounter a column that is truly unique to a single pilot, and often those columns carry semantics with them so I want to know about those semantics. (Small example: the fact that if you track how much money you spent on fuel, that should be summed in totals, but if you track the per-gallon price, that shouldn't be summed). The list of (over 800!) columns is at https://myflightbook.com/logbook/mvc/pub/ImportTable.
b) I treat sims differently than many other logbooks, and so those often need to be entered manually or mapped. I do this because all aircraft (and sims!) on MyFlightbook are shared amongst pilots and since reference to an aircraft is generally made by tail number, it could create a cacophony of colliding names if I let everyone name their sims. But also, I need to know how to treat the sim entry for purposes of things like instrument currency or progress towards ratings. So for sims, you may often need to add it to MyFlightbook manually, make note of the SIMxxxx tail number that MyFlightbook assigns the sim, and then edit the foreflight document to simply use that SIMxxxx tail. AI might be able to help with that.

But other than those two issues, it should be pretty seamless as-is.
 
Well, I’ll try again. I should have asked Eric to begin with, but I wanted to play with Gemini too, so didn’t think if I should. :) I’ll log any errors I get and ask this time.
 
I treat sims differently than many other logbooks,
BTW, I recently changed my mind how to log sims. I had been the SIM [aircraft type] designators but changed them all to the SIM [SIM type] designators. It's just cleaner because of they way I switch off things like high performance or type of panel. So instead of 3 or 4 aircraft, there's only one.
 
Hey @EricBe, I've got a side question. I'm the developer of a new logbook and I've been looking at the data export from MyFlightBook for importing. Do you have a recommendation on the best way to do so?

With the CSV export, there's 50 or so standard fields that are always exported, but when you log an additional field, it gets appended to the end.
 
Hey @EricBe, I've got a side question. I'm the developer of a new logbook and I've been looking at the data export from MyFlightBook for importing. Do you have a recommendation on the best way to do so?

With the CSV export, there's 50 or so standard fields that are always exported, but when you log an additional field, it gets appended to the end.
Correct - there's a "core" set of fields that make up the initial set of columns in the CSV (padded out with a number of human-fields, like some HH:MM fields and the coalesced properties display, and things like Turbine/Complex/Tailwheel etc. that are generated based on the aircraft), and some internal columns (flight ID, Aircraft ID) which reference internal database IDs for the purpose of supporting round-trip bulk edit. But then after those columns are the set of properties that you've used. Over 800 possibilities for those...
 
Correct - there's a "core" set of fields that make up the initial set of columns in the CSV (padded out with a number of human-fields, like some HH:MM fields and the coalesced properties display, and things like Turbine/Complex/Tailwheel etc. that are generated based on the aircraft), and some internal columns (flight ID, Aircraft ID) which reference internal database IDs for the purpose of supporting round-trip bulk edit. But then after those columns are the set of properties that you've used. Over 800 possibilities for those...

Thanks for the fast response!

The over 800 possibilities are all of the property options right? And there's no way to create custom fields is there?
 
The over 800 possibilities are all of the property options right? And there's no way to create custom fields is there?
correct. No way to create custom fields because, as above, (a) I have yet to find a pilot with a requirement/scenario that is truly unique to them, and (b) it's important to get not just the data type of the field (integer, decimal, date, text, true/false, etc.) right but also the semantics. E.g., if it's decimal, is it a time (hours?) or a quantity (oil added)? Time can be formatted as decimal or hh:mm, but quantity doesn't. Is it summed in totals (amount paid for a flight) or not (price per gallon of fuel)? And so forth.

It takes quite literally under a minute to add a property to the system; the "slow" part is making sure it isn't redundant with existing properties and making sure I get the semantics correct.
 
Back
Top