precise distance

Post questions and issues with Concept2 PM3 SDK
Post Reply
ninjanoka
Paddler
Posts: 7
Joined: May 3rd, 2013, 5:23 am

precise distance

Post by ninjanoka » May 17th, 2013, 9:12 am

Hi guys,

What would be the most precise way to get the current distance rowed ?! I want to match up my in game meters with the one of the concept2.
Get workdistance is giving only rounded meters i think.

Regards,
Steven

User avatar
Citroen
SpamTeam
Posts: 8062
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: precise distance

Post by Citroen » May 17th, 2013, 1:22 pm

Why are you assuming that the PM3/PM4 isn't giving a reasonably accurate total? Distance is based on the precise wattage it has measured and the documented formula that converts wattage to pace. Once we have pace and time we can calculate distance from that.

pace = ³√(2.80/watts)

http://www.concept2.com/indoor-rowers/t ... calculator
http://www.concept2.com/indoor-rowers/t ... calculator

ninjanoka
Paddler
Posts: 7
Joined: May 3rd, 2013, 5:23 am

Re: precise distance

Post by ninjanoka » May 19th, 2013, 5:39 am

Image

I apply the pace from the concept 2. But you can see a difference.. My workdistance = 507 (straight from the concept2). But if you look at the numbers highlighted in blue(top right). I traveled 572 meters.
Not sure why this is, but i maybe it has something to do with the dwelling/ recovery face where there should be no pace added i guess. (i add constant pace (meters p second times the current frame time) //add pace if(started)transform.Translate(Vector3.forward * myPace * Time.deltaTime);

Any clues on how i can get to a closer result to the concept2 meters?

User avatar
Citroen
SpamTeam
Posts: 8062
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: precise distance

Post by Citroen » May 19th, 2013, 5:47 am

ninjanoka wrote:
Any clues on how i can get to a closer result to the concept2 meters?
Round everything to integers (except time which you round to tenths of second). When rounding use a round_down() function.

ninjanoka
Paddler
Posts: 7
Joined: May 3rd, 2013, 5:23 am

Re: precise distance

Post by ninjanoka » May 19th, 2013, 11:48 am

Great! Thanks for the help .. I'll try to implement this tonight!

OarConsequences
1k Poster
Posts: 132
Joined: October 1st, 2012, 9:46 am

Re: precise distance

Post by OarConsequences » May 19th, 2013, 12:13 pm

Citroen wrote:
ninjanoka wrote:
Any clues on how i can get to a closer result to the concept2 meters?
Round everything to integers (except time which you round to tenths of second). When rounding use a round_down() function.
Doesn't seem like rounding would account for the difference between 507m and 572m, would it?

User avatar
Citroen
SpamTeam
Posts: 8062
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: precise distance

Post by Citroen » May 19th, 2013, 1:20 pm

OarConsequences wrote:
Citroen wrote:
ninjanoka wrote:
Any clues on how i can get to a closer result to the concept2 meters?
Round everything to integers (except time which you round to tenths of second). When rounding use a round_down() function.
Doesn't seem like rounding would account for the difference between 507m and 572m, would it?
Over 57 strokes it could be significant, especially if the OP's code is using a more normal HALF_ROUND() function.

ninjanoka
Paddler
Posts: 7
Joined: May 3rd, 2013, 5:23 am

Re: precise distance

Post by ninjanoka » May 20th, 2013, 5:44 am

Well i get the pace from CSAFE_GETPACE_CMD = 0xA6, and it allready is rounded...

OarConsequences
1k Poster
Posts: 132
Joined: October 1st, 2012, 9:46 am

Re: precise distance

Post by OarConsequences » May 20th, 2013, 10:12 am

Citroen wrote:Over 57 strokes it could be significant, especially if the OP's code is using a more normal HALF_ROUND() function.
So the truncating of precision is taking place internally during distance calculations each stroke? I would have thought that it was just for displaying the data. Assuming that OP is getting the rate data directly from the PM and not calculating it himself does that mean that there is propagation of error for each stroke? That would mean people rowing at a higher stroke rate would actually be rowing a significant distance further than people at a lower rate.

Post Reply