Is there a way to import FlightAware track logs to ForeFlight ?

XSi

Filing Flight Plan
Joined
May 29, 2020
Messages
13
Display Name

Display name:
XSi
I am starting to use ForeFlight's Logbook and one of the options is to attach a track log in the Logbook entry. This is great going forward but how can I bring in old track logs in. FlightAware has the track log of my flight. It can also export this to KML file. Is there a way to import to ForeFlight?
 
Won't help you with this, but if you have FF on an ipad that you bring on the flight with you, you can set FF to automatically record flights. It will save then under track logs and you can make log book entries from them. You can also manually record flights with FF, but I like the auto feature better. One less thing to remember.
 

This, unfortunatelly, will only import shapes etc to show as a map layer. It will not import track log data. Looking at it a little bit more, it looks like ForeFlight can only import track logs from a G1000 exported csv files. So I guess the next step is the searching of a tool that can convert .kml files to G1000 csv files. (or figure out the G1000 csv file format and build a tool on my own :D )
 
This, unfortunatelly, will only import shapes etc to show as a map layer. It will not import track log data. Looking at it a little bit more, it looks like ForeFlight can only import track logs from a G1000 exported csv files. So I guess the next step is the searching of a tool that can convert .kml files to G1000 csv files. (or figure out the G1000 csv file format and build a tool on my own :D )

Did you have any luck with this? I am in a very similar boat.
FlightAware has a perfect record of my flight, but I can't find a great way to get it into ForeFlight.
I tried running it through GPSBabel, but didn't have any luck.
The forum won't let me upload, so I'll drop a sample of the CSV ForeFlight is rejecting here:

Code:
#airframe_info, log_version="1.00", airframe_name="Cessna 182T", unit_software_part_number="", unit_software_version="12.03", system_software_part_number="", system_id="", mode=NORMAL,
#yyyy-mm-dd," hh:mm:ss"," hh:mm"," ident"," degrees"," degrees"," ft Baro"," inch"," ft msl"," deg C"," kt"," kt"," fpm"," deg"," deg"," G"," G"," deg"," deg"," volts"," volts"," amps"," amps"," gals"," gals"," gph"," deg F"," psi"," Hg"," rpm"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," ft wgs"," kt"," enum"," deg"," MHz"," MHz"," MHz"," MHz"," fsd"," fsd"," kt"," deg"," nm"," deg"," deg"," bool"," enum"," enum"," deg"," deg"," fpm"," enum"," mt"," mt"," mt"," mt"," mt"
Lcl Date," Lcl Time"," UTCOfst"," AtvWpt"," Latitude"," Longitude"," AltB"," BaroA"," AltMSL"," OAT"," IAS"," GndSpd"," VSpd"," Pitch"," Roll"," LatAc"," NormAc"," HDG"," TRK"," volt1"," volt2"," amp1"," amp2"," FQtyL"," FQtyR"," E1 FFlow"," E1 OilT"," E1 OilP"," E1 MAP"," E1 RPM"," E1 CHT1"," E1 CHT2"," E1 CHT3"," E1 CHT4"," E1 CHT5"," E1 CHT6"," E1 EGT1"," E1 EGT2"," E1 EGT3"," E1 EGT4"," E1 EGT5"," E1 EGT6"," AltGPS"," TAS"," HSIS"," CRS"," NAV1"," NAV2"," COM1"," COM2"," HCDI"," VCDI"," WndSpd"," WndDr"," WptDst"," WptBrg"," MagVar"," AfcsOn"," RollM"," PitchM"," RollC"," PichC"," VSpdG"," GPSfix"," HAL"," VAL"," HPLwas"," HPLfd"," VPLwas"
2021-04-09,"13:37:42","-06:00",,"38.584850","-92.143350","932","29.68",,,"79",,"0",,,,,"123",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2021-04-09,"13:38:17","-06:00",,"38.576070","-92.131960","1207","29.68",,,"76",,"787",,,,,"173",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
 
will ForeFlight accept a .kml file? if so you can export that from FlightAware.

In flightAware, click on "View Track Log" center near the top
- click on the "Google Earth" image at the top.
- it will give you the option to save as a .kml file
 
In general FF can import .kml files. It is somewhat limited in the elements it understands. That is how my layer for AM radio stations works.

It is not hard to read, parse, and modify .kml files. They are just a particular xml based format.
 
