# Connecting Concept2 to your Mac

My Concept2 is awesome! Before joining the Moffet towers sports club, I used to drive to BIAC to use the rowing machine. And now, after getting the Concept2, I do my erging before leaving for work. That keeps my daily routine consistent.

My Concept2 came with PM5 - the latest computer used to track some essential metrics. While PM5 covers pretty much everything, one metric I wanted to keep track of, is missing.

What I wanted to measure is a distance travelled per stroke. Assuming that your Concept2 is accurately callibrated, there is a formula that can be used to estimate the distance per stroke.

For each power level in Watts W and for a Rating R in strokes per minute, the distance D per stroke is:

D = 60/R x (W/2.8)^(1/3)

So for example if you pull 200 W at Rate 20:

D = 60/20 x (200/2.8)^(1/3) = 12.4 m

Now the tricky part of raising a decimal to a power of decimal:

a^b = exp(b * ln(a))

exp and natural logarithm are available in math.h.

Final step is to get the Concept2 SDK to recognize PM5 computer.

1. Make a small change to PM3USBCP.h to define the PM5:

```
#define TKCMDSET_PM5_PRODUCT_NAME "Concept2 Performance Monitor 5 (PM5)"
```

2. Pass it to the api to discover PM5

```
tkcmdsetDDI_discover_pm3s(TKCMDSET_PM5_PRODUCT_NAME, numCommunicating, &numCommunicating);
```

3. Test if you are communicating with PM5 by reading its searial number:

`tkcmdsetDDI_serial_number(port, rspBuffer, serialLength);`

That should be it. Twitter me at @mishab if you have any questions.