till213 / SkyDolly

Sky Dolly connects with Flight Simulator 2020 and records the flight path and basic instruments for replay.
MIT License
81 stars 10 forks source link

Imported kml - wrong time of day #183

Open expataviator opened 4 days ago

expataviator commented 4 days ago

I imported a kml from a real flight I made in Foreflight but the time of day is wrong. This was a daytime flight but it replays at night.

If I change the time in the sim, then play it changes back to night.

Is there a way to adjust the time in my SkyDolly logbook?

till213 commented 2 days ago

First off, KML is not a particular suitable format to exchange timestamped GPS data: this is because it has been invented mostly for data visualisation, and less so for reliable data exchange.

For instance there are several ways how to represent a line segment, let alone a whole line path. And line paths do not have (necessarily) timestamps either - unless it is an "animation path". But then again the absolute time of day may or may be embedded as well, in the "document description" element, or elsewhere in some comment (or other KML field).

That's why you need to choose the "KML flavour" in Sky Dolly (e.g. flightradar24 or FlightAware etc.), in order for Sky Dolly to know how to extract timestamp / date & time information.

There is also a "generic KML track data" KML import flavour, but I think there I do not even extract the time of day (only the timestamps). I would have to check how the time of day is calculated in such a case: could be that it is indeed simply set to 00.00 (that is, midnight).

-> Could you please attach a sample KML file? You might have to add it to a ZIP archive in order to be able to attach it to a comment here on github.com (ZIP files should work: raw KML / KMZ files probably not).

As for your question: "time synchronisation" is indeed a new feature since Sky Dolly v0.18 and has been announced in several places, including the "startup dialog" that appears three times for each new release (if you have started with Sky Dolly v0.19 for the first time you might not have seen the announcement).

I received this question several times by now, so I am thinking to change the default to "no time sync", because yes, you can disable time synchronisation (and set the time manually in MSFS, as before).

Refer to this answer here:

https://github.com/till213/SkyDolly/issues/127#issuecomment-2408450312

Or also the CHANGELOG here: https://github.com/till213/SkyDolly/blob/main/CHANGELOG.md#0180

Again, I am happy to check with your specific KML file how (if) the absolute date of time (start date) can be extracted at all (it should work with flightaware and flightradar24 generated KML files: both have absolute start date / times embedded).

The preferred format to exchange timestamped GPS data is GPX however - in case your app supports that export format.

I will keep this issue open for now, until I can have a look at your specific KML file. I will also have a look at the current code how it extracts the start date / time for "generic KML files" (if at all) and how this could be improved if the date / time is indeed missing.

Thanks for reporting!