Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Left-Right Balance format

Rank

Total Posts: 10

Joined 2015-02-19

PM

Hi all,

I'm using the Java SDK and java.lang.Integer get LeftRightBalance() returns the value of the Left-Right balance. However I don't understand the format of what it's returned (for example: 37693). I would like to know how I can convert it into % format for left and right.

Thanks      
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

In Profile.xls you can see that session, lap and record mesg use the type 'left_right_balance_100' and 'left_right_balance' for the left_right_balance_field. You can see the definition of these types on the types sheet.

For your example it seems you are working with left_right_balance_100 found in session and lap:
37693 = 0x933D
The MSB is set so the quantity represents right power contribution.
0x133D = 4925 => 49.25% right, 50.75% left.      
Rank

Total Posts: 10

Joined 2015-02-19

PM

Thanks it makes senses.      
Rank

Total Posts: 10

Joined 2015-02-19

PM

Btw, I didn't found in the difference between 'left_right_balance_100' and 'left_right_balance'.

Cheers      
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

They are both defined on the types sheet. Left_right_balance_100 is 2 bytes allowing for 2 decimal digits (scale=100, 50%=5000). Left_right balance is uint8 size so 50%=50. In both cases if the MSB is set the qty represents the known right pedal contribution.      
Rank

Total Posts: 10

Joined 2015-02-19

PM

Ok I see it in the Profile.xls

Thanks      
Rank

Total Posts: 1

Joined 2015-11-19

PM

ShaneP - 17 March 2015 09:39 AM
In Profile.xls you can see that session, lap and record mesg use the type 'left_right_balance_100' and 'left_right_balance' for the left_right_balance_field. You can see the definition of these types on the types sheet.

For your example it seems you are working with left_right_balance_100 found in session and lap:
37693 = 0x933D
The MSB is set so the quantity represents right power contribution.
0x133D = 4925 => 49.25% right, 50.75% left.