StuartLittlefair / PyTindeq

32 stars 10 forks source link

Python scripts to allow custom usage of the Tindeq Progressor from iOS devices and laptops.

The Tindeq Progressor has a fairly simple API, which allows for the creation of custom scripts and tools. In this repository I've provided some custom scripts to perform critical force tests.

Note: If you are looking for more functionality, and only want to run on laptops, I suggest looking at https://github.com/sebastianmenze/Tindeq-Progressor-climbing-strength-test-server, which is based on this code, but also includes more tests, and a workout mode.

The critical force test

The "critical power model" is widely used in endurance sports. The basic idea behind the model is there is some power output that is sustainable for long durations; this level is known as the critical power, and is related to an athlete's aerobic fitness. Interestingly, it seems to be the case that athletes also have a constant amount of energy that they can expend above the critical power - a finite battery for work about critical power. This used to be called the "anaerobic work capacity", but is now called W', since it's not clear that it is purely anaerobic.

For more info on the concept - have a look at this video.

Dave Giles at Derby University, together with the crew at Lattice training have done some work testing how well this model applies to rock climbing, and developed some tests to measure it. You can read their papers here and here

In this repository I've provided code for the "all-out critical force test" described in the second paper. You can use these scripts to do your own critical force testing and measure your aerobic and anaerobic performance, or you can use them as a starting point for writing your own custom apps for the Progressor.


 Running the scripts

The scripts are written in Python 3.

Laptops

You will need to install the dependencies, bleak and bokeh.

Then download the scripts in this repository. Click the green "Code" button and select "Download Zip". Once you've downloaded and uncompressed the zip file, you can run the tests by navigating to the "laptop" directory in a terminal. Wake up your progressor and type "python critical_force.py".

iOS devices.

For iOS devices, the scripts here are designed to be used with the Pythonista app.

Once you have Pythonista installed, download the code from this link. The iOS files app can uncompress the zip file. Copy the whole folder to the Pythonista folder in iCloud Drive and you should be able to run the code from inside Pythonista.