The measurements of my HR sensor is plagued with outliers. In particular, I get wrong measurements when the contacts of my sensors are not wet enough. This happens at the beginning of my ride or downhill (especially when this is long). Would it possible to develop an algorithm to exclude the outliers based on a simple logic:
a if I am going downhill, it is hard to expect a rate over my max threshold
b if the rate of change of the bpms (first derivative) is quite high, it is hard to believe that the high rate measured could be true.
Alternatively you can use an AI. You can create a command called "Adjust Heart Rates" similar to the one you use for the elevation adjustment.