cagnulein / qdomyos-zwift

Zwift bridge for smart treadmills and bike/cyclette
https://www.qzfitness.com/
GNU General Public License v3.0
337 stars 103 forks source link

RSS in real time in QZ while using an Stryd Pod #2265

Closed davidfernandezt closed 1 month ago

davidfernandezt commented 1 month ago

As spoken in FB : Talking about Stryd + QZ , Another thing that Qz might do with Stryd is to calculate the RSS in real time, that would be a huge difference and improvement compared with Stryd alone !

Roberto Viola the formula it’s a bit of mistery by the people of Stryd . I by trial an error + a general formula got the following which in my case gives really quite close numbers of that generated by power Center at the end of the run : RSSAVG = ( ( ( ( ( MIN x 60 ) x NP x ( NP ÷ CP ) ) ÷ ( CP x 3600 ) x 100 ) x .6139 ) + ( ( ( MIN x 60 ) x NP x ( NP ÷ CP ) ) ÷ ( CP x 3600 ) x 100 ) ) ÷ 2

Despite the formula ask for Normdlized power , I use the average power . BTW the 0.6139 I just got it by trial an error in order to match power center . ![Uploading Imagen.jpeg…]()

cagnulein commented 1 month ago

alomost done similar to this https://github.com/cagnulein/qdomyos-zwift/issues/516

cagnulein commented 1 month ago

@davidfernandezt code implemented! do you want to see it in a separate tile? if so, do you think that the same algorithm could be used also for bike replacing the CP with the FTP value?

davidfernandezt commented 1 month ago

A new tile would be excellent ! I don’t think that just changing CP to FTP would be functional to bike since the difference between TSS vs RSS vs rTSS , herewith something about it : https://help.trainingpeaks.com/hc/en-us/articles/204071944-Training-Stress-Scores-TSS-Explained

cagnulein commented 1 month ago

@davidfernandezt i added the tile but i guess there is something that i'm missing; how do you calculate the NP? Usually the NP is calculated with the last 30s average values, but this formula doesn't have sense if i'm calculating the RSS every 1 minute for example. What do you think?

davidfernandezt commented 1 month ago

I have noticed that despite the formula said Normalized power , if I directly use the average power it gives almost the same number than the one from Stryd power center , since only when several differences in power output are registered will result in a very different NP vs AVG power , and in running would be quite unusual , while in bike could be easily or more commonly found . I guess that it would generate too much data since it would need to register the average every 30secs (well really the moving average at 30secs intervals ) and at the save time its fourth power and the average of both . At the end in my case it would just make a difference of around 1 or 2 rss in 90minutes , that in real time wouldn’t make any real impact . I have always thought that since running power analysis started from the bike experience, then many calculations aren’t an exact fit or even universally accepted, therefore some are more “proprietary “ calculations of a brand like Stryd

davidfernandezt commented 1 month ago

Forgot to add a link about NP that might be useful https://join.cc/cycling-tips/why-do-you-use-np-for-your-training/#:~:text=To%20calculate%20the%20NP%20you,root%20to%20the%20fourth%20power.

cagnulein commented 1 month ago

ok so you are suggesting to use directly the AVG, right?

davidfernandezt commented 1 month ago

In my case I havent noticed any real difference in using the NP vs avg for running , I would suggest to use the average power , but perhaps I am too slow to generate a big difference in power output constantly in say 90mins ! 😂

cagnulein commented 1 month ago

ahahah ok let's go in this way so! i'm building now. are you on android or ios?

davidfernandezt commented 1 month ago

Both, sometimes I use an iPhone and sometimes a Samsung tablet , it really depends upon where I am training

cagnulein commented 1 month ago

ok if you want to give it a try on android: https://github.com/cagnulein/qdomyos-zwift/actions/runs/8536942795

i added 2 thing:

Google is very slow in these days, reviewing the app on the store, even the beta ones. For this reason, in order to check right now if the patch that I did is right, you can use the android build in the link (check at the bottom of the page in about 1 hour). In order to test it you need first to remove the current QZ version on your phone, install the one that you downloaded. This version is a 15 minutes trial (you can restart it as many times as you want) and I can unlock it if you want, send me an email to roberto.viola83@gmail.com mentioning this ticket and that you are on android. Let me know if you have any questions

davidfernandezt commented 1 month ago

Thanks Roberto , unfortunately right now I am out of home , without both of my devices with QZ (Android /ios but as soon as returning back I happily would test

cagnulein commented 1 month ago

no problem, I will test myself hopefully today