Won't help you with this, but if you have FF on an ipad that you bring on the flight with you, you can set FF to automatically record flights. It will save then under track logs and you can make log book entries from them. You can also manually record flights with FF, but I like the auto feature better. One less thing to remember.

As long as my iPad is in the plane and Foreflight is on, it will record a track log of every flight. It begins when the plane begins to move and ends when the plane comes to a full stop.
 
I know MyFlightbook will import KML flight logs. I don't know all the other ways it's superior to Forelight, but I'm sure they are legion.
 
Last edited:
will ForeFlight accept a .kml file? if so you can export that from FlightAware.

In flightAware, click on "View Track Log" center near the top
- click on the "Google Earth" image at the top.
- it will give you the option to save as a .kml file

While ForeFlight will accept KMLs, it will only import shapes, not paths - and only as custom map layers, not track logs.
What I’m after is to create a track log from the FlightAware data. I was hoping to recreate a G1000 log (which ForeFlight will accept as track logs)…but I haven’t had any luck.
 
While ForeFlight will accept KMLs, it will only import shapes, not paths - and only as custom map layers, not track logs.
What I’m after is to create a track log from the FlightAware data. I was hoping to recreate a G1000 log (which ForeFlight will accept as track logs)…but I haven’t had any luck.
If you've an original G1000 log I can use for an example, I can write some code to convert to it. Looking at the foreflight site, it is only a CSV file, like the example you posted earlier in the thread. Your example is likely missing something in the header or something simple, but difficult to find, that prevents FF from reading the file. I used to write excel VBA code to bring data in/out of Garmin units.
 
If you've an original G1000 log I can use for an example, I can write some code to convert to it. Looking at the foreflight site, it is only a CSV file, like the example you posted earlier in the thread. Your example is likely missing something in the header or something simple, but difficult to find, that prevents FF from reading the file. I used to write excel VBA code to bring data in/out of Garmin units.
That's exactly what I'm lacking, unfortunately. I don't have access to a G1000, so I'm relying on random stuff I find in forums here and there - so who knows how dated it is.
From what I gather, it is CSV, but the fields are fixed-width. I don't know that for sure (no original file), but one of the samples kind of supported the theory.
If anyone has a G1000 that could provide an unadulterated file, it would be much appreciated. I've reached out to a Reddit community (r/flying) as well, but no sample files from there yet either. :(
 
That's exactly what I'm lacking, unfortunately. I don't have access to a G1000, so I'm relying on random stuff I find in forums here and there - so who knows how dated it is.
From what I gather, it is CSV, but the fields are fixed-width. I don't know that for sure (no original file), but one of the samples kind of supported the theory.
If anyone has a G1000 that could provide an unadulterated file, it would be much appreciated. I've reached out to a Reddit community (r/flying) as well, but no sample files from there yet either. :(
I'll look as well for the file format. I've traces I'd like to save as well. If I get something working, I'll send it to you and otherwise make it available to all.
 
Yes it’s running on iOS is indeed one of the things that makes it superior.
Running only on iOS certainly isn't. Myflightbook has iOS and Android apps and will run anywhere you have a web browser. It's also open source and free, with fantastic support. But if you love Foreflight, use it.
 
Foreflight's logging is trash. This might be overkill but I export everything and have my own Tableau dashboard.. you can do great circle routing, actual routes flown, all sorts of cool stuff. If you really want to geek out you can do some really stuff with Python
 
