Skip to main content

One Letter Aerobatic Notation Parser

Project description

PyOlan

This WIP package contains a OLAN (One Letter Aerobatic Notation, https://openaero.net/) parser written in Python. The OLAN string is interpreted as a set of elements (loop, line, stallturn, spin etc). This is currently used by FCScore (https://www.flightcoach.org/fcscore/) to generate sequence definitions for automatic scoring.

Installation

    pip install -e .

Read the next figure from an olan string:

    from pyolan.figure_parser import OlanFig

    ostr = "/d'1 5% 2a,f (-3,6) 4h4^> p(2)...' dq"
    olan_array = ostr.split(" ")
    ofig, olan_array = OlanFig.take(olan_array)

parse an entire olan sequence, join the templates into one and plot:

    from flightdata import State
    from pyolan.parser import parse_olan

    olans: list[ParsedOlanFig] = parse_olan(
        "/d'1 5% 2a,f (-3,6) 4h4^> p(2)...' dq 4% 2b.''1.''+``` (-13,0) 3% ~2g~ (2,0) 3% iv```6s.....'' 22y````1.. (-3,0) 8% `24'zt`8''",
    )

    template = State.stack({fig.definition.info.short_name: fig.template for fig in olans}, "manoeuvre")

    template.plotlabels("manoeuvre").show()

TODO:

  • Modify so it respects the correct olan figure directions (prefers turnarounds when there is ambiguity)
  • Consider closer links with open-aero. Would it be better to read .seq files?
  • Add K factor calculation
  • Think about positioning the generated templates so they fit in the box better (probably better handled in the FlightAnalysis submodule).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyolan-0.1.0.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyolan-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file pyolan-0.1.0.tar.gz.

File metadata

  • Download URL: pyolan-0.1.0.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pyolan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e69a2cf91485b4c20be004080cd9c80913860c28c2ce9fc863bf6535b3e53f75
MD5 8b6fd828de0c359b9611c8025d275119
BLAKE2b-256 031f60b15e150270499382b49cad9c9c60a5fa6e74fc4bedb78110b732950b7f

See more details on using hashes here.

File details

Details for the file pyolan-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyolan-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pyolan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c080b161c0109c3fbee72c3fae3a0a6775651f160f03c34e96a4d54ea3f995c6
MD5 36b473e6b1d9c6f1b821b5816a632007
BLAKE2b-256 d10dd29c307e891bbb309de16d0a6114b4d826d40604f561002b01eaa7097f4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page