Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 02409e8

Browse files
authored
Fix markdown titles
1 parent 42a6993 commit 02409e8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ A PHP class for analysing FIT files created by Garmin GPS devices.
1313

1414
Please read this page in its entirety and the [FAQ](https://github.com/adriangibbons/php-fit-file-analysis/wiki/Frequently-Asked-Questions-(FAQ)) first if you have any questions or need support.
1515

16-
##What is a FIT file?
16+
## What is a FIT file?
1717
FIT or Flexible and Interoperable Data Transfer is a file format used for GPS tracks and routes. It is used by newer Garmin fitness GPS devices, including the Edge and Forerunner series, which are popular with cyclists and runners.
1818

1919
Visit the FAQ page within the Wiki for more information.
2020

21-
##How do I use phpFITFileAnalysis with my PHP-driven website?
21+
## How do I use phpFITFileAnalysis with my PHP-driven website?
2222

2323
A couple of choices here:
2424

@@ -55,7 +55,7 @@ There are more **Optional Parameters** that can be supplied. These are described
5555

5656
The object will automatically load the FIT file and iterate through its contents. It will store any data it finds in arrays, which are accessible via the public data variable.
5757

58-
###Accessing the Data
58+
### Accessing the Data
5959
Data read by the class are stored in associative arrays, which are accessible via the public data variable:
6060
```php
6161
$pFFA->data_mesgs
@@ -113,7 +113,7 @@ In addition, public functions provide a short-hand way to access commonly used e
113113
- product()
114114
- sport()
115115

116-
###Optional Parameters
116+
### Optional Parameters
117117
There are five optional parameters that can be passed as an associative array when the phpFITFileAnalysis object is instantiated. These are:
118118

119119
- fix_data
@@ -134,7 +134,7 @@ $options = [
134134
$pFFA = new adriangibbons\phpFITFileAnalysis('my_fit_file.fit', $options);
135135
```
136136
The optional parameters are described in more detail below.
137-
####"Fix" the Data
137+
#### "Fix" the Data
138138
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.
139139

140140
**Recognised values:** 'all', 'cadence', 'distance', 'heart_rate', 'lat_lon', 'power', 'speed'
@@ -210,7 +210,7 @@ The result would be:
210210
var_dump($pFFA->data_mesgs['record']['distance']); // ['100'=>3.62, '101'=>4.01, '102'=>6.30, '103'=>8.59, '104'=>10.88];
211211
```
212212

213-
####Data Every Second
213+
#### Data Every Second
214214
Some of Garmin's Fitness devices offer the choice of Smart Recording or Every Second Recording.
215215

216216
Smart Recording records key points where the fitness device changes direction, speed, heart rate or elevation. This recording type records less track points and will potentially have gaps between timestamps of greater than one second.
@@ -225,7 +225,7 @@ If the ```fix_data``` option is not specified in conjunction with ```data_every_
225225

226226
*Note that you may experience degraded performance using the ```fix_data``` option. Improving the performance will be explored - it is likely the ```interpolateMissingData()``` function is sub-optimal.*
227227

228-
####Set Units
228+
#### Set Units
229229
By default, **metric** units (identified in the table below) are assumed.
230230

231231
<table>
@@ -265,7 +265,7 @@ $options = ['units' => 'statute'];
265265
$options = ['units' => 'raw'];
266266
$options = ['units' => 'metric']; // explicit but not necessary, same as default
267267
```
268-
####Pace
268+
#### Pace
269269
If required by the user, pace can be provided instead of speed. Depending on the units requested, pace will either be in minutes per kilometre (min/km) for metric units; or minutes per mile (min/mi) for statute.
270270

271271
To select pace, use the following option:
@@ -282,7 +282,7 @@ foreach ($pFFA->data_mesgs['record']['speed'] as $key => $value) {
282282
```
283283
Note that if 'raw' units are requested then this parameter has no effect on the speed data, as it is left untouched from what was read-in from the file.
284284

285-
####Timestamps
285+
#### Timestamps
286286
Unix time is the number of seconds since **UTC 00:00:00 Jan 01 1970**, however the FIT standard specifies that timestamps (i.e. fields of type date_time and local_date_time) represent seconds since **UTC 00:00:00 Dec 31 1989**.
287287

288288
The difference (in seconds) between FIT and Unix timestamps is 631,065,600:
@@ -294,7 +294,7 @@ echo 'The difference (in seconds) between FIT and Unix timestamps is '. number_f
294294
```
295295
By default, fields of type date_time and local_date_time read from FIT files will have this delta added to them so that they can be treated as Unix time. If the FIT timestamp is required, the 'garmin_timestamps' option can be set to true.
296296

297-
##Analysis
297+
## Analysis
298298
The following functions return arrays of data that could be used to create tables/charts:
299299
```php
300300
array $pFFA->hrPartionedHRmaximum(int $hr_maximum);
@@ -313,7 +313,7 @@ array $pFFA->hrZonesMax(int $hr_maximum, array $percentages_array=[0.60, 0.75, 0
313313
array $pFFA->hrZonesReserve(int $hr_resting, int $hr_maximum, array $percentages_array=[0.60, 0.65, 0.75, 0.82, 0.89, 0.94 ]) {
314314
array $pFFA->powerZones(int $functional_threshold_power, array $percentages_array=[0.55, 0.75, 0.90, 1.05, 1.20, 1.50]);
315315
```
316-
###Heart Rate
316+
### Heart Rate
317317
A function exists for analysing heart rate data:
318318
```php
319319
// hr_FT is heart rate at Functional Threshold, or Lactate Threshold Heart Rate
@@ -324,7 +324,7 @@ array $pFFA->hrMetrics(int $hr_resting, int $hr_maximum, string $hr_FT, $gender)
324324
* TRIMP (TRaining IMPulse)
325325
* Intensity Factor
326326

327-
###Power
327+
### Power
328328
Three functions exist for analysing power data:
329329
```php
330330
array $pFFA->powerMetrics(int $functional_threshold_power);
@@ -347,7 +347,7 @@ Note that ```$pFFA->criticalPower``` and some power metrics (Normalised Power, V
347347

348348
A demo of power analysis is available [here](http://adriangibbons.com/php-fit-file-analysis/demo/power-analysis.php).
349349

350-
##Other methods
350+
## Other methods
351351
Returns array of booleans using timestamp as key. true == timer paused (e.g. autopause):
352352
```php
353353
array isPaused()
@@ -366,7 +366,7 @@ Returns array of gear change information (if present, e.g. using Shimano D-Fly W
366366
array gearChanges($bIgnoreTimerPaused = true)
367367
```
368368

369-
##Acknowledgement
369+
## Acknowledgement
370370
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)).
371371

372372
As a minimum, I'd recommend reading the three PDFs included in the SDK:

0 commit comments

Comments
 (0)