Did you have any luck with this? I am in a very similar boat.
FlightAware has a perfect record of my flight, but I can't find a great way to get it into ForeFlight.
I tried running it through GPSBabel, but didn't have any luck.
The forum won't let me upload, so I'll drunit_software_version="12.03", system_software_part_number="", system_id="", mode=NORMAL,
#yyyy-mm-dd," hh:mm:ss"," hh:mm"," ident"," degrees"," degrees"," ft Baro"," inch"," ft msl"," deg C"," kt"," kt"," fpm"," deg"," deg"," G"," G"," deg"," deg"," volts"," volts"," amps"," amps"," gals"," gals"," gph"," deg F"," psi"," Hg"," rpm"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," ft wgs"," kt"," enum"," deg"," MHz"," MHz"," MHz"," MHz"," fsd"," fsd"," kt"," deg"," nm"," deg"," deg"," bool"," enum"," enum"," deg"," deg"," fpm"," enum"," mt"," mt"," mt"," mt"," mt"
Lcl Date," Lcl Time"," UTCOfst"," AtvWpt"," Latitude"," Longitude"," AltB"," BaroA"," AltMSL"," OAT"," IAS"," GndSpd"," VSpd"," Pitch"," Roll"," LatAc"," NormAc"," HDG"," TRK"," volt1"," volt2"," amp1"," amp2"," FQtyL"," FQtyR"," E1 FFlow"," E1 OilT"," E1 OilP"," E1 MAP"," E1 RPM"," E1 CHT1"," E1 CHT2"," E1 CHT3"," E1 CHT4"," E1 CHT5"," E1 CHT6"," E1 EGT1"," E1 EGT2"," E1 EGT3"," E1 EGT4"," E1 EGT5"," E1 EGT6"," AltGPS"," TAS"," HSIS"," CRS"," NAV1"," NAV2"," COM1"," COM2"," HCDI"," VCDI"," WndS
Did you have any luck with this? I am in a very similar boat.
FlightAware has a perfect record of my flight, but I can't find a great way to get it into ForeFlight.
I tried running it through GPSBabel, but didn't have any luck.
The forum won't let me upload, so I'll drop a sample of the CSV ForeFlight is rejecting here:

Code:
#airframe_info, log_version="1.00", airframe_name="Cessna 182T", unit_software_part_number="", unit_software_version="12.03", system_software_part_number="", system_id="", mode=NORMAL,
#yyyy-mm-dd," hh:mm:ss"," hh:mm"," ident"," degrees"," degrees"," ft Baro"," inch"," ft msl"," deg C"," kt"," kt"," fpm"," deg"," deg"," G"," G"," deg"," deg"," volts"," volts"," amps"," amps"," gals"," gals"," gph"," deg F"," psi"," Hg"," rpm"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," deg F"," ft wgs"," kt"," enum"," deg"," MHz"," MHz"," MHz"," MHz"," fsd"," fsd"," kt"," deg"," nm"," deg"," deg"," bool"," enum"," enum"," deg"," deg"," fpm"," enum"," mt"," mt"," mt"," mt"," mt"
Lcl Date," Lcl Time"," UTCOfst"," AtvWpt"," Latitude"," Longitude"," AltB"," BaroA"," AltMSL"," OAT"," IAS"," GndSpd"," VSpd"," Pitch"," Roll"," LatAc"," NormAc"," HDG"," TRK"," volt1"," volt2"," amp1"," amp2"," FQtyL"," FQtyR"," E1 FFlow"," E1 OilT"," E1 OilP"," E1 MAP"," E1 RPM"," E1 CHT1"," E1 CHT2"," E1 CHT3"," E1 CHT4"," E1 CHT5"," E1 CHT6"," E1 EGT1"," E1 EGT2"," E1 EGT3"," E1 EGT4"," E1 EGT5"," E1 EGT6"," AltGPS"," TAS"," HSIS"," CRS"," NAV1"," NAV2"," COM1"," COM2"," HCDI"," VCDI"," WndSpd"," WndDr"," WptDst"," WptBrg"," MagVar"," AfcsOn"," RollM"," PitchM"," RollC"," PichC"," VSpdG"," GPSfix"," HAL"," VAL"," HPLwas"," HPLfd"," VPLwas"
2021-04-09,"13:37:42","-06:00",,"38.584850","-92.143350","932","29.68",,,"79",,"0",,,,,"123",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2021-04-09,"13:38:17","-06:00",,"38.576070","-92.131960","1207","29.68",,,"76",,"787",,,,,"173",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,


You can import track logs in the form of KMZ- download them from flight aware into Google earth, then from Google earth to FF.
 
I didn't see any newer discussion on this topic, and it didn't seem like there was any definite conclusion for how to import FlightAware tracklogs into ForeFlight.

I was interested in doing this myself, so I whipped up a quick python script that converts from FlightAware's KLM files to a minimal G1000 CSV file that ForeFlight will import.

I haven't posted enough to include links yet, so you'll have to do some googling to find the script (maybe someone else can follow up with a direct link). It's on my github page, user name aleiby, project name klm2g1000.

One thing I noticed was that ForeFlight appears to cut off data at the end - or maybe FlightAware isn't exporting the entire track, unclear. FlightAware clearly has more data than they export to the KLM, which is unfortunate. We could probably pull data directly from flightaware.com itself instead of importing KMLs, but that's more effort than I wanted to spend on this right now.

I welcome any improvements folks want to submit. I only got things far enough along for my own personal needs, but figured I'd share in case it would be useful to anyone else.
 
