You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+29-18Lines changed: 29 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,14 +120,14 @@ There are three optional parameters that can be passed as an associative array w
120
120
- pace
121
121
122
122
For example:
123
-
````php
123
+
```php
124
124
$options = [
125
125
'fix_data' => ['cadence', 'distance'],
126
126
'units' => 'statute',
127
127
'pace' => true
128
128
];
129
129
$pFFA = new adriangibbons\phpFITFileAnalysis('my_fit_file.fit', $options);
130
-
````
130
+
```
131
131
The optional parameters are described in more detail below.
132
132
####"Fix" the Data
133
133
FIT files have been observed where some data points are missing for one sensor (e.g. cadence/foot pod), where information has been collected for other sensors (e.g. heart rate) at the same instant. The cause is unknown and typically only a relatively small number of data points are missing. Fixing the issue is probably unnecessary, as each datum is indexed using a timestamp. However, it may be important for your project to have the exact same number of data points for each type of data.
@@ -265,27 +265,27 @@ Note that if 'raw' units are requested then this parameter has no effect on the
265
265
##Analysis
266
266
The following functions return arrays of that could be used to create tables/charts:
**Critical Power** (or Best Effort) is the highest average power sustained for a specified period of time within the activity. You can supply a single time period (in seconds), or an array or time periods.
311
311
312
-
Note that ```$pFFA->criticalPower``` and some power metrics (Normalised Power, Variability Index, Intensity Factor, Training Stress Score) will use the [PHP Trader](http://php.net/manual/en/book.trader.php) extension if it is loaded on the server. If the extension is not loaded then it will use the built-in Simple Moving Average algorithm, which is far less performant particularly for larger files!
313
-
314
312
**Quadrant Analysis** provides insight into the neuromuscular demands of a bike ride through comparing pedal velocity with force by looking at cadence and power.
315
313
314
+
Note that ```$pFFA->criticalPower``` and some power metrics (Normalised Power, Variability Index, Intensity Factor, Training Stress Score) will use the [PHP Trader](http://php.net/manual/en/book.trader.php) extension if it is loaded on the server. If the extension is not loaded then it will use the built-in Simple Moving Average algorithm, which is far less performant particularly for larger files!
315
+
316
316
A demo of power analysis is available [here](http://adriangibbons.com/php-fit-file-analysis/demo/power-analysis.php).
317
317
318
318
##Other methods
319
-
```isPaused()``` - Returns array of booleans using timestamp as key. true == timer paused (e.g. autopause).
319
+
Returns array of booleans using timestamp as key. true == timer paused (e.g. autopause):
320
+
```php
321
+
array isPaused()
322
+
```
323
+
Returns a JSON object with requested ride data:
324
+
```php
325
+
array getJSON(float $crank_length = null, int $ftp = null, array $data_required = ['all'], int $selected_cadence = 90)
326
+
/**
327
+
* $data_required can be ['all'] or a combination of:
This class has been created using information available in a Software Development Kit (SDK) made available by ANT ([thisisant.com](http://www.thisisant.com/resources/fit)).
0 commit comments