Skip to main content

Convert track coordinates to percentages along a lap

Project description

xy2pct

A tool that pinpoints the percentage along a predetermined track of given coordinates.

Installation

To install the Python package, run:

pip install xy2pct

Workflow

Create track map

  1. use the src/xy2pct/expy folder for generated track files
  2. use generatelaparray.py to spit out a file with x, y, and z coordinates for the track. The data will appear in src/xy2pct/expy/(circuit_short_name).txt.
  3. manually delete extra data points and assign relevant ones to pit lane by moving them under "Pit Lane:"
  4. use parselaparray.py to check work (sample code to also go from file to array)

Use xy2pct

def xy2pct(x, y, z, circuit_short_name) -> [onTrack, percentage]
  1. use the function xy2pct(x, y, z, circuit_short_name) to convert any x, y, and z(optional) to a percentage along the track you specify in circuit_short_name. to find the variable, use the openf1 docs: https://api.openf1.org/v1/meetings?year=2026&country_name=Singapore and replace the country name with the one you want, and then find the name beside circuit_short_name.

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

xy2pct-0.2.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

xy2pct-0.2.1-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file xy2pct-0.2.1.tar.gz.

File metadata

  • Download URL: xy2pct-0.2.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for xy2pct-0.2.1.tar.gz
Algorithm Hash digest
SHA256 056a4d0cd64cd7a8a8f6185847ea8a5c9794faa9a5b3439d39b9a9a5512446d6
MD5 29ff415e49f8a28f141570ddfa37ee88
BLAKE2b-256 a460de4b671df1bb7413ba9e9a77a0d62456fb01325916ad6e3b4ed57f8cbc2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy2pct-0.2.1.tar.gz:

Publisher: python-package.yml on jusaaatin/xy2pct

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy2pct-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: xy2pct-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for xy2pct-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bec69270798e230d39f7bc7e6eaa225db58a229039be9d8ee5bc8b8b19bca32
MD5 06f5349e943ed56d03e00356bda00c38
BLAKE2b-256 5e6d37abab72adc5971a022a982185cb44de3da0d6a4b308684fccdbc9fcd30b

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy2pct-0.2.1-py3-none-any.whl:

Publisher: python-package.yml on jusaaatin/xy2pct

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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