AUTOMATIC DETECTION OF MAXIMAL OXYGEN UPTAKE AND VENTILATORY THRESHOLD