Last edited:
I didn't see any newer discussion on this topic, and it didn't seem like there was any definite conclusion for how to import FlightAware tracklogs into ForeFlight.
Can't help with ForeFlight, but here's what you can do with MyFlightbook: get the KML or GPX file off of FlightAware (or whatever other source you have). If you're using the website, you can attach it to a flight and optionally press "AutoFill" to detect things like landings, airports, night flight, and so forth. If you're using the iOS or Android app, you can "send" the file to MyFlightbook and it will prompt you to create a new flight based on that data (effectively pressing "autofill" for you). As long as the data has timestamped coordinates (ideally, but not necessarily, including speed), it should be able to do a good job of filling in the details of the flight.
 
I didn't see any newer discussion on this topic, and it didn't seem like there was any definite conclusion for how to import FlightAware tracklogs into ForeFlight.

I was interested in doing this myself, so I whipped up a quick python script that converts from FlightAware's KLM files to a minimal G1000 CSV file that ForeFlight will import.

I haven't posted enough to include links yet, so you'll have to do some googling to find the script (maybe someone else can follow up with a direct link). It's on my github page, user name aleiby, project name klm2g1000.

One thing I noticed was that ForeFlight appears to cut off data at the end - or maybe FlightAware isn't exporting the entire track, unclear. FlightAware clearly has more data than they export to the KLM, which is unfortunate. We could probably pull data directly from flightaware.com itself instead of importing KMLs, but that's more effort than I wanted to spend on this right now.

I welcome any improvements folks want to submit. I only got things far enough along for my own personal needs, but figured I'd share in case it would be useful to anyone else.

Sorry to revive an older thread but I feel like I’m hitting my head against a brick wall trying to run this Python script. I changed the directory in the .py file but when I try to run it I get a syntax error at the srcDIR line. Anyone get this to work on Windows?
 
Sorry to revive an older thread but I feel like I’m hitting my head against a brick wall trying to run this Python script. I changed the directory in the .py file but when I try to run it I get a syntax error at the srcDIR line. Anyone get this to work on Windows?
I'm a student pilot who is a huge data nerd and a programmer, and I see getting the track data from Flightaware in Foreflight for my logs as a huge win. Turns out, the "raw" track data is in the FlightAware page... you just have to coerce it a bit. I've written and tested my code to covert the track information into the G1000 format Foreflight expects. Thank you, @flyingpreacher, for the code showing the format, it was a huge time savings for me.

Right now I have the code running under my personal API and it will list the tracks available for a tail number and retrieve/convert a track for download. The problem there is FlightAware will get grumpy if they see a bunch of strange activity from one IP. So my thought is to offer the code as a conversion service. You'd have to save the flight page (NOT the track log page), then upload it for conversion. I think that's a lot easier than writing a UI and packaging it up for people to run easily. I'm also terrible at UIs, sooo....

Thoughts?
 

Attachments

  • 4FDB828C-9052-49E7-86BC-840FA1CCEA50_1_102_o.jpeg
    4FDB828C-9052-49E7-86BC-840FA1CCEA50_1_102_o.jpeg
    497.8 KB · Views: 8
Not sure if this is directly applicable to this thread, but ForeFlight does now allow for multiple track logs to be attributed to the same flight. This can be useful if ForeFlight breaks up a flight into multiple logs, but FlightAware sees it as a single flight. I’ve run into that issue and that’s one reason I was interested in this particular thread to begin with.
 
Not sure if this is directly applicable to this thread, but ForeFlight does now allow for multiple track logs to be attributed to the same flight. This can be useful if ForeFlight breaks up a flight into multiple logs, but FlightAware sees it as a single flight. I’ve run into that issue and that’s one reason I was interested in this particular thread to begin with.
I think I'm a little confused. Are you saying that Foreflight breaks a single flight into multiple tracks, that FlightAware does this, or both? If it's FlightAware, joining the tracks is trivial, but I'd probably add some kind of check to be sure they're somewhat close together, chronologically and positionally. But like you said, Foreflight lets you add multiple tracks to a log entry.
 
