Record Track Log

I would like the ability to create a track log of a flight so you could review your track over the ground, altitude, speed. Something that could also be used to create a kml file for Google Earth so one could overlay the flight they just did in MSFS (or xPlane) and review what the flight looked like from a 3d map view. Foreflight has the ability to record a flight (can be set to automatic as you start flying to when you land and stop).