So I programmed a DataField that displays some information for bike activities. I have been testing it for a while, comparing info from my DataField with fields provided by Garmin. The only problem is with Intensity Factor, as those values vary around 0.02. For example: Garmin IF field says 0.789, whereas my DataField says 0.798. I guess the problem is with normalized power, but I think my formula is correct. "ftp" is hardcoded. Any ideas why there is a difference between those values?
Here is what code looks like:
if (info.currentPower != null)
{
currentPower = info.currentPower;
power_sum += Math.pow(currentPower, 4);
++number_power_sum;
np = Math.pow(power_sum / number_power_sum, .25);
InFa = np/ftp;
}
InFaDisplay = Lang.format("$1$", [ InFa.format("%4.3f") ]);
else
{
np = "-.---";
InFaDisplay = "-.---";
}
Thanks.