Replies: 1 comment
-
|
Hi Carl,
I'm not sure what you're asking me. I assume you're looking at
the ICAO-ATS-and-OLDI-Message-Parser (
https://github.com/pventon/ICAO-ATS-and-OLDI-Message-Parser). This page
provides instructions on usage. It returns a class with methods to access
the fields. Once you have the class with the various fields it would be
easy to process these as you wish.
Sorry I cannot be of more help at the moment.
Peter
…On Fri, 19 Sept 2025 at 03:47, Carl-Erik Kopseng ***@***.***> wrote:
Hi, Peter.
I was thinking we could use this, but I am not totally sure I understand
how I could use this for a typical use case. I was browsing the fine
Doxygen docs, but the kind of generic approach with regards to "get second
field", "get third field", etc. threw me a bit off. I was not sure how to
use this for a practical purpose, so I ended up just writing a simple
parser for my own needs a la this:
def parse_flight_plan(msg) -> FlightPlan:
""" Example flight plan as ICAO OLDI message (FPL-DEP199-IS -01DH8B/M-SDFGHIRXWY/S -ENTO1200 -N0200F220 DCT BAMIX DCT LULIL DCT GIGNI DCT VEVOD -ENVA0145 -PBN/B2B3B4D2D3S2 REG/AA0008 CODE/000010) """
fields = [field.strip() for field in (msg.split("-"))]
return FlightPlan(
acid=fields[1],
type_of_flight=fields[2][1],
flight_rules=fields[2][0],
aircraft_type=fields[3].split("/")[0],
wake_turbulence_category=fields[3].split("/")[1],
nca_equipment=fields[4].split("/")[0],
ssr_equipment=fields[4].split("/")[1],
adep=fields[5][0:4],
eobt=fields[5][4:],
route=fields[6],
ades=fields[7][0:4],
etot=fields[7][4:],
other_information=fields[8][:-1],
)
How would something like this look using your library? I am not asking for
full code, just a hint as to how this would be used to achieve something
similar.
—
Reply to this email directly, view it on GitHub
<#3>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3MPQUFEJ3LQTF5RHJSVJUD3TOYKNAVCNFSM6AAAAACG6D7AR2VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYHEYTQOJUG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, Peter.
I was thinking we could use this, but I am not totally sure I understand how I could use this for a typical use case. I was browsing the fine Doxygen docs, but the kind of generic approach with regards to "get second field", "get third field", etc. threw me a bit off. I was not sure how to use this for a practical purpose, so I ended up just writing a simple parser for my own needs a la this:
How would something like this look using your library? I am not asking for full code, just a hint as to how the library would be used to achieve something similar.
Beta Was this translation helpful? Give feedback.
All reactions