4 changes: 2 additions & 2 deletions src/Resources/xml/home-perspectives.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
<property name="heightFactor" type="double" value="2" />
<property name="style" type="int" value="0" />
<property name="resizable" type="bool" value="0" />
<property name="settings" type="QString" value="{ &quot;title&quot;: &quot; &quot;,\n&quot;description&quot;: &quot;Fit the odpm and plot it with residuals &quot;,\n&quot;type&quot;: 1,\n&quot;animate&quot;: false,\n&quot;intervalrefresh&quot;: false,\n&quot;legendpos&quot;: 2,\n&quot;stack&quot;: false,\n&quot;orientation&quot;: 1,\n&quot;bgcolor&quot;: &quot;#010102&quot;, \n&quot;scale&quot;: 1,\n&quot;SERIES&quot;: [\n{ &quot;name&quot;: &quot;Model &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 2hr:sl:n mmp &lt;- head(meanmax(POWER),7200);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n multiuniq(mmp,secs);:sl:n:sl:n # fit starting values, then LM fit the ODPM model to first hours:sl:n cp &lt;- 200; W&lt;-11000; pmax &lt;- 1000; a&lt;-40;:sl:n fit &lt;- lm( W:sl:/x*(1-exp(-x:sl:/(W:sl:/(pmax-cp)))) + cp - a*(log(x:sl:/1800))*(bool(x&gt;1800)), secs, mmp);:sl:n:sl:n # success, generate prediction data:sl:n if (fit[0] &lt;&gt; 0) { :sl:n annotate(label, :qu:CP:qu:, round(cp));:sl:n annotate(label, :qu:W&apos;:qu:, round(W));:sl:n :sl:n:sl:n yy &lt;- sapply(secs, W:sl:/x*(1-exp(-x:sl:/(W:sl:/(pmax-cp)))) + cp - a*(log(x:sl:/1800))*(bool(x&gt;1800))); :sl:n:sl:n ## time to exhaustion at 300w:sl:n lbyy &lt;-yy; lbsecs&lt;-secs; multisort(ascend, lbyy,lbsecs);:sl:n annotate(label, :qu:TTE:qu:, round(lbsecs[lowerbound(lbyy,cp)]:sl:/6):sl:/10);:sl:n }:sl:n:sl:n }:sl:n:sl:n x { secs; }:sl:n y { yy; }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#010117&quot;, &quot;opacity&quot;: 1, &quot;legend&quot;: true, &quot;opengl&quot;: true, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;Bests &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 2hr:sl:n mmp &lt;- head(meanmax(POWER),7200);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n multiuniq(mmp,secs);:sl:n }:sl:n:sl:n x { secs; }:sl:n y { mmp; }:sl:n}:sl:n &quot;, &quot;line&quot;: 3, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#010112&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: false, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false} ]\n,\n&quot;AXES&quot;: [\n{ &quot;name&quot;: &quot;seconds &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 1, &quot;align&quot;: 1, &quot;minx&quot;: 1, &quot;maxx&quot;: 7200, &quot;miny&quot;: 0, &quot;maxy&quot;: 0, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: true, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#2684f6&quot;, &quot;axiscolor&quot;: &quot;#2684f6&quot;},\n{ &quot;name&quot;: &quot;watts &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 2, &quot;align&quot;: 1, &quot;minx&quot;: 0, &quot;maxx&quot;: 0, &quot;miny&quot;: 0, &quot;maxy&quot;: 950, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: false, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#010117&quot;, &quot;axiscolor&quot;: &quot;#010117&quot;} ]\n}" />
<property name="settings" type="QString" value="{ &quot;title&quot;: &quot; &quot;,\n&quot;description&quot;: &quot;Fit the odpm and plot it with residuals &quot;,\n&quot;type&quot;: 1,\n&quot;animate&quot;: false,\n&quot;intervalrefresh&quot;: false,\n&quot;legendpos&quot;: 2,\n&quot;stack&quot;: false,\n&quot;orientation&quot;: 1,\n&quot;bgcolor&quot;: &quot;#010102&quot;, \n&quot;scale&quot;: 1,\n&quot;SERIES&quot;: [\n{ &quot;name&quot;: &quot;Model &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 2hr:sl:n mmp &lt;- head(meanmax(POWER),7200);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n multiuniq(mmp,secs);:sl:n:sl:n # fit starting values, then LM fit the ODPM model to first hours:sl:n cp &lt;- 200; W&lt;-11000; pmax &lt;- 1000; a&lt;-40;:sl:n fit &lt;- lm( W:sl:/x*(1-exp(-x:sl:/(W:sl:/(pmax-cp)))) + cp - a*(log(x:sl:/1800))*(bool(x&gt;1800)), secs, mmp);:sl:n:sl:n # success, generate prediction data:sl:n if (fit[0] &lt;&gt; 0) { :sl:n annotate(label, :qu:Pmax:qu:, round(pmax));:sl:n annotate(label, :qu:CP:qu:, round(cp));:sl:n annotate(label, :qu:W&apos;:qu:, round(W));:sl:n :sl:n:sl:n yy &lt;- sapply(secs, W:sl:/x*(1-exp(-x:sl:/(W:sl:/(pmax-cp)))) + cp - a*(log(x:sl:/1800))*(bool(x&gt;1800))); :sl:n:sl:n ## time to exhaustion at 300w:sl:n lbyy &lt;-yy; lbsecs&lt;-secs; multisort(ascend, lbyy,lbsecs);:sl:n annotate(label, :qu:TTE:qu:, timestring(lbsecs[lowerbound(lbyy,cp)]));:sl:n }:sl:n:sl:n }:sl:n:sl:n x { secs; }:sl:n y { yy; }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#010117&quot;, &quot;opacity&quot;: 1, &quot;legend&quot;: true, &quot;opengl&quot;: true, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;Bests &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 2hr:sl:n mmp &lt;- head(meanmax(POWER),7200);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n multiuniq(mmp,secs);:sl:n }:sl:n:sl:n x { secs; }:sl:n y { mmp; }:sl:n}:sl:n &quot;, &quot;line&quot;: 3, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#010112&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: false, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false} ]\n,\n&quot;AXES&quot;: [\n{ &quot;name&quot;: &quot;seconds &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 1, &quot;align&quot;: 1, &quot;minx&quot;: 1, &quot;maxx&quot;: 7200, &quot;miny&quot;: 0, &quot;maxy&quot;: 0, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: true, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#2684f6&quot;, &quot;axiscolor&quot;: &quot;#2684f6&quot;},\n{ &quot;name&quot;: &quot;watts &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 2, &quot;align&quot;: 1, &quot;minx&quot;: 0, &quot;maxx&quot;: 0, &quot;miny&quot;: 0, &quot;maxy&quot;: 950, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: false, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#010117&quot;, &quot;axiscolor&quot;: &quot;#010117&quot;} ]\n}" />
</chart>
<chart id="45" name="" title="WKO4" >
<property name="title" type="QString" value="WKO4" />
Expand All @@ -324,7 +324,7 @@
<property name="heightFactor" type="double" value="2" />
<property name="style" type="int" value="0" />
<property name="resizable" type="bool" value="0" />
<property name="settings" type="QString" value="{ &quot;title&quot;: &quot; &quot;,\n&quot;description&quot;: &quot;Peronnet Thibault Model, WKO4 Model is basically an unattributed rip-off &quot;,\n&quot;type&quot;: 1,\n&quot;animate&quot;: false,\n&quot;intervalrefresh&quot;: false,\n&quot;legendpos&quot;: 2,\n&quot;stack&quot;: false,\n&quot;orientation&quot;: 1,\n&quot;bgcolor&quot;: &quot;#010102&quot;, \n&quot;scale&quot;: 1,\n&quot;SERIES&quot;: [\n{ &quot;name&quot;: &quot;Model &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 2hr:sl:n mmp &lt;- head(meanmax(POWER),10000);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n multiuniq(mmp,secs);:sl:n:sl:n # fit starting values:sl:n ftp &lt;- 200; frc&lt;-11000; pmax &lt;- 1000; a&lt;-40;:sl:n tau2&lt;-50; tte&lt;-1800;:sl:n:sl:n fit &lt;- lm((frc:sl:/x*(1-exp(-x:sl:/(frc:sl:/pmax)))) + ((ftp*(1-exp(-x:sl:/tau2))) - (bool(x&gt;tte)*(a*log(x:sl:/tte)))), secs,mmp);:sl:n:sl:n # success, generate prediction data:sl:n if (fit[0] &lt;&gt; 0) { :sl:n annotate(label, :qu:Pmax:qu:, round(pmax));:sl:n annotate(label, :qu:FTP:qu:, round(ftp));:sl:n annotate(label, :qu:FRC:qu:, round(frc));:sl:n annotate(label, :qu:TTE:qu:, round(tte)); :sl:n :sl:n # cache the paramters so we can use them:sl:n store(:qu:ftp:qu:,ftp);:sl:n store(:qu:frc:qu:,frc);:sl:n store(:qu:pmax:qu:,pmax);:sl:n store(:qu:tte:qu:,tte);:sl:n store(:qu:a:qu:,a);:sl:n store(:qu:tau2:qu:,tau2);:sl:n store(:qu:secs:qu:, secs);:sl:n:sl:n # generate the model curve:sl:n yy &lt;- sapply(secs, (frc:sl:/x*(1-exp(-x:sl:/(frc:sl:/pmax)))) + ((ftp*(1-exp(-x:sl:/tau2))) - (bool(x&gt;tte)*(a*log(x:sl:/tte))))); :sl:n:sl:n }:sl:n:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(yy); }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#ff0004&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: true, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;Bests &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 20 minutes:sl:n mmp &lt;- head(meanmax(POWER),10000);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(mmp); }:sl:n}:sl:n &quot;, &quot;line&quot;: 3, &quot;symbol&quot;: 0, &quot;size&quot;: 3, &quot;color&quot;: &quot;#ffa71a&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: false, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;pFRC &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # cache the paramters so we can use them:sl:n ftp &lt;- fetch(:qu:ftp:qu:);:sl:n frc &lt;- fetch(:qu:frc:qu:);:sl:n pmax&lt;- fetch(:qu:pmax:qu:);:sl:n tte&lt;- fetch(:qu:tte:qu:);:sl:n a&lt;- fetch(:qu:a:qu:);:sl:n tau2&lt;- fetch(:qu:tau2:qu:);:sl:n secs&lt;- fetch(:qu:secs:qu:);:sl:n:sl:n # generate the model curve:sl:n yy &lt;- sapply(secs, frc:sl:/x*(1-exp(-x:sl:/(frc:sl:/pmax)))); :sl:n:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(yy); }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#113dff&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: false, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;pFTP &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # cache the paramters so we can use them:sl:n ftp &lt;- fetch(:qu:ftp:qu:);:sl:n frc &lt;- fetch(:qu:frc:qu:);:sl:n pmax&lt;- fetch(:qu:pmax:qu:);:sl:n tte&lt;- fetch(:qu:tte:qu:);:sl:n a&lt;- fetch(:qu:a:qu:);:sl:n tau2&lt;- fetch(:qu:tau2:qu:);:sl:n secs&lt;- fetch(:qu:secs:qu:);:sl:n:sl:n # generate the model curve:sl:n yy &lt;- sapply(secs, ((ftp*(1-exp(-x:sl:/tau2))) - (bool(x&gt;tte)*(a*log(x:sl:/tte))))); :sl:n:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(yy); }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#4bc045&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: true, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false} ]\n,\n&quot;AXES&quot;: [\n{ &quot;name&quot;: &quot;seconds &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 1, &quot;align&quot;: 1, &quot;minx&quot;: 1, &quot;maxx&quot;: 10000, &quot;miny&quot;: 0, &quot;maxy&quot;: 0, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: true, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#2684f6&quot;, &quot;axiscolor&quot;: &quot;#2684f6&quot;},\n{ &quot;name&quot;: &quot;watts &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 2, &quot;align&quot;: 1, &quot;minx&quot;: 0, &quot;maxx&quot;: 0, &quot;miny&quot;: 0, &quot;maxy&quot;: 950, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: false, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#ff0004&quot;, &quot;axiscolor&quot;: &quot;#ff0004&quot;} ]\n}" />
<property name="settings" type="QString" value="{ &quot;title&quot;: &quot; &quot;,\n&quot;description&quot;: &quot;Peronnet Thibault Model, WKO4 Model is basically an unattributed rip-off &quot;,\n&quot;type&quot;: 1,\n&quot;animate&quot;: false,\n&quot;intervalrefresh&quot;: false,\n&quot;legendpos&quot;: 2,\n&quot;stack&quot;: false,\n&quot;orientation&quot;: 1,\n&quot;bgcolor&quot;: &quot;#010102&quot;, \n&quot;scale&quot;: 1,\n&quot;SERIES&quot;: [\n{ &quot;name&quot;: &quot;Model &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 2hr:sl:n mmp &lt;- head(meanmax(POWER),10000);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n multiuniq(mmp,secs);:sl:n:sl:n # fit starting values:sl:n ftp &lt;- 200; frc&lt;-11000; pmax &lt;- 1000; a&lt;-40;:sl:n tau2&lt;-50; tte&lt;-1800;:sl:n:sl:n fit &lt;- lm((frc:sl:/x*(1-exp(-x:sl:/(frc:sl:/pmax)))) + ((ftp*(1-exp(-x:sl:/tau2))) - (bool(x&gt;tte)*(a*log(x:sl:/tte)))), secs,mmp);:sl:n:sl:n # success, generate prediction data:sl:n if (fit[0] &lt;&gt; 0) { :sl:n annotate(label, :qu:Pmax:qu:, round(pmax));:sl:n annotate(label, :qu:FTP:qu:, round(ftp));:sl:n annotate(label, :qu:FRC:qu:, round(frc));:sl:n annotate(label, :qu:TTE:qu:, timestring(tte)); :sl:n :sl:n # cache the paramters so we can use them:sl:n store(:qu:ftp:qu:,ftp);:sl:n store(:qu:frc:qu:,frc);:sl:n store(:qu:pmax:qu:,pmax);:sl:n store(:qu:tte:qu:,tte);:sl:n store(:qu:a:qu:,a);:sl:n store(:qu:tau2:qu:,tau2);:sl:n store(:qu:secs:qu:, secs);:sl:n:sl:n # generate the model curve:sl:n yy &lt;- sapply(secs, (frc:sl:/x*(1-exp(-x:sl:/(frc:sl:/pmax)))) + ((ftp*(1-exp(-x:sl:/tau2))) - (bool(x&gt;tte)*(a*log(x:sl:/tte))))); :sl:n:sl:n }:sl:n:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(yy); }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#ff0004&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: true, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;Bests &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # raw data to fit with, just first 20 minutes:sl:n mmp &lt;- head(meanmax(POWER),10000);:sl:n secs &lt;- seq(1,length(mmp),1);:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(mmp); }:sl:n}:sl:n &quot;, &quot;line&quot;: 3, &quot;symbol&quot;: 0, &quot;size&quot;: 3, &quot;color&quot;: &quot;#ffa71a&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: false, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;pFRC &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # cache the paramters so we can use them:sl:n ftp &lt;- fetch(:qu:ftp:qu:);:sl:n frc &lt;- fetch(:qu:frc:qu:);:sl:n pmax&lt;- fetch(:qu:pmax:qu:);:sl:n tte&lt;- fetch(:qu:tte:qu:);:sl:n a&lt;- fetch(:qu:a:qu:);:sl:n tau2&lt;- fetch(:qu:tau2:qu:);:sl:n secs&lt;- fetch(:qu:secs:qu:);:sl:n:sl:n # generate the model curve:sl:n yy &lt;- sapply(secs, frc:sl:/x*(1-exp(-x:sl:/(frc:sl:/pmax)))); :sl:n:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(yy); }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#113dff&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: false, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false},\n{ &quot;name&quot;: &quot;pFTP &quot;, &quot;group&quot;: &quot; &quot;, &quot;xname&quot;: &quot;seconds &quot;, &quot;yname&quot;: &quot;watts &quot;, &quot;program&quot;: &quot;{:sl:n:sl:n finalise {:sl:n # cache the paramters so we can use them:sl:n ftp &lt;- fetch(:qu:ftp:qu:);:sl:n frc &lt;- fetch(:qu:frc:qu:);:sl:n pmax&lt;- fetch(:qu:pmax:qu:);:sl:n tte&lt;- fetch(:qu:tte:qu:);:sl:n a&lt;- fetch(:qu:a:qu:);:sl:n tau2&lt;- fetch(:qu:tau2:qu:);:sl:n secs&lt;- fetch(:qu:secs:qu:);:sl:n:sl:n # generate the model curve:sl:n yy &lt;- sapply(secs, ((ftp*(1-exp(-x:sl:/tau2))) - (bool(x&gt;tte)*(a*log(x:sl:/tte))))); :sl:n:sl:n }:sl:n:sl:n x { round(secs); }:sl:n y { round(yy); }:sl:n}:sl:n &quot;, &quot;line&quot;: 1, &quot;symbol&quot;: 0, &quot;size&quot;: 2, &quot;color&quot;: &quot;#4bc045&quot;, &quot;opacity&quot;: 100, &quot;legend&quot;: true, &quot;opengl&quot;: true, &quot;datalabels&quot;: false, &quot;aggregate&quot;: 1, &quot;fill&quot;: false} ]\n,\n&quot;AXES&quot;: [\n{ &quot;name&quot;: &quot;seconds &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 1, &quot;align&quot;: 1, &quot;minx&quot;: 1, &quot;maxx&quot;: 10000, &quot;miny&quot;: 0, &quot;maxy&quot;: 0, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: true, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#2684f6&quot;, &quot;axiscolor&quot;: &quot;#2684f6&quot;},\n{ &quot;name&quot;: &quot;watts &quot;, &quot;type&quot;: 0, &quot;orientation&quot;: 2, &quot;align&quot;: 1, &quot;minx&quot;: 0, &quot;maxx&quot;: 0, &quot;miny&quot;: 0, &quot;maxy&quot;: 950, &quot;smooth&quot;: 0, &quot;groupby&quot;: 0, &quot;visible&quot;: true, &quot;fixed&quot;: true, &quot;log&quot;: false, &quot;minorgrid&quot;: false, &quot;majorgrid&quot;: true, &quot;labelcolor&quot;: &quot;#ff0004&quot;, &quot;axiscolor&quot;: &quot;#ff0004&quot;} ]\n}" />
</chart>
</layout>
<layout name="Triathlon" style="0" type="8" expression="" trainswitch="0">
Expand Down