I think I'm a little confused. Are you saying that Foreflight breaks a single flight into multiple tracks, that FlightAware does this, or both? If it's FlightAware, joining the tracks is trivial, but I'd probably add some kind of check to be sure they're somewhat close together, chronologically and positionally. But like you said, Foreflight lets you add multiple tracks to a log entry.
Sorry, that was a bit confusing. Let’s say I fly KIPT-KROC and land/taxi for departure, but I’m on the ground long enough that FF says that it is closing the track log. Then I take back off and go to KSYR. I want KIPT-KROC-KSYR on the track log for that flight. FlightAware may see all of that as one flight even though FF broke it into two.

This is one of the reasons I was interested in importing a FlightAware track log. However, FF recently added the ability to add multiple track logs to the same logbook entry, eliminating that specific need.

The benefit of the method described in this thread still lies in documenting a flight where you didn’t have a ForeFlight track log to begin with. Maybe you didn’t take your iPad along or whatever, but you still want to include a track log with your logbook entry. This method allows you to still do that.

(Not sure if I clarified or made the waters muddier! Lol)
 
Sorry, that was a bit confusing. Let’s say I fly KIPT-KROC and land/taxi for departure, but I’m on the ground long enough that FF says that it is closing the track log. Then I take back off and go to KSYR. I want KIPT-KROC-KSYR on the track log for that flight. FlightAware may see all of that as one flight even though FF broke it into two.

This is one of the reasons I was interested in importing a FlightAware track log. However, FF recently added the ability to add multiple track logs to the same logbook entry, eliminating that specific need.

The benefit of the method described in this thread still lies in documenting a flight where you didn’t have a ForeFlight track log to begin with. Maybe you didn’t take your iPad along or whatever, but you still want to include a track log with your logbook entry. This method allows you to still do that.

(Not sure if I clarified or made the waters muddier! Lol)
Porque no los dos? lol

I'll see what I can come up with as far as an interface goes over the weekend. It's safe to say that it won't look pretty, but it will work for converting FlightAware tracks to G1000 CSV for Foreflight. I might also look at the FlightAware API to see if that has more track information since what I'm scraping now is: position, altitude, groundspeed, "type" (empty from what I can tell), and "isolated" (no idea what that is, but false seems to be good). I'd love to have things like heading and vertical speed, which I know are included in the ADS-B messages. Track (deg) can be calculated between points easily enough.
 
Last edited:
I didn't see any newer discussion on this topic, and it didn't seem like there was any definite conclusion for how to import FlightAware tracklogs into ForeFlight.

I was interested in doing this myself, so I whipped up a quick python script that converts from FlightAware's KLM files to a minimal G1000 CSV file that ForeFlight will import.

I haven't posted enough to include links yet, so you'll have to do some googling to find the script (maybe someone else can follow up with a direct link). It's on my github page, user name aleiby, project name klm2g1000.

One thing I noticed was that ForeFlight appears to cut off data at the end - or maybe FlightAware isn't exporting the entire track, unclear. FlightAware clearly has more data than they export to the KLM, which is unfortunate. We could probably pull data directly from flightaware.com itself instead of importing KMLs, but that's more effort than I wanted to spend on this right now.

I welcome any improvements folks want to submit. I only got things far enough along for my own personal needs, but figured I'd share in case it would be useful to anyone else.
I want to thank Aaron Leiby for writing the Python script to do the conversion of the FlightAware kml tracklog to the importable G1000.CSV file suitable for ForeFlight. I can confirm it works!

Aaron, if you see this, I would like to know if the conversion code tools you used are specific to the Flightaware KML file? Or can it take any basic GPS tracklog (say in GPX format) converted to a KML file and have it do the conversion? I may run some test runs with you code to find out myself. In addition to GPSBabel opensource code, there's a convenient web-based tool I use all the time to convert between GPS files and KML called "GPSVisualizer.com". I have GPS and KML files of nearly all my flight logs dating back to 1999. I'm looking forward to being able creating foreflight logbook entries for all my flights and include the tracklogs viewable in Foreflight. Making it as automated as possible is helpful though. ;-)
 
I only ever tested with the KLM exported from FlightAware, so if there are differences with how the KLM is exported by other sites, it might require some tweaks to handle, but that should be pretty straightforward to accommodate. I’d start by just opening two KLMs side by side and see if you spot any obvious differences, like date formatting or different units.
 
Thanks Aaron, I'll let you know how things turn out when I establish which KML file format works best and mess around with the code to produce G1000 files. It also occurred to me that my G3X Touch displays automatically record log files for tracks to my SD cards. I'm going to investigate whether those can be converted as well for some missing flights where my Foreflight didn't record, and I have no FlightAware data.
 
Back
Top