Skip to main content

Formula Data Processing Library

The python windarab loader

Unit Tests Coverage Report

Formula data processing library or fdplib for short is a library for accessing the custom text file format exported by Windarab by Bosch Motorsports

Installation

FDPLib requires tqdm (used as status bar for loading large data files) and Numpy (used to return data in numpy arrays)

To install FDPLib use pip:

python3 -m pip install fdplib

Usage

Common Usage

In order to use the main module of this library, import the fdplib module in your python code

import fdplib

A DarabData object can be created by passing the textfile name to the constructor

import fdplib.darab as darab
data = darab.DarabData("<FILENAME>.txt")

With this object, data can be easily accessed using the following methods. First, to get all of the variables in the dataset do data.list_vars()

The main method that you will use to interact with the data is data.get_var("<VARIABLE_NAME>") This method returns a list of all the datapoints associated with the variable. Likewise data.get_var_np("<VARIABLE_NAME>") returns a numpy array of the data. There is an optional boolean parameter called timeseries for both of the previously mentioned methods. If set to True this instead returns the data and the time values associated with it as a 2D array, much in the way matlab does.

More Advanced Usage

fdplib also has a feature rich class Track which can be used to analyze and breakdown lap data from the vehicle. To access this class do:

import fdplib.track_tools as tt
track = tt.Track("<FILENAME>.txt")

Using this class the following methods are available:

def plot_track_heatmap(self, t_bound: tuple = None, direct_arrow: bool = None,
                           heat_source: np.array = None) -> None:
        """plot a heatmap of speed from gps data in matplotlib"""
def coords_from_gps(self) -> np.array:
    """converts longitude and latitude data to x and y displacements
       coordinates from the first location coordinate"""
def coords_from_acc(self, ret_yaw: bool = False) -> np.array:
    """calculates the vehicles path from acceleration data provided by the IMU.
       If ret_yaw is true also return the corresponding yaw data."""
def plot_coords(self, coords: np.array) -> None:
    """plots x and y displacement coordinates"""
def radius_from_gps_coords(self, coords: np.array) -> np.array:
    """Calculates the radius of the current turn that the vehicle is in from gps data.
       This is done using a 3 points on a circle calculation and iterates through all the data passed"""
def get_lap_bounds(self, lap_num: int) -> np.array:
    """Calculate the indexs in the data corresponding to the (start,end) of
       the requested lap given by lap_num."""
def simulate(self) -> None: # pragma: no cover
    """Simulate lap data using pygame"""

Examples

example nmot data

Metadata

Release files for fdplib 2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fdplib 2.7
File Size Uploaded
fdplib-2.7.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fdplib 2.7
File Interpreter ABI Platform
fdplib-2.7-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / fdplib-2.7.tar.gz

Download URL fdplib-2.7.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
99c2386c6124f61b833f73c3ab65073922115460894983a00b8d76c9e638b86a
BLAKE2b-256 checksum
How to use checksums
fbc6e8e5a483f83758b743f98e08964624d1700011b54c4095367e8b590e4759
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / fdplib-2.7-py3-none-any.whl

Download URL fdplib-2.7-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b230ce046405c20e2ff6a08aae326ffd7156b8fdefa710f5dc128e56501d664
BLAKE2b-256 checksum
How to use checksums
12ff0c202a2daae67d1a61af994f2527e2a62eae8b3caa4caa901aa9a48e1cde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

2.7 This release

2 release files

2.5

2 release files

2.0

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page