Open-MSS / MSUI-Plugins

We use this to collect wishes and implementations of plugins of msui
Apache License 2.0
0 stars 0 forks source link

Import of DLR OPS files #1

Open dhgkunkel opened 1 year ago

dhgkunkel commented 1 year ago

For PHILEAS the DLR tool for flight preparation can export the flight path as submitted to ATC as a kml and csv file. It would be beneficial if one of these files could be imported into MSS again to further work on the flight plan. The csv file is attached directly, the kml as zip. Maybe someone here is faster than I am with writing a plugin. Thanks, Daniel

EDMO - EDMO - 20230725 - 0915 [DL4] - DADLR.csv EDMO - EDMO - 20230725 - 0915 [DL4] - DADLR_kml.zip

ReimarBauer commented 1 year ago

the coodinates look like "48°4'52,910""N 11°16'59,040""E"

Could be the export configured to save these as numerical value?

dhgkunkel commented 1 year ago

I asked. Unfortunately, this is currently not possible.

ReimarBauer commented 1 year ago

Ok and the decimal comma can that become US format or can we be sure it never becomes a dot?

dhgkunkel commented 1 year ago

I think we could be sure that it never becomes a dot. However, maybe it is easier to work with the kml file. In the first command in the kml file, all waypoints are included as comma separated triplets (longitude, latitude, height - although the height seems to be useless for us) and the waypoints are space separated. That might be easier to digest than the obscure coordinates in the csv file.

ReimarBauer commented 1 year ago

That needs to become verified https://chat.openai.com/share/c20f2fdf-69e8-43c0-abbf-edeed81a6a4e

ReimarBauer commented 1 year ago

@joernu76 or @matrss or @jgrooss have you time to implement that?

If not I can do probably in the next days.

joernu76 commented 1 year ago

Where is the altitude in the csv file? The KML file has something in a strange unit, but I am not sure about the altitude in there, either. Reading in either file format isn't problematic, if we can identify the altitude in there.

ReimarBauer commented 1 year ago

@dhgkunkel please provide informations about the altitude in the csv/kml file.

ReimarBauer commented 1 year ago

Docs: https://mss.readthedocs.io/en/stable/plugins.html#msuiplugins

joernu76 commented 1 year ago

What about this? dlrkml.py.zip I removed the intersections and the tagging "way point" indication to unclutter it a bit.

joernu76 commented 1 year ago

Seems reasonable and flight levels look correct for todays flight.

joernu76 commented 1 year ago

dlrkml.py.zip Minor update.

ReimarBauer commented 1 year ago

I think we could provide a repository for msui_plugins to collect these. Adding those to MSS would result usually in a minor release based on semantic versioning https://semver.org/lang/de/ I would prefer to keep them seperated.

Good idea?

dhgkunkel commented 1 year ago

dlrkml.py.zip Minor update.

Works like a charm! Thanks!

ReimarBauer commented 1 year ago

Any objections against creating a repository for msui plugins?

joernu76 commented 1 year ago

On windows, the utf-8 encoding does not work with xml-parsing. Switching to "latin1" seems to have fixed the problem.

ReimarBauer commented 1 year ago

Since if I should guess over more than 5 years ago Windows got completly utf-8 aware

https://learn.microsoft.com/de-de/windows/apps/design/globalizing/use-utf8-code-page

recently python3 was added to excel. This would be impossible without utf-8

joernu76 commented 1 year ago

Both Wolfgang and Sören had a crash on Windows with xml not being able to parse the file. With latin1 decoding, it works. I haven't looked into why the xml decoding crashes, could be other errors on our side, but with latin1, it works like a charm on Sörens Windows computer.

ReimarBauer commented 1 year ago

We maybe can use sys.getdefaultencoding() for decoding